Skip to content

feat: basic verifiers v1 training - #2637

Merged
mikasenghaas merged 4 commits into
mainfrom
exp/verifiers-v1
Jun 2, 2026
Merged

mikasenghaas merged 4 commits into
mainfrom
exp/verifiers-v1

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented May 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Experiment branch for the verifiers v1 path on prime-rl, scoped down to basic reverse_text training. Built on top of main, which now carries the orchestrator v2 overlap train/eval refactor (#2639), the bump to latest verifiers (e1d4f259, v0.1.15.dev18), and the editable-install restructure (#2684) that lets uv sync --all-extras resolve cleanly against latest verifiers. The net change this branch adds on top of main is:

  • Add configs/debug/reverse_text_v1.toml — minimal 2-GPU smoke config that mirrors the v0 examples/reverse_text/rl.toml exactly, differing only by args = { v1 = true } on the env (and a v1-distinguishing wandb name).
  • Temperature plumbing refactor so the v1 path works under orch v2 (see below).

Note: latest verifiers main (post #1396, NeMo Gym) declares mutually-exclusive nemogym/openenv extras, which broke uv sync --all-extras while verifiers was a workspace member. main's #2684 (submodules → editable installs) resolves that; merging it in is why this branch no longer needs to carry its own verifiers pin or uv.lock churn.

Temperature plumbing refactor

Supersedes #2669 — same fan-out fix, but applied to the orch v2 TrainSink.process_group instead of the pre-v2 orchestrator post-process loop (that PR was a hotfix onto v0.5.1.dev256).

Single env-wide temperature per rollout — assume the config surface (one [orchestrator.train.env.sampling] block per env), drop the env → orchestrator → trainer round-trip via output["sampling_args"]:

  • Drop sampling_args from REQUIRED_STATE_COLUMNS. The orchestrator already knows each env's temperature from its TrainEnv.sampling_args, so there's no reason to require envs to mirror it back through state. This also unblocks v1 envs, which route sampling_args through state["runtime"] and don't surface it at the top level.
  • interleave_rollout no longer reads output["sampling_args"]["temperature"] or fills completion_temperatures; it leaves the field empty.
  • TrainSink.process_group fans the env's scalar temperature out across each sample's completion tokens in the same loop that stamps advantage / reward / env_name / training_mode, before the batch is assembled.

TrainingSample / TrainingBatch wire format is unchanged. Trainer-side per-token temperature scaling (scaled_logits = logits / temps) keeps working as-is.

Verification

v0 vs v1 reverse_text RL — same config (examples/reverse_text/rl.toml, Qwen3-0.6B-Reverse-Text-SFT, 20 steps, 2× RTX PRO 6000), toggling only args = { v1 = true } on the env. Both ran end-to-end with no errors (100% trainable, clean Orchestrator finished), and the reward curves track within run-to-run sampling noise:

step 0 3 6 9 12 15 19
v0 reward 0.178 0.360 0.714 0.734 0.748 0.734 0.799
v1 reward 0.173 0.341 0.743 0.707 0.755 0.708 0.782

Final-5-step mean reward: v0 = 0.7719, v1 = 0.7614 (~1.4% apart); max per-step difference 0.106. Both show the same shape: flat ~0.15 for steps 0–2, sharp climb over steps 3–6, plateau ~0.75–0.80.

Other checks:

  • uv run rl @ configs/debug/reverse_text_v1.toml --dry-run — resolves cleanly.
  • uv run pytest tests/unit -m "not gpu" — 427 passed, 65 deselected (test_trajectories.py assertions updated: completion_temperatures is filled by the TrainSink post-interleave, not by interleave_rollout).
  • uv sync --all-extras --locked / uv lock --check — resolve cleanly against latest verifiers (via the #2684 editable-install restructure).

Notes

  • Scope intentionally limited to reverse_text. The earlier wikispeedia / general-agent / alphabet_sort smoke configs (and the wikispeedia research-environments bump + pyproject workspace entry) have been dropped from this branch.

Note

Medium Risk
Changes training-sample metadata plumbing (temperature source) on the orchestrator path; low blast radius but affects RL loss scaling if misconfigured.

Overview
Adds configs/debug/reverse_text_v1.toml, a minimal 2-GPU smoke config for verifiers v1 reverse-text RL (args = { v1 = true }, default renderer).

Sampling temperature no longer flows through rollout state: REQUIRED_STATE_COLUMNS drops sampling_args (v1 envs keep temperature under state["runtime"] only). interleave_rollout leaves completion_temperatures empty; TrainSink.process_group fans env.sampling_args["temperature"] across each completion token when stamping advantage/reward. Trainer wire format is unchanged.

Unit tests now expect empty temperatures from interleave alone.

Reviewed by Cursor Bugbot for commit c8f2462. Bugbot is set up for automated code reviews on this repo. Configure here.

@mikasenghaas mikasenghaas changed the title exp: verifiers v1 smoke configs (reverse-text + wikispeedia, default + RLM) exp: verifiers v1 smoke configs (reverse-text + wikispeedia, default + RLM via harness.id) May 26, 2026
@mikasenghaas mikasenghaas changed the title exp: verifiers v1 smoke configs (reverse-text + wikispeedia, default + RLM via harness.id) exp: verifiers v1 smoke configs May 26, 2026
deps/verifiers -> e1d4f259 (v0.1.15.dev18, head of verifiers main).
This branch previously needed to pin *before* #1414 (per-token prompt
attribution to TrajectoryStep), which stuffed a non-JSON-serializable
RenderedTokens into trajectory state and broke v1's
state.assert_serializable(). That has since been fixed upstream by
#1471 (renderers <-> v1: serializable RenderedTokens), so we track
latest main again. Also includes #1462 (TasksetConfig rework) and
#1467 (typed RendererConfig).

Co-authored-by: Cursor <cursoragent@cursor.com>
@mikasenghaas mikasenghaas changed the title exp: verifiers v1 smoke configs exp: verifiers v1 reverse_text smoke + temperature fan-out Jun 1, 2026
@mikasenghaas mikasenghaas changed the title exp: verifiers v1 reverse_text smoke + temperature fan-out feat: basic verifiers v1 training Jun 1, 2026
@mikasenghaas
mikasenghaas force-pushed the exp/verifiers-v1 branch 2 times, most recently from e168ce7 to 36738e0 Compare June 1, 2026 20:58
mikasenghaas and others added 2 commits June 1, 2026 21:10
Minimal 2-GPU smoke config for the v1 path: `reverse-text` env via
`args = { v1 = true }`, in-process vf.Harness, no tools.
Single env-wide temperature per rollout — assume the config surface
(one [orchestrator.train.env.sampling] block per env), drop the
output -> trajectories round-trip:

- Drop `sampling_args` from REQUIRED_STATE_COLUMNS. The orchestrator
  already knows each env's temperature from its TrainEnv.sampling_args,
  so there's no reason to require envs to mirror it back through state.
  This also unblocks v1 envs, which route sampling_args through
  state["runtime"] and don't surface it at the top level.
- interleave_rollout no longer reads output["sampling_args"]["temperature"]
  or fills `completion_temperatures`; it leaves the field empty.
- TrainSink.process_group fans the env's scalar temperature out across
  each sample's completion tokens in the same loop that stamps
  advantage / reward / env_name / training_mode, before the batch is
  assembled.

TrainingSample / TrainingBatch wire format is unchanged. Trainer-side
per-token temperature scaling (scaled_logits = logits / temps) keeps
working as-is.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mikasenghaas
mikasenghaas requested review from samsja and snimu June 1, 2026 21:25
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	uv.lock
@mikasenghaas
mikasenghaas marked this pull request as ready for review June 1, 2026 22:58
@mikasenghaas
mikasenghaas merged commit 3ce9189 into main Jun 2, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants