Hosted SFT is in beta. Contact Prime support if dispatch is refused.
prime-rl supervised fine-tuning on Prime’s hosted GPU clusters: create a volume, copy your dataset onto it over SSH, dispatch. No kubectl, no cluster credentials — the trainer reads the dataset from the volume.
This walkthrough fine-tunes a small Qwen3 model to reverse text (reverse-text) on one GPU. For SFT on your own infrastructure, see Training.
Prerequisites
prime CLI v0.9.0 or later.
- A Prime account with hosted training access — Prime-side enablement; the platform deployment needs the hosted SFT path switched on.
- A base model the run can boot from: in the model cache (check with
prime train models), or weights already on the volume itself via a/volume/...[model].namepath (Volume-hosted models).
- A Hugging Face dataset you can download with
hf download— withprompt/completionormessagescolumns (Training § Dataset Format).
1. Create a volume
Size the volume for your dataset plus the checkpoints the run keeps on its disk. A checkpoint is about 11–12 bytes per parameter: the 0.6B smoke run writes ~7.2 GB. See Choose a size. Grow it with
prime volumes expand <name> --size <size>.2. Put the dataset on the volume
Open a shell on the volume and download the dataset onto it. The download uses the cluster’s network, not your laptop’s. Shells need a cluster allocation or a cluster your team owns and your primary SSH key:/volume, the same path you see in the shell. Without one, download the dataset to your machine and upload it instead: prime volumes put <name> ./my-data datasets/ creates datasets/my-data (paths start at the volume root, and a trailing / means “into this folder”). In the config, data.name accepts either form: a path relative to the volume (datasets/my-data) or the absolute mount path (/volume/datasets/my-data) — the platform resolves both to the same location.
3. Write the config
Save this assft.toml — data.name points at the dataset on the volume (relative to the volume root; absolute /volume/... paths work too):
output_dir is injected by the platform — omit it. The walkthrough model is a cached debug sibling already fine-tuned on this dataset — treat the loss curve as a smoke test of the hosted path.This walkthrough is trainer-only. To score checkpoints against an environment while the run trains, see Online evals below.[model].name can point at HF-format weights already on the volume, uploaded with prime volumes put. RL configs support volume model paths too. Run checkpoints are in prime-rl’s distributed format, so export them to HF format before using them as [model].name — or resume the full training state by pointing [resume].dir at the checkpoint’s step directory on the volume (dir = "/volume/runs/<runId>/checkpoints/step_<N>"). See Volume-hosted models.
4. Dispatch
<runId>) below. The run moves PENDING → CREATING → RUNNING → COMPLETED — expect roughly three minutes on one H200 for this walkthrough.
5. Watch it run
datasets/ folder stay on the volume.
Wait for the run to end and the final volume sync to complete before downloading its checkpoint:
0 tokens / $0.00 for SFT — a reporting quirk, not free usage.)
Online evals
Add an[eval] block to score checkpoints against an environment while the run trains. The platform then runs an inference server alongside the trainer, which broadcasts its weights to it at each eval interval, plus one env server per eval source:
num_train_gpus + num_infer_gpus must fit gpus_per_node on a single node. On multi_node, set num_infer_nodes to at least 1 and add an [inference.router] block.
prime train logs <runId> --component inference). The run stays RUNNING until the evals triggered by the final checkpoint have drained, so expect it to outlast the last trainer step.
Online evals need a cluster on prime-rl-fft 0.24.0 or newer; dispatch is rejected with a clear error otherwise. Weight transport defaults to NCCL when
[inference] is set, and to filesystem for LoRA runs. Traces are not yet wired for SFT eval rollouts.Troubleshooting
Online evals rejected at dispatch
Online evals rejected at dispatch
The cluster’s chart predates online-eval support. Remove the
[eval] block to run trainer-only SFT, or ask Prime support when the cluster will be upgraded.[inference] without [eval]
[inference] without [eval]
The inference pool exists only to serve online-eval rollouts, so it needs an
[eval] block to go with it.Model not available on this cluster
Model not available on this cluster
Hosted SFT boots from the cluster model cache. Check
prime train models, or ask Prime support to cache the model. If the weights are already on the volume, point [model].name at their /volume/... path instead — no cache entry is needed.data.name requires --volume
data.name requires --volume
Real data needs a volume.
data.type = "fake" is the one no-volume path (synthetic data, connectivity smoke test).Dataset missing on the volume
Dataset missing on the volume
The trainer reads
data.name from the volume mount — a path that is empty or missing fails at startup. Re-run step 2 and check the name matches: the directory you create under /volume/datasets/<name> in the SSH session is exactly the datasets/<name> you point data.name at (relative paths resolve under /volume, so datasets/<name> and /volume/datasets/<name> are the same location).Volume ran out of space during download
Volume ran out of space during download
Inside the shell,
hf download fails when the session’s disk is full. Exit, end the session, grow the volume, and re-run the download in a new session:Limitations
- Requires CLI v0.9.0+ — older versions misroute SFT configs against the RL schema.
- SFT-shaped datasets —
prompt/completionormessagescolumns. - Cached or volume-hosted models — a cached HF id (
prime train models; support can add others), or weights on the volume via a/volume/...[model].namepath. - Online evals need chart 0.24.0+ — on older clusters SFT is trainer-only and
[eval]is rejected. No traces for eval rollouts yet. - Checkpoints live on the volume — use
prime train checkpoints <runId>to list saved checkpoints, thenprime volumes get research runs/<runId>/checkpoints/to download them after sync.
Scaling up
The same flow carries to multi-node — switch[deployment] to multi_node and add the parallelism knobs. Save as glm53-sft.toml:
This config targets 8×8 H200 (64 GPUs) — 4 steps take ~5.5 min on that hardware. If you adapt it: remove
force_balanced_routing — it forces round-robin expert routing and is debug-only; with warmup_steps = 50 a 4-step run never leaves warmup, so losses are warmup-dominated rather than convergence; the [ckpt] block saves one checkpoint at step 4, so size the volume for it (about 11–12 bytes per parameter, see Choose a size); with this linear schedule the LR ramps to its peak at step 50 — expect a transient loss spike near the peak before it settles (9.42 at step 55 in a 60-step run). See Scaling and Advanced for the knobs.Hosted RL
RL-style full-parameter training on a dedicated cluster — same CLI, same dashboard.
prime-rl Training
The underlying SFT trainer: config schema, dataset format, and local runs.