DeepFellow DOCS
DeepFellow API ReferenceFine tuning pipelines

Create a fine-tuning pipeline

POST
/v1/fine_tuning/pipelines

Create a pipeline that periodically fine-tunes base_model on Q&A generated from the project's vector stores.

Each run trains a new adapter version, scores it against the version being served, and serves it under the pipeline's alias only if it scores better. The alias can only be used by this project.

Authorization

headerAuthorizationBearer <token>

Header Parameters

OpenAI-Organization?|

Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.

OpenAI-Project?|

Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization

Request Body

application/json
  1. body

Request body for POST /v1/fine_tuning/pipelines.

name*PipelineName

Pipeline name; its alias (the served model name) is derived from it.

Length1 <= length <= 64
base_model*string

Hugging Face ID of the base model to fine-tune.

Length1 <= length
source*

Where a pipeline's training data comes from.

schedule?

When a pipeline runs on its own.

Default{}
hyperparameters?

Hyperparameters for fine-tuning.

Default
{  "n_epochs": "auto",  "batch_size": "auto",  "learning_rate_multiplier": "auto"}
quantization?|

Quantization during training.

worker_id?|

Fine-tuning worker of type infra the pipeline trains on; defaults to the registered one.

serving_strategy?ServingStrategy

How a promoted version replaces the one being served.

Default"blue_green"
Value in"blue_green""replace"
promotion?

When a candidate replaces the served version.

Default
{  "min_delta": 0.2}

Response Body

Successful Response

application/json
  1. response

A fine-tuning pipeline, as returned by the API.

id*string

A 24-character hexadecimal MongoDB ObjectId string.

Match^[0-9a-fA-F]{24}$
object?string
Default"fine_tuning.pipeline"
project_id*string

A 24-character hexadecimal MongoDB ObjectId string.

Match^[0-9a-fA-F]{24}$
name*string
alias*string

Model name the promoted version is served under, usable only by this project.

base_model*string
source*

Where a pipeline's training data comes from.

schedule*

When a pipeline runs on its own.

hyperparameters*

Hyperparameters for fine-tuning.

quantization?|null
worker_id*string

A 24-character hexadecimal MongoDB ObjectId string.

Match^[0-9a-fA-F]{24}$
serving_strategy*ServingStrategy

How a promoted version replaces the one being served.

Value in"blue_green""replace"
promotion*

When a candidate replaces the served version.

enabled?boolean
Defaulttrue
active_run_id?|

Run in progress, if any; at most one per pipeline.

next_run_at?|

Unix time of the next scheduled run; null when manual-only or paused.

eval_set?|null
champion?|null
created_at?integer
Example Request
curl -X POST 'https://deepfellow-server-host/v1/fine_tuning/pipelines' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "base_model": "string",  "source": {    "vector_store_ids": [      "5eb7cf5a86d9755df3a6c593"    ]  }}'
Example Response
{  "id": "5eb7cf5a86d9755df3a6c593",  "object": "fine_tuning.pipeline",  "project_id": "5eb7cf5a86d9755df3a6c593",  "name": "string",  "alias": "string",  "base_model": "string",  "source": {    "vector_store_ids": [      "5eb7cf5a86d9755df3a6c593"    ]  },  "schedule": {    "interval_hours": 1  },  "hyperparameters": {    "n_epochs": "auto",    "batch_size": "auto",    "learning_rate_multiplier": "auto"  },  "quantization": "4bit",  "worker_id": "5eb7cf5a86d9755df3a6c593",  "serving_strategy": "blue_green",  "promotion": {    "min_delta": 0.2  },  "enabled": true,  "active_run_id": "5eb7cf5a86d9755df3a6c593",  "next_run_at": 0,  "eval_set": {    "file_id": "5eb7cf5a86d9755df3a6c593",    "chunk_hashes": [      "string"    ],    "size": 0,    "version": 1,    "built_at": 0  },  "champion": {    "run_id": "5eb7cf5a86d9755df3a6c593",    "version": 0,    "adapter_id": "string",    "score": 0,    "eval_config_hash": "string",    "eval_set_version": 0,    "predictions_file_id": "5eb7cf5a86d9755df3a6c593",    "infra_model_id": "string"  },  "created_at": 0}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.