Repository navigation
feat: basic verifiers v1 training - #2637
Merged
Merged
Conversation
mikasenghaas
force-pushed
the
exp/verifiers-v1
branch
from
May 26, 2026 00:23
376c87c to
95b3203
Compare
mikasenghaas
force-pushed
the
exp/verifiers-v1
branch
from
May 26, 2026 20:07
b521150 to
39c8d29
Compare
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
force-pushed
the
exp/verifiers-v1
branch
from
June 1, 2026 20:53
39c8d29 to
fee62fc
Compare
mikasenghaas
force-pushed
the
exp/verifiers-v1
branch
2 times, most recently
from
June 1, 2026 20:58
e168ce7 to
36738e0
Compare
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
force-pushed
the
exp/verifiers-v1
branch
from
June 1, 2026 21:10
36738e0 to
86c73ef
Compare
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # uv.lock
mikasenghaas
marked this pull request as ready for review
June 1, 2026 22:58
samsja
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 letsuv sync --all-extrasresolve cleanly against latest verifiers. The net change this branch adds on top ofmainis:configs/debug/reverse_text_v1.toml— minimal 2-GPU smoke config that mirrors the v0examples/reverse_text/rl.tomlexactly, differing only byargs = { v1 = true }on the env (and a v1-distinguishing wandb name).Temperature plumbing refactor
Supersedes #2669 — same fan-out fix, but applied to the orch v2
TrainSink.process_groupinstead of the pre-v2 orchestrator post-process loop (that PR was a hotfix ontov0.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 viaoutput["sampling_args"]:sampling_argsfromREQUIRED_STATE_COLUMNS. The orchestrator already knows each env's temperature from itsTrainEnv.sampling_args, so there's no reason to require envs to mirror it back through state. This also unblocks v1 envs, which routesampling_argsthroughstate["runtime"]and don't surface it at the top level.interleave_rolloutno longer readsoutput["sampling_args"]["temperature"]or fillscompletion_temperatures; it leaves the field empty.TrainSink.process_groupfans the env's scalar temperature out across each sample's completion tokens in the same loop that stampsadvantage/reward/env_name/training_mode, before the batch is assembled.TrainingSample/TrainingBatchwire 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 onlyargs = { v1 = true }on the env. Both ran end-to-end with no errors (100% trainable, cleanOrchestrator finished), and the reward curves track within run-to-run sampling noise: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.pyassertions updated:completion_temperaturesis filled by theTrainSinkpost-interleave, not byinterleave_rollout).uv sync --all-extras --locked/uv lock --check— resolve cleanly against latest verifiers (via the #2684 editable-install restructure).Notes
research-environmentsbump +pyprojectworkspace 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_COLUMNSdropssampling_args(v1 envs keep temperature understate["runtime"]only).interleave_rolloutleavescompletion_temperaturesempty;TrainSink.process_groupfansenv.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.