Basic Configuration#
Below is a complete reference for the core configuration parameters shared across all RLinf workloads. Every important key in the YAML is documented so that you can confidently adapt the file to your own cluster, model, or research ideas. Parameters are grouped exactly by their top-level key.
This section covers the fundamental GPU and cluster configuration that applies to both embodied and agentic training. For task-specific configuration, see Embodiment Configuration and Agentic RL Configuration.
hydra#
hydra:
run:
dir: .
output_subdir: null
Parameter |
Description |
|---|---|
|
Working directory for Hydra runs. |
|
Output subdirectory ( |
cluster#
cluster:
num_nodes: 1
component_placement:
actor,inference,rollout: all
Parameter |
Description |
|---|---|
|
Physical nodes to use for training. |
|
The placement strategy for each component. Each line is a
|
The ranks value accepts the following forms:
Value |
Meaning |
|---|---|
|
Use all accelerators in the cluster. |
|
A single integer: use accelerator 3. |
|
A comma-separated list: use accelerators 0, 2, and 3. |
|
A hyphenated range: use accelerators 0, 1, 2, and 3. |
|
A combination: use accelerators 0, 1, 2, 3, 5 (node 0), and 14 (accelerator 6 on node 1). |
For more advanced usage of component placement (e.g., heterogeneous cluster with different GPU models, robotic hardware, or CPU-only nodes) and customization in code, see Worker Placement Strategy.
runner#
runner:
task_type: math
logger:
log_path: ${runner.output_dir}/${runner.experiment_name}
project_name: rlinf
experiment_name: ${runner.experiment_name}
logger_backends: ["tensorboard"] # wandb, swanlab
max_epochs: 5
max_steps: -1
val_check_interval: 1
save_interval: 50
seq_length: 2048
resume_dir: null
experiment_name: grpo-1.5b
output_dir: ../results
Parameter |
Description |
|---|---|
|
Task type identifier ( |
|
Base directory for log files. |
|
Project name for experiment tracking. |
|
Specific experiment name. |
|
List of logging backends ( |
|
Maximum number of training epochs. |
|
Maximum training steps. If set to |
|
How often to launch a validation rollout ( |
|
Checkpoint frequency in trainer steps. |
|
Total sequence length (prompt + generated response) fed into models. |
algorithm#
algorithm:
group_size: 2
logprob_forward_micro_batch_size: 1
val_rollout_batch_size_per_gpu: 4
loss_type: ppo
loss_agg_func: "token-mean"
kl_beta: 0.0
kl_penalty_type: low_var_kl
ratio_clip_eps: 0.2
entropy_bonus: 0.0
calculate_entropy: False
clip_ratio_c: null
adv_type: grpo
normalize_advantages: True
early_stop_imp_ratio: 5.0
use_valid_token_scale: False
sampling_params:
do_sample: True
temperature: 1.0
top_k: 1000000
top_p: 1.0
repetition_penalty: 1.0
Parameter |
Description |
|---|---|
|
Responses per prompt (set > 1 to enable group baselines). |
|
Micro-batch size for log-prob forward passes. |
|
Validation rollout micro-batch per GPU. |
|
Policy loss type (e.g., |
|
How to aggregate token losses (e.g., |
|
Weight of the KL penalty added to rewards. |
|
KL shaping variant (e.g., |
|
PPO clipping epsilon for importance ratios. |
|
Entropy reward coefficient. |
|
Whether to compute/persist entropy terms. |
|
Dual-clip constant for the pessimistic PPO bound ( |
|
Advantage estimator type (e.g., |
|
Normalize advantages across the batch. |
|
Stop an update early if ratios exceed this threshold. |
|
Scale losses/advantages by valid-token masks. |
|
Deterministic decoding if False. |
|
Softmax temperature during sampling. |
|
Top-k cutoff (use a very large value to disable). |
|
Nucleus sampling threshold. |
|
Penalize repeated tokens. |
rollout#
rollout:
group_name: "RolloutGroup"
gpu_memory_utilization: 0.55
model:
model_path: ../../model/DeepSeek-R1-Distill-Qwen-1.5B/
model_type: qwen2.5
recompute_logprobs: True
Parameter |
Description |
|---|---|
|
Logical name for rollout/inference workers. |
|
Target GPU memory utilization fraction. |
|
Path to the HF model used by the generation backend. |
|
Internal architecture tag used by the backend (e.g., |
|
Recompute log-probs for sampled sequences. |
actor#
actor:
group_name: "ActorGroup"
model:
megatron_checkpoint: null
seed: 1234
Parameter |
Description |
|---|---|
|
Logical name for the training (actor) workers. |
|
Path to a Megatron model checkpoint to load before training. |
|
Global seed for reproducibility. |
reward#
reward:
use_reward_model: false
Parameter |
Description |
|---|---|
|
Whether to use a reward model. |
critic#
critic:
use_critic_model: false
Parameter |
Description |
|---|---|
|
Whether to use a critic model. |