---
title: "Updates a fine-tuned model."
method: PATCH
path: "/v1/finetuning/finetuned-models/{id}"
tags: ["/finetuning"]
deprecated: true
---

# Updates a fine-tuned model.

`PATCH /v1/finetuning/finetuned-models/{id}`

> **Deprecated.**

Updates the fine-tuned model with the given ID. The model will be updated with the new settings and name provided in the request body.

## Path parameters

- `id` string, required

## Headers

- `X-Client-Name` string

## Request body

- object
  - `name` string, required — FinetunedModel name (e.g. `foobar`).
  - `creator_id` string — User ID of the creator.
  - `organization_id` string — Organization ID.
  - `settings` Settings, required — The configuration used for fine-tuning.
    - `base_model` BaseModel, required — The base model used for fine-tuning.
      - `name` string — The name of the base model.
      - `version` string — read-only. The version of the base model.
      - `base_type` 'BASE_TYPE_UNSPECIFIED' | 'BASE_TYPE_GENERATIVE' | 'BASE_TYPE_CLASSIFICATION' | 'BASE_TYPE_RERANK' | 'BASE_TYPE_CHAT', required — The possible types of fine-tuned models. - BASE_TYPE_UNSPECIFIED: Unspecified model. - BASE_TYPE_GENERATIVE: Deprecated: Generative model. - BASE_TYPE_CLASSIFICATION: Classification model. - BASE_TYPE_RERANK: Rerank model. - BASE_TYPE_CHAT: Chat model.
      - `strategy` 'STRATEGY_UNSPECIFIED' | 'STRATEGY_VANILLA' | 'STRATEGY_TFEW' — The possible strategy used to serve a fine-tuned models. - STRATEGY_UNSPECIFIED: Unspecified strategy. - STRATEGY_VANILLA: Deprecated: Serve the fine-tuned model on a dedicated GPU. - STRATEGY_TFEW: Deprecated: Serve the fine-tuned model on a shared GPU.
    - `dataset_id` string, required — The data used for training and evaluating the fine-tuned model.
    - `hyperparameters` Hyperparameters — The fine-tuning hyperparameters.
      - `early_stopping_patience` integer — Stops training if the loss metric does not improve beyond the value of `early_stopping_threshold` after this many times of evaluation.
      - `early_stopping_threshold` number, double — How much the loss must improve to prevent early stopping.
      - `train_batch_size` integer — The batch size is the number of training examples included in a single training pass.
      - `train_epochs` integer — The number of epochs to train for.
      - `learning_rate` number, double — The learning rate to be used during training.
      - `lora_alpha` integer — Controls the scaling factor for LoRA updates. Higher values make the updates more impactful.
      - `lora_rank` integer — Specifies the rank for low-rank matrices. Lower ranks reduce parameters but may limit model flexibility.
      - `lora_target_modules` 'LORA_TARGET_MODULES_UNSPECIFIED' | 'LORA_TARGET_MODULES_QV' | 'LORA_TARGET_MODULES_QKVO' | 'LORA_TARGET_MODULES_QKVO_FFN' — The possible combinations of LoRA modules to target. - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules. - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers. - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers. - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN).
    - `multi_label` boolean — read-only. Whether the model is single-label or multi-label (only for classification).
    - `wandb` WandbConfig — The Weights & Biases configuration.
      - `project` string, required — The WandB project name to be used during training.
      - `api_key` string, required — The WandB API key to be used during training.
      - `entity` string — The WandB entity name to be used during training.
  - `status` 'STATUS_UNSPECIFIED' | 'STATUS_FINETUNING' | 'STATUS_DEPLOYING_API' | 'STATUS_READY' | 'STATUS_FAILED' | 'STATUS_DELETED' | 'STATUS_TEMPORARILY_OFFLINE' | 'STATUS_PAUSED' | 'STATUS_QUEUED' — The possible stages of a fine-tuned model life-cycle. - STATUS_UNSPECIFIED: Unspecified status. - STATUS_FINETUNING: The fine-tuned model is being fine-tuned. - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed. - STATUS_READY: The fine-tuned model is ready to receive requests. - STATUS_FAILED: The fine-tuned model failed. - STATUS_DELETED: The fine-tuned model was deleted. - STATUS_TEMPORARILY_OFFLINE: Deprecated: The fine-tuned model is temporarily unavailable. - STATUS_PAUSED: Deprecated: The fine-tuned model is paused (Vanilla only). - STATUS_QUEUED: The fine-tuned model is queued for training.
  - `created_at` string, date-time — Creation timestamp.
  - `updated_at` string, date-time — Latest update timestamp.
  - `completed_at` string, date-time — Timestamp for the completed fine-tuning.
  - `last_used` string, date-time — Deprecated: Timestamp for the latest request to this fine-tuned model.

## Response `200`

