npx skills add ...
npx skills add huggingface/prime-rl --skill toml-config
How to write and use TOML configs in prime-rl. Use when creating config files, running commands with configs, or overriding config values via CLI.
npx skills add huggingface/prime-rl --skill toml-config
All prime-rl commands use pydantic_config (tyro-backed) with TOML configs and CLI overrides.
Top-level fields must come before any [section] header — this is a TOML rule.
Putting a top-level field after a section header nests it inside that section, which causes validation errors.
Use the string "None" in TOML to set a field to None:
Both rl and sft commands support SLURM execution via an optional [slurm] section. When present, the run is submitted as a SLURM job instead of running locally.
SLURM configs are composed with the base config via CLI:
When [slurm] is set for RL:
output_dir must be explicitly set (the default outputs is rejected)SFT deployment follows the same pattern as RL:
[deployment] configures node/GPU allocation (single_node default or multi_node)[slurm] configures SLURM submission (job name, partition, template)output_dir must be explicitly set when using SLURM[slurm] to be setAll accept @ config.toml and CLI overrides:
| Command | Config class | Description |
|---|---|---|
uv run rl | full RL pipeline | Orchestrator + inference + trainer (local or SLURM) |
uv run inference | InferenceConfig | vLLM inference server |
uv run trainer | trainer config | RL trainer |
uv run orchestrator | orchestrator config | Rollout orchestrator |
uv run env-server | env server config | Environment server |
uv run sft | SFT config | Supervised fine-tuning (local or SLURM) |
src/prime_rl/utils/config.py — BaseConfig, cli, get_all_fieldssrc/prime_rl/entrypoints/rl.py — unified RL entrypoint (local + SLURM)src/prime_rl/configs/rl.py — RLConfig, SlurmConfig, DeploymentConfigsrc/prime_rl/entrypoints/sft.py — unified SFT entrypoint (local + SLURM)src/prime_rl/configs/sft.py — SFTConfigconfigs/ — all config files, organized by task