Create a fine-tuning pipeline
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.
AuthorizationBearer <token>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
application/json- body
Request body for POST /v1/fine_tuning/pipelines.
name*PipelineNamePipeline name; its alias (the served model name) is derived from it.
1 <= length <= 64base_model*stringHugging Face ID of the base model to fine-tune.
1 <= lengthsource*Where a pipeline's training data comes from.
schedule?When a pipeline runs on its own.
{}hyperparameters?Hyperparameters for fine-tuning.
{ "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?ServingStrategyHow a promoted version replaces the one being served.
"blue_green""blue_green""replace"promotion?When a candidate replaces the served version.
{ "min_delta": 0.2}Successful Response
application/json- response
A fine-tuning pipeline, as returned by the API.
id*stringA 24-character hexadecimal MongoDB ObjectId string.
^[0-9a-fA-F]{24}$object?string"fine_tuning.pipeline"project_id*stringA 24-character hexadecimal MongoDB ObjectId string.
^[0-9a-fA-F]{24}$name*stringalias*stringModel name the promoted version is served under, usable only by this project.
base_model*stringsource*Where a pipeline's training data comes from.
schedule*When a pipeline runs on its own.
hyperparameters*Hyperparameters for fine-tuning.
quantization?|nullworker_id*stringA 24-character hexadecimal MongoDB ObjectId string.
^[0-9a-fA-F]{24}$serving_strategy*ServingStrategyHow a promoted version replaces the one being served.
"blue_green""replace"promotion*When a candidate replaces the served version.
enabled?booleantrueactive_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?|nullchampion?|nullcreated_at?integercurl -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" ] }}'{ "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.