> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primeintellect.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Volume-hosted models

> Train from model weights stored on your volume instead of the model cache

> [!NOTE]
>
> Volume-hosted models are part of the [Volumes](https://docs.primeintellect.ai/hosted-training/volumes.md) beta.

Hosted pretrain, SFT and RL runs can start from Hugging Face-format weights on a [volume](https://docs.primeintellect.ai/hosted-training/volumes.md), including private models and weights exported from your own fine-tunes. Point `[model].name` at their absolute `/volume/...` path and attach the volume. No model-cache entry is needed. Pretraining reads only the model directory's config and tokenizer, never its weights — any complete model directory of the target architecture works as the base.

Use this for:

* **Weights that aren't on Hugging Face**, such as private or proprietary checkpoints.
* **Continuing your own fine-tunes** from weights you exported to Hugging Face format.

## Quick start

Create a volume and upload a complete Hugging Face model directory, including `config.json`, safetensors weights, and tokenizer assets:

```bash theme={null}
prime volumes create research
prime volumes put research ./qwen3-hf models/
```

Point the config at them:

```toml theme={null}
mode = "sft"
max_steps = 100

[ckpt]
interval = 50
keep_last = 2

[model]
name = "/volume/models/qwen3-hf"      # Qwen3 weights at this path

[data]
name = "datasets/my-dataset"          # the dataset can live on the same volume
type = "sft"
seq_len = 4096

[deployment]
num_train_gpus = 1

[renderer]
name = "prime-qwen3"                  # match the staged model's family
```

Launch with the volume:

```bash theme={null}
prime train sft.toml --volume research
```

Size `[deployment]` for your model as described in [Hosted SFT](https://docs.primeintellect.ai/hosted-training/hosted-sft.md#3-write-the-config). This example uses Qwen3 weights; choose the renderer for your model family.

## Use the model in an RL run

Start with a complete [RL training config](https://docs.primeintellect.ai/hosted-training/end-to-end-run.md#step-4-create-a-training-config) and replace its shared model name:

```toml theme={null}
[model]
name = "/volume/models/qwen3-hf"

[orchestrator.renderer]
name = "prime-qwen3"
```

The shared name supplies the trainer, orchestrator, and inference model. If your config overrides model names for individual roles, change those names to the same directory too. Then launch with `prime train config.toml --volume research`.

Set the renderer explicitly for the model family. A filesystem path cannot identify the family from a Hugging Face model ID; the Qwen3 example above uses `prime-qwen3`.

RL configs with `[trainer]` and `[orchestrator]` blocks support volume model paths; a cached Hugging Face ID is not required for these paths.

## Rules

| Requirement | Rule |
| - | - |
| Volume required | The run must use the volume: `--volume <name>`, or `volume = "<name>"` in the config. |
| Path | Starts with `/volume/` and has at least one folder after it. Relative paths don't work here, unlike `data.name`. |
| Path characters | Each part starts with a letter or digit, followed by letters, digits, `.`, `-`, or `_`. `.` and `..` aren't allowed. |
| Weight format | A complete Hugging Face model directory, including config, weights, and tokenizer assets. A sharded training checkpoint is not a model directory: see [below](#continue-from-a-previous-runs-checkpoint). |
| Model cache | Not used, and not checked. |

The whole volume is mounted read-write, including earlier `runs/` directories. The trainer writes weight conversions to scratch space rather than overwriting the source model.

## Continue from a previous run's checkpoint

Run checkpoints are in prime-rl's sharded format, so they can't be used directly as `[model].name`. [Export a checkpoint to Hugging Face format](https://docs.primeintellect.ai/hosted-training/end-to-end-run.md#export-to-hf-format), upload the exported directory under `models/`, and use its `/volume/models/...` path for a new SFT or RL run.

Starting from exported weights begins a new run; it does not restore the previous optimizer or training step. To resume the full training state, set `[resume].dir` to the checkpoint's step directory in the run TOML:

```toml theme={null}
[resume]
dir = "/volume/runs/<runId>/checkpoints/step_<N>"
```

## See also

* [Volumes](https://docs.primeintellect.ai/hosted-training/volumes.md): create, upload, and download.
* [Hosted SFT](https://docs.primeintellect.ai/hosted-training/hosted-sft.md): the walkthrough this builds on.
* [Hosted RL](https://docs.primeintellect.ai/hosted-training/hosted-rl.md): RL configs and dispatch options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.