Skip to main content
Hosted SFT is in beta. Contact Prime support if dispatch is refused.
Run 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

Requires 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].name path (Volume-hosted models).
  • A Hugging Face dataset you can download with hf download — with prompt/completion or messages columns (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:
Inside the session:
Back in your local terminal, stop the session using the ID printed when it opened:
Wait for its final sync before dispatching. Exiting SSH alone leaves the read-write session open and blocks the training run. The trainer sees the volume at /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 as sft.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.
Instead of a cached model ID, [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

Use the run ID your dispatch printed (<runId>) below. The run moves PENDING → CREATING → RUNNING → COMPLETED — expect roughly three minutes on one H200 for this walkthrough.

5. Watch it run

Ten steps on a 0.6B model with a constant LR will not descend cleanly — the point is a visible, NaN-free curve. Occasionally the last metrics row lands during teardown; terminal status and the trainer’s final log lines are the success signal. Teardown is automatic. The step-10 checkpoint and the datasets/ folder stay on the volume. Wait for the run to end and the final volume sync to complete before downloading its checkpoint:
(Usage accounting shows 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:
Sizing: inference GPUs come out of the same allocation as the trainer, so 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.
Eval metrics land on the run’s dashboard next to the loss curve, and each component gets its own log tab (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

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.
The inference pool exists only to serve online-eval rollouts, so it needs an [eval] block to go with it.
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.
Real data needs a volume. data.type = "fake" is the one no-volume path (synthetic data, connectivity smoke test).
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).
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/completion or messages columns.
  • 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].name path.
  • 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, then prime 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.