Skip to main content
Upload PEFT-trained LoRAs for supported base models. After upload, give the LoRA a name and pass that name or ID in request metadata. If you train LoRAs with Tinker, you can also sample directly from Tinker checkpoints without uploading. See Tinker.

Supported base models

LoRA serving is available for: If a LoRA is incompatible with the base model or exceeds the rank limit, validation or inference fails.

Adapter requirements

Train with PEFT and export the two standard files:
  • adapter_config.json
  • adapter_model.safetensors
Use adapter config values compatible with the base model:
  • base_model_name_or_path should identify the base model you register in supported_models (e.g. moonshotai/Kimi-K2.6).
  • peft_type should be "LORA".
  • task_type should be "CAUSAL_LM".
  • r (rank) must be no more than the base model’s max rank.
  • target_modules can include any modules supported by the base model and runtime. Sail does not restrict Kimi K2.6 LoRAs to a fixed target-module allowlist.
Other adapter-config fields (lora_alpha, lora_dropout, bias settings, etc.) are preserved as-is. The adapter_config.json and adapter_model.safetensors files can each be up to 100 GiB.

Add a LoRA

Create a LoRA in three steps: upload the config file, upload the weights file, then call POST /v1/loras. The response includes validation records for each requested model.

1. Upload the two adapter files

Use POST /v1/files (multipart):

2. Create the LoRA

Each supported_models entry must be a known Sail model ID.
  • New registrations require LoRA support for every model. POST /v1/loras rejects an unsupported entry with HTTP 400, code lora_not_supported_for_model, and param supported_models[i].
  • Adding a model requires LoRA support. PATCH /v1/loras/{name} applies the same check to newly added supported_models entries. You can retain an existing unsupported entry unchanged, remove it, or edit the adapter’s other details.
Naming rules for the name field:
  • 2 to 64 characters
  • lowercase alphanumeric or dashes ([a-z0-9-])
  • must start and end with an alphanumeric character
  • unique within your organization (duplicate → 409)
The file IDs you pass must belong to the same organization as your API key.

Validation flow

POST /v1/loras creates one validation record per supported_models entry. Each record appears in the response under validations:
Sail validates the LoRA on each model in supported_models. Poll GET /v1/loras/{name} until validation finishes for the model you want to use. Read validations for model-specific status. For a base model that supports LoRA serving, the latest failed validation blocks requests using that adapter and model. Records that are pending, running, or unverified do not block requests. A successful adapter validation does not establish that Sail currently supports LoRA serving for the base model. If you later add a model with PATCH /v1/loras/{name}, Sail creates validation records for newly added models that have not already succeeded validation.

3. Fetch LoRAs

Use a LoRA

Pass the LoRA’s name (or its UUID) as metadata.lora on any Responses, Chat Completions, or Messages request. model must be one of the LoRA’s supported_models:
Chat Completions:

Unsupported models

The selected base model must support LoRA serving, whether you use an uploaded adapter or a Tinker checkpoint. If it does not, Sail returns HTTP 400 before inference starts: Remove the LoRA options to use the base model, or choose a model with LoRA support. Retrying the unchanged request will return the same rejection.

Constraints on LoRA requests

  • Use the balanced or flex completion window for Kimi K2.6 LoRA requests. SailTokenCompleter uses balanced by default. asap is not available for LoRA requests. For more on completion windows, see Completion Windows.
  • model must be in the LoRA’s supported_models list. Requesting a different base model returns 400.
  • A failed model validation blocks that model. GET /v1/loras/{name} includes validations[].result_message when validation fails.
  • The LoRA must belong to your organization. Names are scoped per-org: two orgs can independently own a LoRA called funnier-v1.
  • You can use either the LoRA’s name or its UUID in metadata.lora.