RL

Create training session

Creates a training session and returns its details.

post/rl/training-sessions

Request body

resume_from_checkpoint_idstring

Checkpoint ID to resume from

resume_from_hf_checkpointstring

HuggingFace repo (or hf://) to resume model weights from. Accepts either a full model or a PEFT adapter directory. Mutually exclusive with resume_from_checkpoint_id.

model_resources_idstring required

Model resource to attach the session to. The session runs on that resource's GPU pods.

display_namestring

Optional display name used to identify the training session

load_optimizerboolean

Whether to restore optimizer state and step from a training checkpoint. Omitted or true restores them; false loads weights only with a fresh optimizer and step 0. Not valid for inference or HuggingFace checkpoints, which have no optimizer state.

Example request

{
  "resume_from_checkpoint_id": "123e4567-e89b-12d3-a456-426614174000",
  "resume_from_hf_checkpoint": "your-org/llama-3-8b-finetuned",
  "lora_config": {
    "rank": 32,
    "alpha": 64,
    "train_unembed": true
  },
  "model_resources_id": "123e4567-e89b-12d3-a456-426614174000",
  "display_name": "gsm8k-experiment-2",
  "metadata": {
    "wandb": {
      "entity": "example-org",
      "project": "grpo-gsm8k",
      "group": "gsm8k-35b-sweep",
      "run_name": "exp2-thinking-4k-ctx",
      "run_id": "abc123",
      "url": "https://wandb.ai/example-org/example-project/runs/run-id"
    }
  },
  "load_optimizer": true
}

Response

Training session details

idstring required

ID of the training session

display_namestring

Display name used to identify the training session

status'TRAINING_SESSION_STATUS_UNSPECIFIED' | 'TRAINING_SESSION_STATUS_CREATING' | 'TRAINING_SESSION_STATUS_RUNNING' | 'TRAINING_SESSION_STATUS_STOPPED' | 'TRAINING_SESSION_STATUS_STOPPING' | 'TRAINING_SESSION_STATUS_ERROR' | 'TRAINING_SESSION_STATUS_EXPIRED' required

Status of the training session

resume_from_checkpoint_idstring

Checkpoint ID this session was resumed from

created_atstring date-time required

Timestamp when the training session was created

updated_atstring date-time required

Timestamp when the training session was last updated

model_resources_idstring required

Model resource this session is attached to. The session runs on that resource's GPU pods.

base_modelstring required

Base model the session trains, taken from the model resource it is attached to

created_bystring required

ID of the user who created the training session

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "display_name": "gsm8k-experiment-2",
  "metadata": {
    "wandb": {
      "entity": "example-org",
      "project": "grpo-gsm8k",
      "group": "gsm8k-35b-sweep",
      "run_name": "exp2-thinking-4k-ctx",
      "run_id": "abc123",
      "url": "https://wandb.ai/example-org/example-project/runs/run-id"
    }
  },
  "error": {
    "message": "The session could not start because the selected resource has no available capacity.",
    "occurred_at": "2026-01-02T00:00:05Z"
  },
  "inference_checkpoints": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2026-01-02T00:00:00Z",
      "registration": {
        "model_name": "username/Meta-Llama-3-8B-rl-step-42-20260216",
        "registered_at": "2026-01-02T00:00:00Z"
      }
    }
  ],
  "training_checkpoints": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2026-01-02T00:00:00Z"
    }
  ],
  "resume_from_checkpoint_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2026-01-02T00:00:00Z",
  "updated_at": "2026-01-02T00:00:05Z",
  "lora_config": {
    "rank": 32,
    "alpha": 64,
    "train_unembed": true
  },
  "model_resources_id": "123e4567-e89b-12d3-a456-426614174000",
  "base_model": "Qwen/Qwen3-0.6B",
  "created_by": "user_123"
}

Changes

Changed in 7 of the 14 revisions of this API.4425

    • added the new optional request property load_optimizer

      new-optional-request-property

    • added the optional property inference_checkpoints/items/registration/adapter_object_id to the response with the 200 status

      response-optional-property-added

    • added the optional property inference_checkpoints/items/registration/adapter_object_revision_id to the response with the 200 status

      response-optional-property-added

    • added the optional property inference_checkpoints/items/registration/model_object_id to the response with the 200 status

      response-optional-property-added

    • added the optional property inference_checkpoints/items/registration/model_object_revision_id to the response with the 200 status

      response-optional-property-added

    • added the optional property training_checkpoints/items/registration to the response with the 200 status

      response-optional-property-added

    • added the new optional request property lora_config/train_unembed

      new-optional-request-property

    • added the optional property lora_config/train_unembed to the response with the 200 status

      response-optional-property-added

    • added the new optional request property lora_config/seed

      new-optional-request-property

    • added the optional property lora_config/seed to the response with the 200 status

      response-optional-property-added

    • added the required property base_model to the response with the 200 status

      response-required-property-added

    • added the new optional request property display_name

      new-optional-request-property

    • added the new optional request property metadata

      new-optional-request-property

    • added the optional property display_name to the response with the 200 status

      response-optional-property-added

    • added the required property metadata to the response with the 200 status

      response-required-property-added

  • 9ccc57e5e4b912See the full diff
    • the response property lora_config became optional for the status 200

      response-property-became-optional

    • removed the request property lora_config/enable

      request-property-removed

    • removed the optional property lora_config/enable from the response with the 200 status

      response-optional-property-removed

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 0c4fdad774353210See the full diff
    • the lora_config/alpha response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the lora_config/dropout response's property type/format changed from number/float to number/ for status 200

      response-property-type-changed

    • the lora_config/rank response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • removed the request property optimizer_config

      request-property-removed

    • removed the optional property optimizer_config from the response with the 200 status

      response-optional-property-removed

    • the alpha request property default value changed from 16 to 64

      request-property-default-value-changed

    • the dropout request property default value changed from 0.05 to 0.0

      request-property-default-value-changed

    • the rank request property default value changed from 8 to 32

      request-property-default-value-changed

    • the lora_config/alpha request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the lora_config/dropout request property type/format was generalized from number/float to number/

      request-property-type-generalized

    • the lora_config/rank request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the alpha response's property default value changed from 16 to 64 for the status 200

      response-property-default-value-changed

    • the dropout response's property default value changed from 0.05 to 0.0 for the status 200

      response-property-default-value-changed

    • the rank response's property default value changed from 8 to 32 for the status 200

      response-property-default-value-changed

    • added the required property created_by to the response with the 200 status

      response-required-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog