Files
prime-rl/CHANGELOG.md
T
5448f5a722
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
feat: opt-in fp32 MoE routing (trainer gates + inference router logits) (#2952)
* feat(trainer): fp32 MoE router gates via model.moe_router_dtype

Add model.moe_router_dtype = "float32" to run MoE router gates in fp32,
matching checkpoints trained with fp32 routing (e.g. GLM-5.x via Megatron's
--moe-router-dtype fp32):

- router gate weights are cast to fp32 and exempted from the FSDP bf16
  parameter cast via a nested fully_shard unit with an fp32 mp policy
  (gradients also reduce in fp32)
- TokenChoiceTopKRouter upcasts the gate GEMM input to fp32, so routing
  logits are fp32 end-to-end in forward and backward (NemotronHRouter
  already computes in fp32; it only needed the weight exemption)
- router FSDP units join the manual EP prefetch schedule

Default "bfloat16" preserves current behavior exactly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(inference): fp32 MoE router logits for DeepSeek-family models

Add inference.enable_fp32_router_logits (default off): sets
out_dtype=float32 on vLLM's DeepseekV2MoE gate via a monkey patch, so the
bf16xbf16 gate GEMM writes its fp32 accumulator out unrounded instead of
truncating router logits to bf16 before expert scoring (GateLinear's
cuBLAS tier on SM90+). Covers GLM-5.x (glm_moe_dsa), which was trained
with fp32 routing; pairs with trainer.model.moe_router_dtype="float32".

Unlike upstream's full fp32 gate (vllm-project/vllm#47410, not in the
pinned release), the gate weight stays bf16, so the LoRA Triton kernel
dtype assert and the bf16 weight-broadcast path are unaffected. Follows
the fp32_lm_head pattern: flag flows through additional_config and the
patch self-gates at model construction. No-op when something else (e.g.
the ROCm AITER branch) already set an out_dtype.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: default fp32 MoE routing on (trainer + inference)

Flip model.moe_router_dtype to "float32" and
inference.enable_fp32_router_logits to true by default. Routing logits
are no longer rounded to bf16 anywhere: custom-impl MoE trainers run
fp32 gate weights/GEMM, and DeepSeek-family vLLM models emit fp32
router logits. apply_fp32_moe_router is now a silent no-op for non-MoE
and HF-impl models (previously raised), since the default makes absent
custom MoE routers the common case.

Set moe_router_dtype = "bfloat16" / enable_fp32_router_logits = false
to restore the previous numerics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: fares <fares@primeintellect.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 20:16:24 -07:00

53 KiB
Raw Blame History

Changelog

Documenting breaking configuration changes — renamed, removed, or moved fields that require users to update existing configs.

  • fp32 MoE routing enabled by default: trainer.model.moe_router_dtype (new field) defaults to "float32" — custom-impl MoE router gates keep fp32 weights through forward/backward (exempt from the FSDP bf16 cast) and compute the gate GEMM and routing logits in fp32. inference.enable_fp32_router_logits (new field) defaults to true — DeepSeek-family models served by vLLM (incl. GLM-5.x) emit fp32 router logits via out_dtype=float32 on the gate. Both change MoE numerics for existing runs (routing logits are no longer rounded to bf16; near-tie expert selections can differ). Set moe_router_dtype = "bfloat16" / enable_fp32_router_logits = false to restore the previous behavior. Non-MoE and HF-impl models are unaffected. (2026-07-04)
  • [[orchestrator.train.env]].ratio now defaults to 1 and no longer accepts unset/None: Each train env's sampling weight defaults to 1 (equal weight per env) instead of None. The None-for-all-envs mode — which sampled proportional to each env's dataset size (the "natural task distribution") — is removed, along with the all-or-none constraint (any subset of envs may now set ratio; the rest default to 1). Multi-env configs that relied on the old default now sample each env equally rather than proportional to dataset size; set each env's ratio explicitly to restore a proportional (or any other) mix. (2026-07-02)
  • orchestrator.algo.length_penalty restructured to a single linear shape; tokens/turns length penalties removed: The grpo-family length penalty keeps the [orchestrator.algo.length_penalty] key but is collapsed to a single type = "linear" shape; the discriminated type = "tokens" | "turns" efficiency-shaping variants (and the efficiency_shaping helper) are removed. The linear penalty subtracts a pass_rate-scaled penalty from each reward before the GRPO baseline, summing three terms — num_output_tokens_weight × output tokens, num_input_tokens_weight × input (non-output) tokens, and num_turns_weight × turns — each normalized by the group's own max for that quantity. Field renames within the penalty: coef → num_output_tokens_weight (default 0.25), context_coef → num_input_tokens_weight (default 0.1), turns_coef → num_turns_weight (default 0.1); the gate_by_correctness flag is removed. extra="forbid" rejects the old keys, so existing configs must migrate. (2026-06-29)
  • model.fused_lm_head_token_chunk_size "auto" option removed: The "auto" value is no longer accepted. Use an explicit integer (e.g. 8192) or "disabled". The "auto" value previously resolved to 8192 for RL training — set fused_lm_head_token_chunk_size = 8192 explicitly to get the same behavior.
  • Memory-saving defaults enabled: trainer.model.ac, trainer.model.ac_offloading, trainer.model.compile, trainer.model.optim_cpu_offload, and trainer.model.fused_lm_head_token_chunk_size are now enabled by default to provide sane memory-efficient defaults out of the box. Specifically: ac defaults to ActivationCheckpointConfig() (full mode), ac_offloading defaults to ActivationOffloadingConfig(), compile defaults to CompileConfig() (fullgraph=false), optim_cpu_offload defaults to true, and fused_lm_head_token_chunk_size defaults to 1024. SFT training silently disables fused_lm_head_token_chunk_size (sets it to "disabled"). Configs using max_concurrent_runs > 1 must explicitly set optim_cpu_offload = false. To disable any of these, set the field to None / "None" / false / "disabled" as appropriate.
  • model.ep defaults to "auto": The ep field type changed from int to int | Literal["auto"], defaulting to "auto". At trainer startup, resolve_ep() checks if the model is MoE (via AutoConfig); if so, it resolves to min(fsdp_island_size, 8) where fsdp_island_size = world_size // dp_replicate. For non-MoE models, "auto" resolves to 1 (no-op). Set ep to an explicit integer to override.
  • verifiers v1 training integration (collection of removals/renames). The orchestrator now trains against a v1 env server returning vf.Trace rollouts, renderer-only, with a unified token schema.
    • [[orchestrator.train.env]] is now a v1 vf.EnvServerConfig: a v1 env is taskset = { id = "<id>" } + harness = { id = "default", runtime = { type = "subprocess" } }. A bare id = "<id>" (optionally with args) runs the v0 env through the verifiers legacy bridge — old flat id/args-only configs keep working as legacy envs; v1 envs must use the taskset/harness shape.
    • orchestrator.train.env no longer defaults to a reverse-text env: the default is now empty ([]), so configs must declare [[orchestrator.train.env]] explicitly.
    • ...env[].num_workers → pool: per-env worker sizing moves to a pool config (static/elastic). Back-compat: num_workers = N maps to pool = { type = "static", num_workers = N } and "auto" to the default elastic pool; the group-level orchestrator.train.num_workers / orchestrator.eval.num_workers are removed.
    • orchestrator.renderer is now required (MITO removed): it was RendererConfig | None, where renderer = None selected the MITO path; training is now renderer-only, so renderer is non-optional. Drop renderer = None / renderer = "None".
    • ...client.timeout / ...client.connect_timeout removed: the v1 rollout client manages its own timeouts. Drop these from [orchestrator.student.client] and [orchestrator.teacher.client]. (2026-06-23)
  • orchestrator.advantage length-penalty overhaul + length-weighted baseline: length_penalty is now a single shape — a linear penalty that subtracts coef * pass_rate * (model completion tokens / orchestrator.seq_len) from each reward before the baseline subtraction (pass_rate = group mean reward, so solved-often problems get the strongest concision pressure and never-solved groups get none), with an optional gate_by_correctness flag (default false) that restricts the penalty to correct rollouts (reward == 1). The previous discriminated type = "tokens" | "turns" efficiency-shaping variants and the per-penalty max_length field have been removed — configure [orchestrator.advantage.length_penalty] with coef (and optionally gate_by_correctness) instead; the denominator is always orchestrator.seq_len. Also adds orchestrator.advantage.length_weighted_baseline (default false): when enabled, the GRPO baseline is the token-length-weighted mean reward (sum(len_i * reward_i) / sum(len_i)) instead of the plain mean. (2026-06-03)
  • trainer.experimental.token_export removed → trainer.enable_token_export: TrainerExperimentalConfig and the [trainer.experimental] token_export = true setting have been removed with no migration alias. Existing trainer configs must delete the [trainer.experimental] block and set the new top-level trainer flag instead: enable_token_export = true in a trainer config file, or trainer.enable_token_export = true when nested under [trainer] in an RL config. The trainer entrypoint CLI flag is --enable-token-export. (2026-06-10)
  • inference.kv_cache_offload.cpu_bytes removed → discriminated type config: The flat [inference.kv_cache_offload] block with a single cpu_bytes field is replaced by a backend-discriminated union with composable cpu/disk tiers. Migrate native CPU offload from [inference.kv_cache_offload]\ncpu_bytes = N to [inference.kv_cache_offload]\ntype = "native" plus [inference.kv_cache_offload.cpu]\nnum_bytes = N. A type = "mooncake" backend (per-node distributed store; multi-node/SLURM only) and an optional [inference.kv_cache_offload.disk]\npath = "..." tier (layered behind cpu) are also available. extra="forbid" rejects the old cpu_bytes key, so existing configs must migrate. (2026-06-02)
  • Orchestrator async-pipeline rewrite (collection of removals/renames). The orchestrator was rewritten to overlap train/eval rollouts on a shared concurrency limiter; several config fields were removed or renamed.
    • orchestrator.seed removed: was only consumed by the deleted buffer; no replacement.
    • orchestrator.eval.eval_base_model → orchestrator.eval.skip_first_step (semantics inverted): eval_base_model = true becomes skip_first_step = false (the default — run the step-0 eval before any train rollouts). No alias; configs setting eval_base_model must rename.
    • orchestrator.eval.skip_eval_on_resume (and its alias skip_eval_on_restart) removed: folded into skip_first_step. Resume no longer re-fires an already-completed eval (deduped via per-env last-eval-step tracking in the checkpointed progress).
    • orchestrator.eval.cancel_inflight_rollouts_on_eval removed: the drain-switch overlap (stop scheduling new train, let in-flight train drain while eval queues) is now the only eval transition mode.
    • ckpt.skip_buffer removed: there is no buffer to skip.
    • [orchestrator.buffer] removed (difficulty pools): the whole block and every key (seed, easy_threshold, hard_threshold, easy_fraction, hard_fraction, online_difficulty_filtering, hash_keys) are gone, with no alias — extra="forbid" rejects the block, so existing configs must delete it. To preserve online_difficulty_filtering = true, enforce the zero-advantage pre-batch filter: [[orchestrator.pre_batch_filters]]\ntype = "zero_advantage"\nenforce = true.
    • orchestrator.filters → orchestrator.post_batch_filters (renamed, no alias): existing configs setting [[orchestrator.filters]] must rename to [[orchestrator.post_batch_filters]] (extra="forbid" rejects the old key). A new pre_batch_filters list is also available. Filters are train-only now — eval rollouts are no longer filtered.
    • orchestrator.max_off_policy_steps now also applies to eval (behavior change, field unchanged): eval rollouts that fall more than max_off_policy_steps versions behind the policy are cancelled, same as train. (2026-05-29)
  • sampling.min_tokens, sampling.repetition_penalty, sampling.seed removed: Dropped from both TrainSamplingConfig and EvalSamplingConfig (group-level [orchestrator.train.sampling] / [orchestrator.eval.sampling] and per-env [[orchestrator.train.env.sampling]] / [[orchestrator.eval.env.sampling]]). min_tokens suppressed natural EOS, repetition_penalty distorts the on-policy sampling distribution, and seed wasn't pulling its weight — none belonged on the supported config surface. Existing configs setting any of these must delete the field. Hard-deprecation, no migration window. (2026-05-27)
  • wandb.shared removed: The deprecation shim that popped wandb.shared from input dicts with a FutureWarning (introduced in #2649) is gone. The rl entrypoint always uses shared W&B mode now, and existing configs that still set wandb.shared = true (or false) will fail validation. Drop the field from your config. (2026-05-27)
  • max_async_level and strict_async_level removed: The async-execution semantics between trainer and orchestrator are now design invariants, not config knobs. The trainer always runs exactly one step ahead of inference, and the orchestrator always adopts the freshest checkpoint that doesn't violate the one-step barrier. The shared top-level max_async_level, the per-sub-config trainer.max_async_level / orchestrator.max_async_level, and orchestrator.strict_async_level have all been removed. Existing configs setting any of these must drop the field; the previous defaults (max_async_level = 1, strict_async_level = false) match the new hardcoded behavior. Bench mode no longer bypasses the weight-ckpt wait (the int(1e9) workaround is gone) and multimodal/rl_color_codeword_feat_renderer.toml's prior max_async_level = 0 (fully synchronous on-policy) is no longer expressible. (2026-05-25)
  • teacher_inference removed from RL entrypoint: The [teacher_inference] config block and the deployment.num_teacher_gpus / deployment.num_teacher_nodes fields have been removed. The rl entrypoint now only manages the student-policy inference server. External teachers (used by OPD and local-vLLM SFT) must be started manually (e.g. CUDA_VISIBLE_DEVICES=1 uv run inference --model.name <teacher> --server.port 8001 ...) and pointed at via [orchestrator.teacher.client]. Existing configs using [teacher_inference] or deployment.num_teacher_gpus / deployment.num_teacher_nodes must drop those fields and bring up the teacher out-of-band. (2026-05-25)
  • rollouts_per_example → group_size: The orchestrator-level field, the group-level [orchestrator.eval] field, and the per-env [[orchestrator.eval.env]] field have all been renamed. The old name still parses as a validation alias (in both TOML and CLI), so existing configs keep working without changes; new configs should prefer group_size. (2026-05-22)
  • AdvantageInputs / AdvantageOutputs are now per-group, and AdvantageOutputs.advantages is a plain list[float] (second breaking change to this API in three weeks). AdvantageInputs.rollouts is now list[vf.RolloutOutput] (a single group) instead of list[list[vf.RolloutOutput]], and AdvantageOutputs.advantages is now list[float] instead of a 2D Float[Tensor, "num_examples rollouts_per_example"]. compute_advantages calls advantage_fn once per group, which lets partial-group training (groups smaller than rollouts_per_example after rollout errors) round-trip without the previous bucket-by-size workaround. Custom advantage functions must drop the outer list dimension and return a list of floats — e.g. AdvantageOutputs(advantages=(rewards - rewards.mean(dim=1, keepdim=True)).tolist()) becomes AdvantageOutputs(advantages=[r - mean for r in rewards]) (or .tolist() if you keep torch internally). (2026-05-22)
  • [model.vlm] requires orchestrator.use_renderer = true: VLMs must go through the renderer path; the vlm_requires_renderer validator rejects use_renderer = false when [model.vlm] is set. The renderer owns the HF processor per-slot and ships generic mm_kwargs keyed by the model's forward signature. Since use_renderer already defaults to true, most VLM configs need no change. (2026-05-19)
  • First-class training_mode + batch-driven loss dispatch (collection of removals/renames). Loss selection is now driven by TrainingSample.training_mode (rl / opd / sft), set under [orchestrator]. The trainer is mode-agnostic and dispatches per batch.
    • orchestrator.use_sft_loss removed: replaced by [orchestrator] training_mode = "sft". The orchestrator stamps each sample's training_mode and the trainer dispatches to sft_loss_fn per batch.
    • orchestrator.teacher_rollout_model removed (no alias): configs must rename to [orchestrator.teacher] (teacher_model is also accepted as a back-compat alias for teacher). Used in both opd and sft modes; the role is determined by training_mode.
    • orchestrator.model → orchestrator.student: renamed for symmetry with orchestrator.teacher. Legacy [orchestrator.model] and a flat [orchestrator.model.lora]-style layout are aliased via a back-compat shim, so most existing configs still parse. New code should use [orchestrator.student.*].
    • trainer.loss.type = "sft" removed (SFTLossConfig deleted): zero-field discriminator that is now implied by training_mode = "sft". trainer.loss collapsed to a DefaultLossConfig | CustomLossConfig union. Existing configs setting [trainer.loss] type = "sft" must remove that line; the orchestrator-level training_mode = "sft" is enough.
    • trainer.loss.teacher_tau removed from DefaultLossConfig: the teacher-KL term is now exclusive to opd_loss_fn (which inlines teacher_tau = 1.0). default_loss_fn only handles reward-driven RL and no longer accepts a teacher_tau. Configs that set teacher_tau on [trainer.loss] will fail validation — switch to [orchestrator] training_mode = "opd" (which uses opd_loss_fn with the value baked in).
    • trainer.loss only applies to rl-mode batches: opd and sft don't read trainer.loss. opd_loss_fn's knobs (dppo_mask_*, kl_tau) are inlined as literals; tweak them by editing the function. CustomLossConfig overrides the rl-mode loss only — opd and sft always use their dedicated fns. (2026-05-19)
  • orchestrator.use_token_client removed: The server-tokenized TITO path has been deprecated end-to-end. The orchestrator-side config flag (use_token_client), the verifiers client_type (openai_chat_completions_token), and the inference server's /v1/chat/completions/tokens route (along with the OpenAIServingChatWithTokens wrapper) are all gone. The orchestrator now picks between renderer-backed TITO (use_renderer = true, default) and MITO (use_renderer = false, fallback). Existing configs with use_token_client = true must migrate to use_renderer = true (or use_renderer = false for MITO); configs with use_token_client = false can simply drop the field. (2026-05-19)
  • orchestrator.advantage.length_penalty → discriminated sub-config: The scalar length_penalty: Literal["tokens","turns"] | None is replaced by a LengthPenaltyConfig | None discriminated on type. Token shaping now takes weighted completion + tool-response token costs. Migration: length_penalty = "tokens" becomes [orchestrator.advantage.length_penalty]\ntype = "tokens" (default weights completion_weight = 1.0, tool_response_weight = 1.0 — total context). length_penalty = "turns" becomes [orchestrator.advantage.length_penalty]\ntype = "turns". (2026-05-06)
  • orchestrator.advantage.length_shaping → orchestrator.advantage.length_penalty: The boolean length_shaping flag has been replaced by length_penalty: Literal["tokens", "turns"] | None (default: None). length_shaping = true becomes length_penalty = "tokens"; length_shaping = false becomes length_penalty = None. The new "turns" option applies the same correctness-gated efficiency shaping using trajectory turn count instead of completion-token count. (2026-05-01)
  • AdvantageInputs API: Replaced the rewards/completion_lengths/num_turns tensor fields with a single rollouts: list[list[vf.RolloutOutput]] (grouped by problem). Custom advantage functions can now access any rollout metadata. Existing custom advantages must update their signatures and extract per-rollout fields directly (e.g. torch.tensor([[r["reward"] for r in g] for g in inputs.rollouts])). (2026-05-01)
  • orchestrator.teacher_rollout_model now requires orchestrator.use_sft_loss = true: External teacher rollout configs no longer rely on trainer.loss.type = "sft" to select SFT loss. Existing hard-distill configs must set orchestrator.use_sft_loss = true alongside orchestrator.teacher_rollout_model; the orchestrator validates the pair and stamps training samples with the per-batch SFT loss bool. (2026-04-26)
  • model.attn = "eager" (NEW option): Added eager as a valid value for the model.attn field. Required for GPT-OSS models on non-Hopper GPUs, since the only flash attention kernel GPT-OSS supports (kernels-community/vllm-flash-attn3) is Hopper-only. A clear error message is raised at model load time if GPT-OSS is used without eager on unsupported hardware. Also added kernels as a core dependency. (2026-04-05)
  • [[orchestrator.env]] → [[orchestrator.train.env]]: Training environments and sampling are now configured under [orchestrator.train]. The old [[orchestrator.env]] and [orchestrator.sampling] paths are auto-translated with a deprecation warning and will be removed in a future release. (2026-04-09)
  • Per-env sampling overrides (NEW): Both TrainEnvConfig and EvalEnvConfig now accept a [sampling] section for per-env overrides. Unset fields inherit from the group-level sampling config ([orchestrator.train.sampling] or [orchestrator.eval.sampling]). (2026-04-09)
  • Per-env eval sampling overrides: EvalEnvConfig now accepts a [sampling] section. Unset fields inherit from [orchestrator.eval.sampling]. All EvalSamplingConfig fields remain nullable (None = defer to inference server default). (2026-04-09)
  • orchestrator.buffer.env_ratios → per-env orchestrator.train.env[].ratio: buffer.env_ratios has been removed. Set ratio on each [[orchestrator.train.env]] entry instead. Ratios must be all-or-nothing across envs (either all have a ratio or none do). (2026-04-05)
  • orchestrator.val removed: The [orchestrator.val] config section (ValConfig) has been removed. Existing configs must delete this section. (2026-04-05)
  • orchestrator.max_concurrent removed: Concurrency limiting via max_concurrent and the global semaphore have been removed. Existing configs must delete this field. (2026-04-05)
  • orchestrator.buffer.hash_keys default changed: Default changed from ["task", "prompt"] to ["env_name", "prompt"]. The task field is no longer overridden by the orchestrator for env identification; env_name is used instead. Buffer checkpoints using the old default may not resume correctly. (2026-04-05)
  • orchestrator.eval.env[].failed_rollouts metric is now a ratio: The eval/{name}/failed_rollouts metric now reports a ratio (0.0–1.0) instead of a raw count. Dashboards keying on this metric should be updated. (2026-04-05)
  • orchestrator.sampling.temp_scheduler removed: Temperature scheduling (TemperatureSchedulerConfig) has been removed. sampling.temperature is now a required float (default 1.0). Existing configs using temp_scheduler must replace it with a fixed temperature value. (2026-04-05)
  • orchestrator.verification removed: The [orchestrator.verification] config section (VerificationConfig) has been removed. Rollout scoring is now always enabled. Existing configs must delete this section. (2026-04-05)
  • orchestrator.eval.env[].skip_first removed: The skip_first field on EvalEnvConfig has been removed. Existing configs using this field must delete it. (2026-04-05)
  • EvalSaveHFConfig removed: Unused config class removed. (2026-04-09)
  • orchestrator.env[].max_total_completion_tokens (NEW): Added max_total_completion_tokens: int to EnvConfig (default: -1, disabled). Limits the total completion tokens across all turns in a multi-turn rollout. Auto-populated into extra_env_kwargs and applied via the verifiers set_max_total_completion_tokens() setter. Works for both training and eval environments. (2026-04-06)
  • sampling.max_tokens → sampling.max_completion_tokens: Renamed max_tokens to max_completion_tokens in both SamplingConfig and EvalSamplingConfig for consistency with OpenAI API naming. The old name is accepted with a deprecation warning. (2026-04-06)
  • log.file and log.env_worker_logs removed: Removed log.file (from LogConfig and SharedLogConfig) and log.env_worker_logs (from LogConfig). Python file logging is replaced by deployment-level capture. Existing configs using these fields must delete them. Log paths unified: .stdout files renamed to .log, SLURM logs moved from slurm/ to logs/. (2026-03-31)
  • trainer.log.ranks_filter (NEW): Added ranks_filter: list[int] to TrainerLogConfig (default: [0]). Controls which ranks appear in trainer console output via torchrun's --local-ranks-filter. (2026-03-31)
  • wandb.log_extras.sample_ratio / monitor sample logging defaults: wandb.log_extras.sample_ratio is now actually applied to W&B sample-table logging via the shared monitor sampler (it was previously a no-op for WandB). Separately, the orchestrator no longer hard-caps sample logging to 8 rollouts before monitor-level sampling runs, so when monitor sample_ratio is None, monitors now receive and may log the full rollout batch for a step instead of at most 8 rollouts. This affects both W&B and Prime monitor sample logging behavior. (2026-03-27)
  • [model.vlm].freeze_vision_encoder: Added to VLMConfig. Controls whether the vision encoder is frozen (default: true). When false, the vision encoder is trainable and FSDP-sharded per-block. Has no effect with LoRA. Moved from [trainer.model].freeze_vision_encoder into the VLM sub-config. (2026-03-25)
  • loss_impl = "quack_fused" (SFT): Added quack_fused option for the SFT loss_impl field. Uses quack-kernels for chunked linear + cross-entropy with CuTe DSL CUDA kernels, avoiding full logits materialization. Requires quack-kernels package. Does not support Gemma logit softcapping. Custom model impl (model.impl = "custom") also gains quack RMSNorm acceleration on CUDA automatically. (2026-03-26)
  • model.ac.targets: Removed the mamba selective activation checkpoint target and folded that behavior into the broader linear_attn target. Existing configs using targets = ["mamba"] will now fail validation at runtime with ValueError; switch them to targets = ["linear_attn"]. The linear_attn target description now covers supported token mixers outside the standard softmax-attention path, including NemotronH Mamba layers, Qwen3.5-MoE GatedDeltaNet layers, and AFMoE sliding-window attention layers. (2026-03-28)
  • model.tp (trainer ModelConfig): Removed from the trainer model config. Existing trainer configs must delete this field; it is no longer accepted. (2026-03-26)
  • orchestrator.env[].num_workers: Added configurable env server worker count (int | "auto", default: "auto"). When "auto", scales based on concurrency (1 worker per 256 concurrent rollouts). Only used when the orchestrator spawns the env server (i.e. address is not set). (2026-03-25)
  • [model.vlm] (NEW — replaces auto-detection): VLM mode is now opt-in via a [model.vlm] sub-config with required vision_encoder_attr and language_model_attr fields. There is no auto-detection — if you train a VLM, you must add [model.vlm]. Existing multimodal configs need the new section. See docs/multimodal.md for the table of known model attrs. (2026-03-24)
  • model.optimization_dtype / model.reduce_dtype (VLM models, RL only): VLM dtype validation now only applies to RL training (TrainerConfig), not SFT. VLM models used with sft no longer require optimization_dtype='bfloat16' / reduce_dtype='bfloat16'. RL training still enforces both to match vLLM inference. (2026-03-24)
  • model.ep_comm_backend: Added expert-parallel communication backend selection. Accepted values are torch (default, uses TorchTitan all-to-all collectives) and deepep (uses DeepEP custom kernels). This field only affects configurations with expert parallelism enabled via model.ep > 1. (2026-03-22)
  • model.deepep_num_sms: Added DeepEP SM allocation control for intranode dispatch/combine kernels (default: 20, minimum: 1). This field is only used when model.ep_comm_backend='deepep'; it also determines the internode RDMA channel count (num_channels = num_sms / 2). (2026-03-22)
  • model.deepep_token_chunk_size: Added optional token chunk size for DeepEP MoE pipelining (default: None, minimum: 1). When set, DeepEP dispatch for chunk i+1 overlaps expert compute for chunk i. This field is only used when model.ep_comm_backend='deepep'. (2026-03-22)
  • model.optimization_dtype / model.reduce_dtype (VLM models): Added validation that VLM models must use optimization_dtype='bfloat16' and reduce_dtype='bfloat16' to match vLLM inference. Previously valid configs with float32 (the default) are now rejected for VLM model names. Set both fields to "bfloat16" when training VLMs. (2026-03-21)
  • model.ac.mode and model.ac.targets: Added selective activation checkpointing configuration. model.ac.mode accepts full (default) or selective. When selective, model.ac.targets selects subcomponents to checkpoint. Supported public targets are currently norm, attention_sdpa, mla_up_proj, and routed_experts; runtime validation remains the source of truth. model.ac.targets defaults to ["norm"], and selective mode requires at least one target. (2026-03-20)
  • orchestrator.advantage.length_shaping_alpha → orchestrator.advantage.length_shaping: Replaced GR³ (length_shaping_alpha: float | None) with correctness-gated efficiency shaping (length_shaping: bool, default: false). No hyperparameter needed, no online_difficulty_filtering requirement. Existing configs using length_shaping_alpha must switch to length_shaping = true. (2026-04-13)
  • orchestrator.advantage.length_weighted_mean: Removed. The default advantage now always uses the plain per-problem mean baseline unless orchestrator.advantage.length_shaping is enabled. Existing configs must delete this field. (2026-03-19)
  • prime_monitor.log_extras.sample_ratio: Added ratio-based rollout sampling (0.0–1.0, default: None). When set, caps the number of rollouts logged per step to len(rollouts) * sample_ratio. None preserves current behavior (log all rollouts). Interacts with existing interval gate which still runs first. (2026-03-12)
  • client.connect_timeout: Added configurable TCP connect timeout for inference API requests (default: 30.0s). Previously hardcoded to 5.0s. Helps with vLLM or cluster flakiness (2026-03-11)
  • model.fused_lm_head_token_chunk_size: Added as the fused LM-head chunking field for the token-chunked implementation. Unlike the removed model.fused_lm_head_chunk_size, this chunks over flattened sequence tokens rather than vocabulary rows. model.fused_lm_head_chunk_size is no longer accepted; switch configs to model.fused_lm_head_token_chunk_size explicitly. (2026-03-09)
  • slurm.pre_run_command: Added optional shell command to run on the head node before starting the job. Useful for cleanup routines (e.g. killing stale processes, removing lock files). For all-nodes execution, wrap with srun in the command string (default: None) (2026-03-08)
  • slurm.nodelist, slurm.exclude, slurm.account, slurm.time: Added common SLURM scheduling options (all default: None) (2026-03-08)
  • orchestrator.verification.enabled: Added top-level rollout verification switch. orchestrator.buffer.skip_verification has been removed; use verification.enabled = false instead. When disabled, rewards are always 0 and reward-dependent buffer features (online_difficulty_filtering, easy_threshold, hard_threshold) must be unset (2026-03-03)
  • client.dp_rank_count: Added configuration for data-parallel inference routing. When > 1, each client.base_url is expanded into dp_rank_count logical clients and pinned via X-data-parallel-rank to keep multi-turn rollouts on a consistent DP rank (default: 1) (2026-03-03)
  • model.lora: Moved from model.experimental.lora to model.lora (no longer experimental) (#1440, 2025-12-16)
  • Auto-set api_server_count=1 on inference when LoRA is enabled, because vLLM doesn't support hotloading for multiple API servers (#1422, 2025-12-17)
  • inference.model.rope_scaling: Added RoPE scaling configuration passthrough to vLLM (#1447 2025-12-17)
  • orchestrator.env_mix: Deprecated in favor of orchestrator.buffer.env_ratios (#1450, 2025-12-18)
  • orchestrator.buffer.hash_keys: Added hash keys configuration for buffer checkpointing (#1450, 2025-12-18)
  • orchestrator.buffer.env_ratios: Added environment ratio configuration for buffer sampling (#1450, 2025-12-18)
  • orchestrator.buffer.skip_verification: Added configuration to skip verification of rollouts using the environment's rubric. If True, rewards are always set to 0. Cannot be used with online_difficulty_filtering=True or when easy_threshold/hard_threshold are set (default: False)
  • orchestrator.ckpt.buffer_path: Deprecated (#1450, 2025-12-18)
  • orchestrator.buffer.easy_fraction and orchestrator.buffer.hard_fraction: Easy and hard fraction now defines the fraction of easy and hard problems to convert to normal when resuming, whereas previously it was the ratio of easy/ hard samples to sample per step (#1450, 2025-12-18)
  • orchestrator.teacher_model: Added teacher model configuration for computing teacher logprobs (e.g. for distillation). Supports TeacherModelConfig (custom model) or None (disabled). Renamed from reference_model (2025-12-20)
  • seq_len: Added root-level seq_len config that sets both trainer.model.seq_len and orchestrator.seq_len. Added validation that trainer.model.seq_len >= orchestrator.seq_len (2025-12-18)
  • trainer.loss.sequence_mask_ratio_low and trainer.loss.sequence_mask_ratio_high: Renamed to trainer.loss.sequence_mask_low and trainer.loss.sequence_mask_high (2025-12-19)
  • trainer.loss.token_mask_high and trainer.loss.token_mask_low: Added token-level importance ratio masking thresholds (2025-12-19)
  • trainer.loss.sequence_clip_high: Added sequence-level importance ratio clipping threshold (2025-12-19)
  • trainer.loss.geo_mask_high and trainer.loss.geo_mask_low: Added geometric importance ratio masking thresholds (2025-12-19)
  • trainer.loss.adv_tau: Added tau parameter for advantages (default: 1.0)
  • trainer.loss.teacher_tau: Added tau parameter for teacher logprobs (default: 0.0). Renamed from ref_tau
  • teacher_gpu_ids: Added GPU IDs for teacher inference server. When set, automatically starts a teacher inference server and configures orchestrator.teacher_model
  • teacher_inference: Added optional teacher inference config. Defaults to copying from inference config with port 8001
  • {orchestrator,trainer}.transport.zmq: Added ZMQ transport for training batches and micro batches (#1446, 2025-12-22)
  • model.impl: Changed default from hf to auto. With auto, the implementation automatically selects custom if supported for the model, otherwise falls back to hf (#1488, 2025-12-27)
  • orchestrator.eval.skip_eval_on_resume: Added flag (default True) to skip the first potentially redundant online eval immediately after resuming from a checkpoint (#1491, 2025-12-27)
  • trainer.weight_broadcast.adapter_only: Removed. Adapter-only behavior is now automatically derived from the presence of LoRA configuration (2025-12-27)
  • ckpt.keep: Renamed to ckpt.keep_last. Added ckpt.keep_interval to keep checkpoints at every N steps permanently (2025-12-31)
  • MultiLoRAMoE: QwenMoE now supports training expert loras and this is enabled by default in the target_modules. (2026-01-01)
  • model.fused_lm_head_chunk_size: Added chunk size configuration for fused LM head to enable memory-efficient chunked logprob computation. When set, splits vocabulary into chunks to avoid materializing full [N, V] logit tensor (default: None) (#1525, 2026-01-03)
  • model.fused_lm_head_chunk_size: RL training now auto-sets this to 2048 if not specified (except when impl='liger_kernel'). SFT training continues to use None (2026-01-05)
  • trainer.metrics_server: Added optional Prometheus metrics server for trainer observability. Exposes /metrics endpoint with step, loss, throughput, grad_norm, etc. Disabled by default (default: None) (#1547, 2026-01-06)
  • model.lora.alpha: Changed default from 16.0 to 32.0 (2026-01-10)
  • orchestrator.env.log: Added logging configuration for environment workers. If set, enables logging with level (str, default: "warn") and vf_level (str, default: "warn") fields. If None (default), logging is disabled (#1561, 2026-01-13)
  • eval.watcher: Added flag (default False) to watch weights_dir for newly-created stable checkpoints and evaluate them as they appear (2026-01-14)
  • orchestrator.log.env_worker_logs: Added flag (default False) to write env worker logs to logs/env_workers/{env_name}.log (2026-01-15)
  • orchestrator.env.log: Removed. Use orchestrator.log for env worker logging instead (2026-01-15)
  • orchestrator.eval.retry.reraise: Changed default from True to False. When False, raises tenacity.RetryError after retries are exhausted instead of the original exception, allowing failed eval environments to be skipped with a warning (#1586, 2026-01-14)
  • model.ep: Expert parallelism now supported (with auto/custom impl only), changed from the old behaviour when ep>1 was a no-op to a proper parallelization of the MoE layers. (#1595, 2026-01-15)
  • orchestrator.reload_weights_on_start: Removed. The reload was a no-op in practice since vLLM servers already start with base weights, and LoRA runs skipped it. (#1829, 2026-02-19)
  • orchestrator.client.elastic: Added elastic inference pool with DNS-based service discovery. Supports dynamic server scaling via any DNS hostname with multiple A records (Kubernetes headless services, Consul, Route53, etc.). Automatically syncs LoRA adapters on new servers and only exposes ready servers to workers (#1617, 2026-01-19)
  • model.fused_lm_head_chunk_size: Replaced chunk size int | None setting with int | Literal["auto", "disabled"] setting. auto auto-sets to 2048 if possible. disabled explicitly disables chunked loss (use vanilla LM head). Default behaviour is to use auto for RL training and disabled for SFT training. (not changed from previous version) (#1649, 2026-01-23)
  • client.skip_model_check: Added configuration to skip checking if the model is available in the inference pool. Useful for external APIs or API keys that don't support the /models endpoint (default: False) (#1543, 2026-01-06)
  • orchestrator.sampling.temp_scheduler: Added optional temperature schedule configuration with linear and cosine schedules. Set either sampling.temperature (constant) or sampling.temp_scheduler (schedule), not both. Default remains 1.0 if neither is set. (2026-01-27)
  • orchestrator.trajectory_strategy: Deprecated. Interleaving now automatically handles extension breaks by starting a new sample when the prefix doesn't match, achieving best-of-both behavior. The setting is ignored and interleaved mode is always used. (2026-01-30)
  • model.impl: Removed liger_kernel model implementation from supported options. The Liger kernel dependency remains for SFT loss. (2026-01-30)
  • log.json_logging: Added JSON structured logging option for log aggregation systems (Loki, Grafana, etc.). Outputs flat newline-delimited JSON with timestamp, level, message, module, function, line fields. Available on root log, trainer.log, and orchestrator.log (default: False) (2026-01-28)
  • model.optim_cpu_offload: Added flag to offload optimizer states to CPU without moving parameters (default: False) (2026-01-31)
  • orchestrator.tasks_per_minute: Added optional rate limiting for sandbox tasks per environment worker. Uses token bucket algorithm. If None (default), no rate limiting is applied (2026-02-02)
  • model.cp: When cp>1 with attn="flash_attention_3", require model.impl="custom" (FA3 ring-attention kernel only in custom path) (2026-02-06)
  • model.attn: Added fa4 as an attention implementation option. Flash attention 4 is only supported with the custom implementation (#1726, 2026-02-06)
  • inference.model.enable_prefix_caching: Added flag to enable prefix caching in vLLM. Passed to vLLM as --enable-prefix-caching (default: None) (2026-02-08)
  • orchestrator.env.address: Added address field on EnvConfig. If set, connect to an environment server at this address; if None, spawn a server in a subprocess (2026-02-06)
  • orchestrator.env.extra_env_kwargs: Added on EnvConfig. Extra kwargs passed to the env (e.g. seq_len, interleaved_rollouts, score_rollouts). Auto-populated by the orchestrator for training envs; generally not recommended for user override. Main use case is to match these kwargs when running an env in an isolated environment server (default: {}) (2026-02-06)
  • OrchestratorConfig: Removed workers_per_env, max_env_worker_restarts, and mask_env_responses (2026-02-06)
  • EvalSaveDiskConfig, EvalSaveConfig, RetryConfig, OnlineEvalConfig: Removed (2026-02-06)
  • TemperatureScheduleConfig: Renamed to TemperatureSchedulerConfig (2026-02-06)
  • optim.mu: Added Muon momentum (mu) config field (default: 0.95). Previously hardcoded to Muon class default. Also fixed optim.betas1/optim.betas2 not being passed through to the Muon optimizer (2026-02-09)
  • dump_config: Added --dump-config <path> flag to the rl command. When set, writes the resolved subconfigs (trainer, orchestrator, inference, teacher_inference) to the given directory and exits without starting any processes (2026-02-12)
  • client.api_key_var: Changed default from "OPENAI_API_KEY" to "VLLM_API_KEY" (2026-02-12)
  • orchestrator.filters: Added orchestrator-side rollout filters for detecting degenerate generations. Supports [[filters]] type = "gibberish" (rare tokens at high entropy) and [[filters]] type = "repetition" (high-confidence token streaks). Detected rollouts get reward zeroed and completion mask cleared (2026-02-13)
  • inference.model.tool_call_parser: Changed default from "hermes" to auto-detection from model name. Uses MODEL_TOOL_CALL_PARSER dict to infer the correct vLLM tool call parser (e.g. Qwen3→hermes, GLM-4.5→glm45, GLM-4.7→glm47, MiniMax-M2→minimax_m2, INTELLECT-3→hermes). Unknown models default to None. Explicit values still take priority. (#1795, 2026-02-16)
  • orchestrator.eval.cancel_inflight_rollouts_on_eval: Added flag to optionally cancel in-flight training rollouts before starting online evals. When enabled, avoids congestion by preventing training and eval rollouts from running simultaneously, but slows training as the rollout pipeline must refill after each eval (default: False) (2026-02-16)
  • orchestrator.use_token_client: Added flag to use the token-in-token-out (TITO) client for training across all environments. When enabled, uses openai_chat_completions_token client type instead of openai_chat_completions. Only use when environments have linear history and the chat template has the extension property (default: False) (2026-02-21)
  • model.cp + AFMoE: Context parallelism now works with AFMoE models via unified substitute_ring_attn which patches _compute_attention on both FlashAttention and AfmoeFlashAttention to use ring attention. Sliding window layers automatically get per-layer window_size; full attention layers default to (-1, -1). Also plumbed window_size through the FA3 ring attention wrapper (ring_fa3_varlen_func). (2026-02-21)
  • orchestrator.token_batch_size and orchestrator.max_inflight_rollouts: Added token-based batching via token_batch_size and explicit in-flight rollout control via max_inflight_rollouts (2026-02-23)
  • orchestrator.batch_size: Now optional and mutually exclusive with token_batch_size. If neither is set, defaults to rollout mode with batch_size=128 (2026-02-23)
  • inference.enable_expert_parallel, inference.all2all_backend, and inference.enable_eplb: Added expert-parallel inference controls passed to vLLM as --enable-expert-parallel, --all2all-backend, and --enable-eplb (defaults: False, "allgather_reducescatter", False) (2026-02-23)
  • rl_slurm / sft_slurm entrypoints: Removed. SLURM submission is now handled by the unified rl and sft entrypoints. Add a [slurm] section to your config to submit via SLURM instead of running locally (2026-02-23)
  • inference_gpu_ids / trainer_gpu_ids / teacher_gpu_ids: Removed from RLConfig. Replaced by [deployment] section with type = "single_node" (fields: num_train_gpus, num_infer_gpus, num_teacher_gpus) or type = "multi_node" (fields: num_train_nodes, num_infer_nodes, num_teacher_nodes, nodes_per_fsdp_group). Default is single_node with 1 train GPU and 1 infer GPU (2026-02-23)
  • RLSLURMConfig: Removed. Fields job_name, num_train_nodes, num_infer_nodes, gpus_per_node, nodes_per_fsdp_group, project_dir, slurm_template, dry_run are now under [slurm] and [deployment] in the unified RLConfig (2026-02-23)
  • SFTSLURMConfig: Removed. Fields job_name, num_nodes, gpus_per_node, nodes_per_fsdp_group, project_dir, slurm_template, dry_run are now under [slurm] and [deployment] in SFTConfig (2026-02-23)
  • [deployment] (RL): Added deployment configuration. type = "single_node" auto-derives contiguous GPU assignments from num_infer_gpus, num_train_gpus, num_teacher_gpus. type = "multi_node" requires [slurm] and uses num_train_nodes, num_infer_nodes (2026-02-23)
  • [deployment] (SFT): Added deployment configuration. type = "single_node" with num_gpus (default: 1). type = "multi_node" with num_nodes, nodes_per_fsdp_group, hf_hub_offline (2026-02-23)
  • [slurm] (RL): Added SLURM configuration with job_name, project_dir, template_path, partition, dry_run. When present, uv run rl generates and submits an sbatch script instead of running locally. Template is auto-selected based on deployment type (2026-02-23)
  • [slurm] (SFT): Added SLURM configuration with job_name, project_dir, template_path, partition, dry_run. When present, uv run sft generates and submits an sbatch script instead of running locally (2026-02-23)
  • hf_hub_offline (RL/SFT SLURM): Removed. HF_HUB_OFFLINE=1 is now hardcoded in the multi-node SLURM templates (2026-02-23)
  • SLURM templates: Moved from src/prime_rl/slurm/ to src/prime_rl/templates/ and renamed to single_node_rl.sbatch.j2, multi_node_rl.sbatch.j2, single_node_sft.sbatch.j2, multi_node_sft.sbatch.j2 (2026-02-23)
  • Entrypoints: Moved rl and sft entrypoints from prime_rl.rl / prime_rl.sft to prime_rl.entrypoints.rl / prime_rl.entrypoints.sft. No change to CLI usage (uv run rl, uv run sft) (2026-02-24)
  • output_dir (RL): Changed from Path | None (default None) to Path (default Path("outputs")). The SLURM-specific validation that rejected the default has been removed — output_dir now works the same for local and SLURM runs (2026-02-24)
  • clean_output_dir: Added to RLConfig and SFTConfig (default: False). Training now raises FileExistsError when output_dir contains checkpoints from a previous run and not resuming. Set clean_output_dir=true to delete and start fresh, or set ckpt.resume_step to resume (2026-02-24)
  • clean: Removed from RLConfig. The old clean flag (default: True) silently deleted logs, rollouts, and broadcasts on every local RL run. Superseded by the explicit clean_output_dir flag (2026-02-24)
  • Config consolidation: All config modules moved into prime_rl.configs subpackage. utils/config.py + transport/config.py → configs/shared.py; trainer/config.py + trainer/rl/config.py → configs/trainer.py; trainer/sft/config.py → configs/sft.py; orchestrator/config.py → configs/orchestrator.py; inference/config.py → configs/inference.py; rl_config.py → configs/rl.py. Class renames: SFTTrainerConfig → SFTConfig, RLTrainerConfig → TrainerConfig. Component prefixes dropped from orchestrator and inference config classes (e.g. OrchestratorCheckpointConfig → CheckpointConfig). TypeAlias renames: dropped Type suffix (e.g. LossConfigType → LossConfig, TransportConfigType → TransportConfig), renamed LossConfig class → DefaultLossConfig. No TOML key changes. (2026-02-24)
  • trainer.enable_router_replay: Added flag to enable router replay. If True, will return routed experts in the batch. This is only supported if enable_return_routed_experts=True in the inference config or pass --enable-return-routed-experts to vLLM server. This is only supported for custom models. (2026-02-22)
  • inference.enable_return_routed_experts: Added flag to enable return routed experts. Passed to vLLM as --enable-return-routed-experts (2026-02-22)
  • orchestrator.oversampling_factor: Added rollout-only over-sampling config that resolves max_inflight_rollouts = int(batch_size * oversampling_factor) when max_inflight_rollouts is unset. Cannot be used with token_batch_size or together with explicit max_inflight_rollouts (2026-02-25)
  • sft.val: Added optional periodic SFT validation with val/loss and val/num_tokens logging. Configure via sft.val.data (validation dataset) and sft.val.interval (every N steps, default 50). Runs the full validation dataset each pass. (2026-02-26)
  • model.fused_lm_head_chunk_size: Changed default value from 2048 to 8192 for RL training (2026-02-26)
  • inference.data_parallel_size_local and inference.data_parallel_rpc_port: Added data-parallel node-local controls for vLLM, passed as --data-parallel-size-local and --data-parallel-rpc-port (defaults: None, 13345) (2026-02-26)
  • dump_config: Removed from RLConfig. Replaced by dry_run (see below) (2026-02-26)
  • slurm.dry_run: Removed from SlurmConfig. Replaced by top-level dry_run (see below) (2026-02-26)
  • dry_run: Added to RLConfig and SFTConfig (default: False). When set, validates the config, writes resolved subconfigs to output_dir/configs/, and exits without starting any processes. Works the same for both local and SLURM runs (2026-02-26)
  • Config output location: Resolved subconfigs are now always written to output_dir/configs/ instead of .pydantic_config/<uuid>/. This applies to both local and SLURM entrypoints, and for both single-node and multi-node deployments (2026-02-26)
  • SFT config filename: The resolved SFT trainer config is now written as sft.toml instead of trainer.toml (2026-02-26)
  • Inference entrypoint: Moved from prime_rl.inference.server to prime_rl.entrypoints.inference. No change to CLI usage (uv run inference) (2026-02-26)
  • [slurm] (inference): Added SLURM configuration to InferenceConfig. When present, uv run inference generates and submits an sbatch script instead of running locally. Each SLURM node runs an independent vLLM replica (no cross-node parallelism) (2026-02-26)
  • [deployment] (inference): Added deployment configuration. type = "single_node" (default) with gpus_per_node. type = "multi_node" with num_nodes and gpus_per_node — requires [slurm] (2026-02-26)
  • inference.output_dir: Added directory for SLURM logs and generated scripts (default: "outputs") (2026-02-26)
  • inference.dry_run: Added flag (default: False). When set, validates config, writes resolved config to output_dir/configs/, and exits without starting inference or submitting SLURM jobs (2026-02-26)
  • orchestrator.teacher_rollout_model: Added optional external rollout model configuration. When set, rollouts are generated from this endpoint/model instead of the student inference server. Accepts a TeacherRolloutModelConfig with client and model sub-fields, or None (default: None) (2026-02-26)
  • trainer.loss.type = "sft": Added SFT loss variant. Set trainer.loss.type = "sft" to use masked negative log-likelihood loss instead of the default RL loss (2026-02-26)
  • trainer.loss.type = "custom": Added custom loss variant. Set trainer.loss.type = "custom" with import_path (e.g. "my_module.my_loss") and optional kwargs to use an external loss function (2026-02-26)
  • trainer.loss (default loss): Made IPO (DPPO-Binary TV variant (arxiv) + Kimi-K2.5 KL (Kimi-K2.5)) the default loss. Removed ratio_type, token_mask_low, token_mask_high, sequence_clip_high, geo_mask_low, geo_mask_high, sequence_mask_low, sequence_mask_high. Added ipo_mask_low (default: 0.2) and ipo_mask_high (default: 0.2) for token-level probability-difference masking. Changed kl_tau default from 0.0 to 1e-3. (2026-03-02)
  • Metrics logging overhaul: All orchestrator metrics now follow a {metric}/{scope}/{stat} naming convention where scope is all (global) or an env name. Per-env breakdowns are always logged (previously only when >1 env). Key renames: reward/mean → reward/all/mean, batch/solve_none → solve_none/all, val_reward/ → val/reward/, metrics/{name} → metrics/{env}/{name}, stop_condition/{sc} → stop_condition/all/{sc}, error/mean → error/all/mean. New per-env metrics: solve_none/{env}, solve_all/{env}, effective_batch_size/{env}, stop_condition/{env}/generation_truncated, stop_condition/{env}/{sc}, error/{env}/mean, plus per-env breakdowns for seq_len, prefill_len, decode_len, is_truncated, samples_per_rollout, num_turns, generation_ms, scoring_ms. Removed: reward/std, reward/median, per-error-type breakdown (error/{error_type}). Env name "all" is reserved and rejected at config validation. Env name validation now strips @version suffixes to match runtime behavior (e.g. math@1.0 and math@2.0 correctly detected as duplicates). Solve stats now use example_id grouping instead of index arithmetic (pre-existing bug fix). (2026-03-08)
  • wandb.shared (experimental): Added shared W&B mode that logs trainer and orchestrator metrics to a single W&B run instead of two separate runs. Uses wandb.Settings(mode="shared") (requires wandb SDK >= 0.19.9). Enabled by default on the RL entrypoint. Disable with --wandb.shared False. Run ID is communicated via WANDB_SHARED_RUN_ID env var; process role via WANDB_SHARED_LABEL. Non-primary processes retry wandb.init up to 30 times waiting for the primary to create the run. Works with multi-node SLURM. (2026-03-18)
  • wandb.id: Removed from WandbConfig. Run IDs are now managed internally via env vars for shared mode. (2026-03-18)
  • trainer.ckpt.skip_optimizer: Added flag to skip loading optimizer states when resuming training. When set, only the model weights are loaded from the checkpoint. (2026-03-24)