Add and deploy a model
Once a model is in your project’s registry, deploy it for inference:adaptive.models.add_to_project(model="llama-3.1-8b-instruct")
adaptive.models.deploy(model="llama-3.1-8b-instruct", wait=True)
# Or use attach() to do both in one call
adaptive.models.attach(model="llama-3.1-8b-instruct", wait=True)
| Parameter | Type | Required | Description |
|---|
model | str | Yes | Model key from the registry |
wait | bool | No | Block until model is online (default: False) |
make_default | bool | No | Set as default model for the project |
The model becomes available within a few minutes.Import from Hugging Face
For models not in the Adaptive catalog, import from Hugging Face directly:adaptive.models.add_hf_model(
hf_model_id="meta-llama/Llama-3.1-8B-Instruct",
output_model_name="My Llama 3.1 8B",
output_model_key="my-llama-3.1-8b",
hf_token="hf_...",
)
| Parameter | Type | Required | Description |
|---|
hf_model_id | str | Yes | Full HF model ID (must be in the supported list) |
output_model_name | str | Yes | Display name for the imported model |
output_model_key | str | Yes | Key for the imported model in the Adaptive registry |
hf_token | str | Yes | Hugging Face access token with read permission |
compute_pool | str | No | Compute pool to run the import job |
Import runs as an asynchronous job — the model appears in the registry once conversion finishes.Catalog import (the recommended path) is currently UI-only. Open the Add Model dialog in your project and pick Import from Adaptive ML’s catalog.
A training run saves snapshots at configurable intervals (see checkpoint_frequency). Any saved checkpoint can be promoted to a standalone model in the registry, then evaluated or deployed like any imported model.Promotion is currently UI-only — open a run and pick Promote checkpoint on a saved checkpoint. SDK support uses the underlying GraphQL mutation directly:from adaptive_sdk.graphql_client import PromoteCheckpointInput, CheckpointModelPromotionInput
job = adaptive._gql_client.promote_checkpoint(
input=PromoteCheckpointInput(
artifact_id="<checkpoint-artifact-uuid>",
models=[CheckpointModelPromotionInput(
model_key="<source-model-key-in-checkpoint>",
name="my-grpo-step-800",
)],
)
)
Promotion runs as an asynchronous copy job. Promoted models retain full provenance back to the source run.LoRA backbone footgun: when you promote a LoRA checkpoint, the platform records the backbone reference in the model’s metadata but does not automatically attach the backbone to your project. If the backbone isn’t already in the project, inference against the promoted LoRA fails with a “model not found” error. Add the backbone with add_to_project before deploying.
See SDK Reference for all model methods.