A successful response.

- UpdateFinetunedModelResponse — Response to a request to update a fine-tuned model.
  - `finetuned_model` FinetunedModel — This resource represents a fine-tuned model.
    - `id` string — read-only. FinetunedModel ID.
    - `name` string, required — FinetunedModel name (e.g. `foobar`).
    - `creator_id` string — read-only. User ID of the creator.
    - `organization_id` string — read-only. Organization ID.
    - `settings` Settings, required — The configuration used for fine-tuning.
      - `base_model` BaseModel, required — The base model used for fine-tuning.
        - `name` string — The name of the base model.
        - `version` string — read-only. The version of the base model.
        - `base_type` 'BASE_TYPE_UNSPECIFIED' | 'BASE_TYPE_GENERATIVE' | 'BASE_TYPE_CLASSIFICATION' | 'BASE_TYPE_RERANK' | 'BASE_TYPE_CHAT', required — The possible types of fine-tuned models. - BASE_TYPE_UNSPECIFIED: Unspecified model. - BASE_TYPE_GENERATIVE: Deprecated: Generative model. - BASE_TYPE_CLASSIFICATION: Classification model. - BASE_TYPE_RERANK: Rerank model. - BASE_TYPE_CHAT: Chat model.
        - `strategy` 'STRATEGY_UNSPECIFIED' | 'STRATEGY_VANILLA' | 'STRATEGY_TFEW' — The possible strategy used to serve a fine-tuned models. - STRATEGY_UNSPECIFIED: Unspecified strategy. - STRATEGY_VANILLA: Deprecated: Serve the fine-tuned model on a dedicated GPU. - STRATEGY_TFEW: Deprecated: Serve the fine-tuned model on a shared GPU.
      - `dataset_id` string, required — The data used for training and evaluating the fine-tuned model.
      - `hyperparameters` Hyperparameters — The fine-tuning hyperparameters.
        - `early_stopping_patience` integer — Stops training if the loss metric does not improve beyond the value of `early_stopping_threshold` after this many times of evaluation.
        - `early_stopping_threshold` number, double — How much the loss must improve to prevent early stopping.
        - `train_batch_size` integer — The batch size is the number of training examples included in a single training pass.
        - `train_epochs` integer — The number of epochs to train for.
        - `learning_rate` number, double — The learning rate to be used during training.
        - `lora_alpha` integer — Controls the scaling factor for LoRA updates. Higher values make the updates more impactful.
        - `lora_rank` integer — Specifies the rank for low-rank matrices. Lower ranks reduce parameters but may limit model flexibility.
        - `lora_target_modules` 'LORA_TARGET_MODULES_UNSPECIFIED' | 'LORA_TARGET_MODULES_QV' | 'LORA_TARGET_MODULES_QKVO' | 'LORA_TARGET_MODULES_QKVO_FFN' — The possible combinations of LoRA modules to target. - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules. - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers. - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers. - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN).
      - `multi_label` boolean — read-only. Whether the model is single-label or multi-label (only for classification).
      - `wandb` WandbConfig — The Weights & Biases configuration.
        - `project` string, required — The WandB project name to be used during training.
        - `api_key` string, required — The WandB API key to be used during training.
        - `entity` string — The WandB entity name to be used during training.
    - `status` 'STATUS_UNSPECIFIED' | 'STATUS_FINETUNING' | 'STATUS_DEPLOYING_API' | 'STATUS_READY' | 'STATUS_FAILED' | 'STATUS_DELETED' | 'STATUS_TEMPORARILY_OFFLINE' | 'STATUS_PAUSED' | 'STATUS_QUEUED' — The possible stages of a fine-tuned model life-cycle. - STATUS_UNSPECIFIED: Unspecified status. - STATUS_FINETUNING: The fine-tuned model is being fine-tuned. - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed. - STATUS_READY: The fine-tuned model is ready to receive requests. - STATUS_FAILED: The fine-tuned model failed. - STATUS_DELETED: The fine-tuned model was deleted. - STATUS_TEMPORARILY_OFFLINE: Deprecated: The fine-tuned model is temporarily unavailable. - STATUS_PAUSED: Deprecated: The fine-tuned model is paused (Vanilla only). - STATUS_QUEUED: The fine-tuned model is queued for training.
    - `created_at` string, date-time — read-only. Creation timestamp.
    - `updated_at` string, date-time — read-only. Latest update timestamp.
    - `completed_at` string, date-time — read-only. Timestamp for the completed fine-tuning.
    - `last_used` string, date-time — read-only. Deprecated: Timestamp for the latest request to this fine-tuned model.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Status Service Unavailable

---

[API](https://skmtc.net/cohere-ai/apis/api-reference.md) · [All operations](https://skmtc.net/cohere-ai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cohere-ai/api-reference/revisions/dbed69eda210/schema)
