trinity
321
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
208ea64308 |
chore: bump research-environments submodule to latest main (#3106)
* chore: bump research-environments submodule to latest main Picks up the registry ref-cleanup wave: platform image naming convention (openswe/tmax/terminal-lego/openthoughts-tblite/senior-swe-bench switched to org-less platform refs, multiswe REGISTRY mapping removed) and the tmax Harbor registry pointer bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: relock env versions for research-environments bump Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
c505e07a1a |
feat(weight-transfer): add NIXL + ModelExpress synchronization (#3060)
* feat(weight-transfer): add NIXL ModelExpress synchronization * refactor(weight-transfer): simplify NIXL integration * refactor(weight-transfer): simplify NIXL worker planning * refactor(weight-transfer): align MX update lifecycle * feat(inference): pass through online quantization methods * feat(weight-transfer): add GLM trainer conversion graph * feat(weight-transfer): stream NIXL updates by layer * feat(weight-transfer): pipeline NIXL layer reloads * fix(weight-transfer): preserve single-buffer NIXL behavior * fix(weight-transfer): reserve observed inference peak * feat(weight-transfer): preserve model-declared FP32 tensors * cleanup(weight-transfer): simplify trainer wire schema * cleanup(weight-transfer): make trainer shard ranges explicit * cleanup(weight-transfer): resolve model conversions through registry * cleanup(weight-transfer): clarify lazy copy destinations * cleanup(weight-transfer): derive lazy metadata from source * cleanup(weight-transfer): rename weight load tracing * cleanup(weight-transfer): name recorded tensor operations * cleanup(weight-transfer): simplify transfer planning * cleanup(weight-transfer): consolidate load graph * cleanup(weight-transfer): name trainer tensor table * cleanup(weight-transfer): clarify tensor routing * cleanup(weight-transfer): simplify NIXL adapter * cleanup(weight-transfer): clarify ModelExpress sessions * cleanup(weight-transfer): clarify CUDA memory sizing * cleanup(weight-transfer): clarify staged trainer shards * cleanup(weight-transfer): simplify trainer broadcast guards * cleanup(weight-transfer): clarify trainer staging state * cleanup(weight-transfer): simplify trainer constants * cleanup(weight-transfer): use ModelExpress client name * cleanup(weight-transfer): clarify trainer shard discovery * cleanup(weight-transfer): structure trainer initialization * cleanup(weight-transfer): reuse trainer agent metadata * cleanup(weight-transfer): reuse trainer table fragments * cleanup(weight-transfer): simplify trainer staging setup * cleanup(weight-transfer): simplify inference transfer planning * cleanup(weight-transfer): split inference plan construction * cleanup(weight-transfer): clarify inference replay methods * cleanup(weight-transfer): localize receive arena sizing * cleanup(weight-transfer): clarify loader recording wrapper * cleanup(weight-transfer): clarify watcher synchronization * cleanup(weight-transfer): unify checkpoint wait timing * cleanup(weight-transfer): align in-memory broadcast lifecycle * fix(weight-transfer): skip NIXL startup filesystem wait * cleanup(weight-transfer): use declarative model conversions * style(weight-transfer): format NIXL implementation * fix(weight-transfer): stabilize ranks and final watcher step * fix(tests): use instance conversion API * cleanup(weight-transfer): scope package to NIXL * cleanup(weight-transfer): align names and package layout |
||
|
|
cb74ae2beb |
feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire (#3104)
* feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire Companion to PrimeIntellect-ai/verifiers#1939 (multi-agent api). Re-pins deps/verifiers to 192fd8ef0 (= 0.2.2.dev7) and deps/pydantic-config to v0.4.2 (verifiers now requires prime-pydantic-config>=0.4.2). - Serve wire: the env-server route run_rollout -> run, answering one Episode envelope ({id, env, ok, errors, traces}) per env-rollout. Env.run returns list[Rollout]; an episode that failed before minting any trace raises (the dispatcher synthesizes its error marker), and a not-ok episode marks its clean traces failed so a broken episode's partial seats are never trained on. - The episode is the pipeline currency: the dispatcher emits one episode (list[Rollout]) per completed task onto out_q (a legacy run_group result emits its traces as single-trace episodes), and both sinks count episodes - never loose traces - toward group_size and eval epoch sizes. episode_id is stamped into info so saved records keep grouping. - ok is the success sentinel: has_error now reads it, so the dispatcher's empty-trajectory promotion also flips ok, and error markers carry it. - Only the trainable subset becomes training samples: a trace stamped untrainable (a multi-agent env's frozen agent) is never tokenized, never enters the group advantage, and never ships; it still lands in the trace files and observation window. - Config shape: everything env lives under the env block, following the new vf.EnvServerConfig (env.taskset, env.agent.harness, per-agent caps under env.agent.*). All checked-in TOMLs migrated; the spawned env server receives the picklable env block via env_config_data. - run_group survives only for v0/legacy bridge envs (a v1 server refuses it and always reports requires_group_scoring=False); vf's @group_reward removal doesn't touch prime-rl's own Algorithm.score_group. Verified: tests/unit green (487 passed; config-loading params covered all migrated TOMLs), ruff clean, and a 3-step reverse-text RL run on 2 GPUs trains at 0% errors with every saved trace carrying ok, agent.name, agent.trainable, and a distinct info.episode_id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: trim narrative comments to the load-bearing facts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: count buffered sink progress in episodes; explicit ok=False on cancel markers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: keep untrainable traces out of the effective views and the derived avg@k Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
47f97ee1b0 |
chore: bump verifiers + research-environments to latest main (#3097)
* chore: bump verifiers to latest main deps/verifiers ab65b6e8d (v0.2.1) -> 1f457da17 (0.2.2.dev6). uv.lock is unchanged: verifiers is an editable path dep and its dependency set did not change, so `uv lock` is a no-op. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump research-environments to latest main deps/research-environments 85b1527b9 -> e40d32690 (one commit: refactor(swe): import patch capture from verifiers, #682), pairing with the verifiers capture_patch/resolve_head utils pulled in by the previous commit. uv.lock: swelego-v1 / swerebench-v2-v1 / swesmith-v1 0.1.1 -> 0.1.2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
4453922943 |
chore: bump verifiers to 0.2.1, prime-pydantic-config to 0.4.2, renderers to 0.1.8 (#3095)
* chore: bump verifiers to 0.2.1, prime-pydantic-config to 0.4.2, renderers to 0.1.8 - deps/verifiers -> v0.2.1 (ab65b6e8d), pin verifiers[harbor]>=0.2.1 - deps/pydantic-config -> v0.4.2 (4f5ae37), pin prime-pydantic-config>=0.4.2 - prime-rl-configs: verifiers>=0.2.1, renderers>=0.1.8 (drop dev pins) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump research-environments to verifiers 0.2.1 pins Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: drop use_prime_registry from example configs research-environments#676 removed the field from the swe/terminal tasksets (the platform now auto-builds images from any docker ref), so taskset configs no longer accept it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
ed16f19a05 |
chore: bump prime to 0.6.19, verifiers pin to latest main (#3093)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
18665f7d58 |
feat: stamp platform trace metadata via verifiers Trace fields (#3061)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: stamp platform trace metadata via verifiers Trace fields Companion to verifiers#2053 (RES-1078). Rollouts are stamped on arrival in the orchestrator via vf.Trace.stamp - run_id (from the new Monitor.run_id: platform id preferred, else wandb), tag, step as first-class trace fields, env_name/group_id/policy_version into info - replacing the Rollout.to_record override. Bumps deps/verifiers to the trace-fields commit and deps/renderers to satisfy its >=0.1.8 floor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers to reshaped trace metadata VersionInfo + AgentInfo (model, sampling, harness id), taskset_id dropped upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers - run_id/tag grouped into Trace.run, schema_version renamed to version Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers - RunInfo discriminated union, stamp(run) step lives on TrainRunInfo; inline-eval trigger step goes to info.eval_step to keep eval records placeable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers to branch head (gepa stamping reverted) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers - AgentInfo embeds full HarnessConfig Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers - eval trigger step moves to EvalRunInfo.step Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers - verifiers_commit foreign-repo guard Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers to branch head Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers past the openenv restructure openenv is a built-in taskset behind verifiers[openenv] now (vf#2059), so the deps/verifiers/packages/* workspace glob goes away again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e0d60e4d85 |
refactor(sft): unify the loss path with the RL trainer (#3044)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* refactor(sft): unify the loss path with the RL trainer Remove loss_impl (torch / liger / liger_fused / quack_fused) and route SFT through the same chunked LM head the RL trainer uses: - fused_lm_head_token_chunk_size (int, default 1024) selects FusedOutputLinear; per-token cross-entropy is the negative target logprob computed in token chunks — full [N, V] logits are never materialized. "disabled" falls back to the vanilla logits + CrossEntropyLoss path. - The same [model] block now behaves identically across SFT and RL, and SFT drops the ~17 GB logits tax that loss_impl="torch" carried at long context. - Delete the liger/quack fused-CE heads, the fused_cross_entropy plumbing in setup_model/inject_prime_lm_head, the SFT validator that force-disabled chunking, and the liger-kernel dependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: relock without liger-kernel Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: restore _online_logsumexp_and_weighted_update The fused-CE class removal also swallowed this helper (defined between the deleted classes) which the chunked logprob head uses at runtime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * style: ruff Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
d7bcd1b1f5 |
Add MXFP8 Support (#2910)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* Add MXFP8 Linear Layer * Add MXFP8 Receipe * Add MXFP8 * Refractor, remove constants, cleanup * Remove import from local path * Reformat * Add MXFP8 expert parallel impl to support TorchAO's MXTensor in backward for all2all in MXFP8 * Build torchao from source for py3.12 MXFP8 CUDA kernel Pin torchao to the pytorch/ao git source (rev 02105d4) and build its CUDA kernels from source against the local torch cu128 / cpython-3.12. The PyPI wheel ships the MXFP8 kernel as a cpython-310-only .so that fails to load on prime-rl's Python 3.12, so torchao::mxfp8_quantize was never registered with a CUDA backend and MXFP8 died in backward. Building from source produces a cpython-312 extension (_C_mxfp8.cpython-312-*.so). - no-build-isolation-package += torchao (build against local torch) - extra-build-variables: CUDA_HOME=/usr/local/cuda-12.8, TORCH_CUDA_ARCH_LIST=10.0a (B200/sm_100a), USE_CPP=1 Enables the MXFP8 all-to-all and dense-linear paths (verified on 8xB200). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Relax torchao MXFP8 grouped-GEMM torch-nightly gate torchao's _get_tensor_cls_for_config (added in pytorch/ao#4141, "require torch nightly and cuda 12.8+", Mar 2026) asserts two post-2.11.0 DTensor symbols (_ops.scaled_mm_single_dim_strategy, _dispatch.is_pinned_handler) exist, else raises "install the latest torch nightly". This blanket-blocks all MXFP8 training, but is over-broad for us: prime-rl's EP path pulls expert weights local (.to_local()) before the grouped GEMM, so the DTensor scaled-mm strategy is never hit, and current torch's non-single-dim scaled_mm_strategy covers the rest. Neutralize just that assert (MXFP8 branch only) before quantize_, so enable_grouped_gemm works on our pinned torch 2.11 without a nightly bump. Verified 8xB200 SFT (GLM-0.5B, ep=8, grouped_gemm + a2a): 8/8 steps, all ranks; numerics vs bf16 within mxfp8 range (out ~4.8%, grads ~6-7%) for both mxfp8_rceil and mxfp8_rceil_wgrad_with_hp recipes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Use prebuilt torchao wheel from v0.6.0 release (x86_64) Replace the torchao build-from-source git dependency with the prebuilt cp312 CUDA wheel hosted on the prime-rl v0.6.0 release, matching how deep-ep / deep-gemm / nixl-cu12 are shipped. Avoids requiring the CUDA toolchain at install time on x86_64. - torchao source -> release wheel URL, scoped to platform_machine == 'x86_64' (aarch64 continues to resolve torchao from the default index, untouched) - drop torchao from no-build-isolation-package + the extra-build-variables block - add torchao to the exclude-newer-package trusted-sources list Wheel is H100 (sm90a) + B200 (sm100a), built from pytorch/ao@02105d4, verified in a fresh py3.12 env (mxfp8 op registers, a2a imports). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Sort imports in expert_parallel.py (ruff I001) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Fix comments * Fix alignment of 32 for grouped gemm backward * Apply Samis Suggestions * Add back default ignore patterns * Fix name bug * Reformat with ruff * Config verifier * Fix kernel redirect for > 32 token groups * Ruff reformat * chore: update uv.lock for torchao dependency Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * style: fix import sorting in MXFP8 files Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Move config check to config code * Fix ruff * Move config check to trainer --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
6b1604380c |
feat(inference): uint16 routed-experts payload for >256-expert models (#3051)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(inference): uint16 routed-experts payload for >256-expert models serialize_routed_experts packed expert indices as uint8, which overflows for models with >256 experts — NemotronH Super/Ultra route top-22 over 512 experts, so every /generate call with routed-experts capture 500'd (assert array.max() <= iinfo(uint8).max), stalling router-replay training. Make the payload self-describing: pick uint8 when indices fit, uint16 otherwise, and emit the chosen dtype in the payload. Consumers default to uint8 when the field is absent, so payloads from <=256-expert models are byte-identical to before. Decoder half: verifiers feat/routed-experts-dtype (must land first and be pinned here before a >256-expert model enables enable_return_routed_experts). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(trainer): dtype-agnostic routed-experts row size The batch packer sized routed-experts rows via a hardcoded dtype->itemsize table that lacked uint16 (KeyError on the first >256-expert batch). Use np.dtype(...).itemsize instead of maintaining the table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump verifiers to main (dtype-aware routed-experts decode) PrimeIntellect-ai/verifiers#2043 merged — the decoder half of the self-describing routed-experts payload. This pin makes the pair complete: uint16 payloads from this branch's encoder are decoded correctly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: relock for the verifiers bump Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
0d2a7f5a12 |
chore: bump verifiers + research-environments (#3041)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to latest main verifiers -> 1cfdd39c (incl. docker-runtime entrypoint fix #2015). research-environments -> dd80d75b (incl. terminal-bench-2 use_prime_registry fix #668). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: carry provider usage in advantage test rollouts verifiers #2040 made Trace token counts usage-based, so the synthetic rollouts (which only had token ids) reported 0 output/input tokens and the length-penalty tests failed. Attach provider usage to the final sampled turn so num_output_tokens / num_input_tokens reflect the intended lengths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
683377520e |
fix: install DeepEP wheel by architecture (#3035)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
961c11f4cf |
feat(orchestrator): support infinite tasksets (#2993)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(orchestrator): support infinite tasksets An env server may now report num_tasks=None (verifiers#1969: an infinite, procedurally generated taskset). TrainSource streams a monotonic task_idx for such an env - the server generates tasks on demand, so every pull is a fresh task and there are no epochs to shuffle - while finite envs keep their shuffled index table. An eval env with an infinite taskset must set num_examples explicitly. Dormant until the verifiers pin includes #1969: a finite taskset still reports an int count and takes the existing paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers to main (infinite tasksets) + relock Activates the orchestrator's infinite-taskset support: verifiers main now includes #1969, so the procedural v1 tasksets report num_tasks=None. The color-codeword-v1 configs drop their num_examples taskset field (the knob no longer exists - the taskset is unconditionally infinite and the train env streams); CHANGELOG entry for the removed size knobs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: drop CHANGELOG entry Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
d334ea5294 |
chore: release v0.7.0 (#2998)
* chore: release v0.7.0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: sync uv.lock to 0.7.0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
4f5e06fcb6 |
fix: install vllm-router on aarch64 (#3025)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
390dfdc556 |
fix: support DeepGEMM FP8 training on SM100 (#3022)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* fix: support DeepGEMM grouped GEMM on SM100 * Remove FP8 inference instructions Remove FP8 inference section from SKILL.md. Signed-off-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com> * refactor: inline DeepGEMM scale mode * fix: support FP8 linears on SM100 --------- Signed-off-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com> |
||
|
|
cb43db2ad1 |
feat: make all envs uv workspace members, drop the envs extra (#3019)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: make research-environment envs uv workspace members Research envs under deps/research-environments/environments/*/* are now auto-discovered uv workspace members instead of being hand-registered in the `envs` extra + [tool.uv.sources]. Adding a new research env needs no pyproject.toml change - the glob picks it up and it's locked automatically. They are opt-in: `uv sync` / `--all-extras` no longer install them; use `uv sync --all-packages`. Env-running sites (sbatch training templates, gpu/nightly CI, Docker image + entrypoint, nemotron config, example READMEs) gain --all-packages; dev quickstart and cpu unit tests stay lean. tau2-synth-v1 and tau3-bench-v1 are excluded - they pin `tau2` forks/revs that conflict with the canonical tau2-bench-v1 in the workspace's shared lock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: make verifiers envs workspace members, drop the envs extra Extends the workspace glob to deps/verifiers/environments/*, so verifiers-repo envs are auto-discovered members alongside the research envs. Removes the now-empty `envs` optional-dependency and all its [tool.uv.sources] entries, and drops the defunct `--extra envs` from cpu_tests, Dockerfile.cuda, and docker-entrypoint.sh (env members install via --all-packages instead). All 94 env members (66 research + 28 verifiers) lock, install, and import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(ci): install all env packages in cpu_tests test_load_configs parses every config, and parsing a v1-taskset config makes verifiers import the env package to derive its taskset config type. With envs now workspace members, the lean `uv sync --extra flash-attn` left them uninstalled, so 28 config tests failed with ModuleNotFoundError. Add --all-packages so the referenced env packages are importable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
321c8aa825 |
chore: bump research-environments to latest main (#2999)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: drop v0 logic-env and math-env deps These v0 environments are being removed from research-environments in favor of their v1 tasksets (logic-env -> i3_logic_v1, math-env -> math-env-v1, the latter already wired here). Remove the v0 editable path deps + relock so the build doesn't break when deps/research-environments is re-pinned past their deletion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: migrate standalone math configs off v0 math-env to v1 tasksets Move the training configs that used the v0 math-env on an explicit dataset to v1 env sections: gsm8k -> gsm8k-v1 (verifiers), and the Hendrycks/sanity configs -> math-env-v1 (task-facing math_verify_timeout preserved where set). All use the `null` harness + subprocess runtime. Drops the v0-only math_verify_max_workers. qwen30b_math and examples/Intellect-3.1 use the v0 math-env DEFAULT (INTELLECT-3-RL math), so they migrate to i3_math_v1 instead — deferred to the submodule bump. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: bump research-environments to latest main and fix moved env paths Bump deps/research-environments 504bd2620 -> 54f30788f, which includes the v0->v1 migration (#653), the environment grouping reorg (#655), frontierscience v1 (#656), and swebench deprecation (#651). The reorg moved every env into a category subdir (math/, knowledge/, search/, tool_use/, long_context/, code/, reasoning/, science/, if/, terminal/), so update all 44 editable path deps in [tool.uv.sources] accordingly, and relock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: re-bump to research-environments with i3_math_v1; migrate qwen30b_math Re-bump deps/research-environments 54f30788f -> 06232831f (adds i3_math_v1, #660). Wire i3-math-v1 (INTELLECT-3-RL math) and i3-logic-v1 (INTELLECT-3-RL logic) as editable path deps, and migrate examples/qwen30b_math (v0 math-env's INTELLECT-3-RL default) to the i3_math_v1 v1 taskset. Relock. examples/Intellect-3.1 is left on v0 for a dedicated recipe pass (it mixes 6 v0 envs — mini-swe-agent-plus/deepdive/math-env/logic-env/code-env/aime2025 — several without a clean 1:1 v1 mapping); it still validates (v0 sections aren't imported). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: migrate remaining config/example env refs to installed v1 envs Sweep every configs/ + examples/ env reference so all resolve to installed envs (no Environments-Hub downloads, no removed v0 envs): - mini-swe-agent-plus -> r2e-gym-v1 (default harness, prime runtime): Intellect-3.1, qwen30b_swe, minimax_m2.5_swe, glm5_pd_disag - Intellect-3.1 recipe fully to v1: deepdive->deepdive-v1 (rlm+search), math-env-> i3_math_v1, logic-env->i3_logic_v1 (filter max 0.874), code-env->i3_code_v1, aime2025->aime25-v1 - aime2025->aime25-v1 (qwen30b_math eval) - de-Hub primeintellect/*: wordle->wordle, alphabet-sort->alphabet-sort, wiki-search->wiki-search, aime2024->aime24-v1 (hendrycks_sanity eval) - general-agent-solver-rlm -> general-agent-v1 taskset (colocated tools; configs/general_agent/*) All target envs are already in the `envs` extra (no lock change). All configs parse under the schema; audit shows 0 unresolved env references. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: SWE eval -> swebench-verified-v1; lowercase Intellect-3.1 dir - Point the SWE *eval* env at swebench-verified-v1 (train stays r2e-gym-v1) in Intellect-3.1, qwen30b_swe, minimax_m2.5_swe, glm5_pd_disag. - Rename examples/Intellect-3.1 -> examples/intellect-3.1 (lowercase) and update the docs/configuration.md link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: drop "-quick" from SWE eval name (now full swebench-verified-v1) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: runtime labels use the run name, not the env name Set the prime-runtime sandbox labels to each config's run identifier (its wandb project) instead of per-env tags like ["deepdive"] / ["mini-swe-agent-plus"]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: prime-runtime labels = [run name, env name] Convention: tag prime sandboxes with both the run identifier (wandb project) and the env name, e.g. ["intellect-3.1", "swe"] / ["intellect-3.1", "deepdive"]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: slim install parses an SFT [slurm] config (RL configs are now v1) The slim "parse a real config" step parsed examples/Intellect-3.1/rl.toml, which (a) was renamed to lowercase and (b) is now a v1 recipe — v1 env sections resolve/ import their taskset at parse (vf.EnvServerConfig), and those env packages aren't installed in the slim (prime-rl-configs-only) env. Point it at an SFT [slurm] config (no env sections) so it still verifies slurm/template_path handling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: slim install also parses the reverse_text RL config (v0 env, [slurm] compose) Cover both paths on the slim install: the SFT [slurm] config and the reverse_text RL recipe (rl.toml @ slurm_rl.toml). The RL one parses because reverse-text is a v0 env id (resolved lazily, not imported at parse), so no env package is needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
9e0d242cd0 |
chore: bump research-environments and verifiers to 0.2.0 (#2995)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
4bbf967a57 |
feat: adapt to verifiers task-centric Task/TaskData split (#2987)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: adapt to verifiers task-centric Task/TaskData split Companion to PrimeIntellect-ai/verifiers#1948: Trace is now generic over TaskData (DataT), the wire task type is WireTaskData, and vf.Task is the behavior class — placeholder wire tasks construct vf.TaskData. Taskset knobs that moved onto TaskConfig nest under taskset.task in configs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers (from_trace is an opt-in hook) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments to the task-centric port All v1 envs in research-environments now speak the task-centric API (PrimeIntellect-ai/research-environments#650); general_agent's tools placement knob nests under taskset.task like the other moved knobs. Full unit suite green against the pinned branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: adapt to the nested trace.task carrier Companion to verifiers recording the producing task class on the trace (trace.task -> {type, data}): dispatcher placeholders wrap their rows in vf.TraceTask (type="Task" — no behavior class ever ran), readers nest (.task.idx -> .task.data.idx), and the wandb sample tables keep showing the row. Bumps both submodule pins. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers (compact harness nested-task fix) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers (simplify-API merge + review fixes) Compat-audited: every surface prime-rl imports is unchanged or already adapted; unit suite green (544) and 10-step reverse_text/gsm8k debug runs healthy against the pinned tip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(configs): glm45air search judges nest under taskset.task main's new search config predates the task-centric knob move: plugged judges live at taskset.task.judges and browsecomp's judge endpoint at taskset.task.judge. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump submodule pins (codex feature-tool disable, sandbox version fix) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers (replay recomputes from scratch) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/verifiers to main (task-centric tasks merged) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments (verifiers dev443 floors) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments (python floor + prerelease test fix) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments (port changelogs) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments (swe taskset ports) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments (stale comment) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: bump deps/research-environments to main (v1 ports merged) + relock Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
1877714656 |
exp: search + terminal ablations (#2915)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* exp: GLM-4.5-Air RL configs for the search + terminal env domains Two self-contained 2-train + 4-infer-node configs (configs/glm45air_search_terminal/) mirroring configs/debug/v1/glm45air_scaleswe.toml (glm4_moe router replay, glm-4.5 renderer, cp=8 ulysses, muon, LM-head chunking, AC/offload), with GRPO + linear length penalty, the rlm harness, and the prime runtime for every env under a single per-run label: - search.toml (label glm45air-search): rlm `search` skill; train deepdive-v1 / papersearchqa-v1 (split=train) / wideseek-v1 (split=hybrid), eval browsecomp-v1 / openseeker-v1 / redsearcher-v1. - terminal.toml (label glm45air-terminal): rlm ipython; train scaleswe-v1 / r2e-gym-v1, eval swebench-verified-v1 (use_prime_registry) / swebench-pro-v1 / terminal-bench-2-v1. Both validate via RLConfig.model_validate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: correct search/terminal env sets - search: openseeker-v1 + redsearcher-v1 are train sources (move from eval); deepdive stays train (qa_rl; no held-out eval split). Eval is browsecomp-v1. - terminal: SWE (scaleswe/r2e-gym) is a separate domain — train on the terminal sets instead (openthoughts-tblite-v1 = terminal-bench-lite, uuid-ctf-v1 = synthetic forensic CTF). Keep the sandbox-benchmark evals (terminal-bench-2-v1 primary; swebench-verified/pro as references). Both pass RLConfig.model_validate; all env ids are locked in pyproject. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: full eval at avg@1 (drop num_examples/group_size caps); terminal evals tb2 only Eval blocks now use the defaults (num_examples=-1 → all, group_size=1 → avg@1). Terminal evals on terminal-bench-2-v1 only for now (dropped the swebench-verified/pro cross-domain evals). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: bump verifiers to forward_env; forward SERPER_API_KEY on search envs Bump deps/verifiers 62ba2212 -> 842f6b18 (verifiers main incl. forward_env on HarnessConfig) and set forward_env = ["SERPER_API_KEY"] on every search harness, so the rlm search skill gets the key inside the prime sandbox. SERPER_API_KEY must be exported in the launch environment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: consolidate glm45air configs under configs/glm45air/; 131k ctx, node-local caches Move search/terminal configs into configs/glm45air/ alongside swe.toml (rebased from exp/scaleswe-lp). All three: seq_len/max_model_len -> 131072; drop default inference args (gpu_memory_utilization, enable_prefix_caching) and eval skip_first_step; node-local caches (/tmp/.{vllm,triton,flashinfer}-cache-$(whoami)). search/terminal get the linear length penalty at 0.1 on all three terms. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: terminal-lego train env + Qwen3-235B judge for search envs - terminal.toml: train env -> terminal-lego-v1 (drops openthoughts-tblite + uuid-ctf); eval stays terminal-bench-2-v1 only. - research-environments submodule -> feat/terminal-lego-v1-port (adds terminal-lego-v1); registered in pyproject envs extra + tool.uv.sources; uv.lock updated. - search.toml: judge -> Qwen/Qwen3-235B-A22B-Instruct-2507 (temperature 0) on all six search envs (judge client already defaults to PI inference). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: add papersearchqa held-out test eval, cap large evals at 500, drop default project_dir - search.toml: add papersearchqa `test` split as an eval env (held-out signal); cap browsecomp (1266) and papersearchqa-test (5000) evals at num_examples=500. - drop `project_dir = "."` from all three configs (it is the SlurmConfig default). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: split wandb projects (search-ablations / terminal-ablations); drop stale length-penalty comment - search.toml -> wandb project "search-ablations"; terminal.toml -> "terminal-ablations". - remove the stale "GRPO + linear length penalty (... default weights)" comment (weights are 0.1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: static node-local cache dirs (drop $(whoami)) inference.env_vars are passed literally to vLLM (not shell-expanded), so "$(whoami)" landed verbatim in the FlashInfer ninja build path and broke it ("bad $-escape"), disabling the allreduce-norm fusion. Nodes are exclusive, so per-user suffixes are unnecessary: use static /tmp/.{vllm,triton,flashinfer}-cache. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: search judge uses default sampling (drop temperature=0 override) Remove sampling={temperature=0} from the Qwen3-235B judge on all search envs; keep the model override, let the judge use its default sampling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: search+terminal batch_size 256->512, max_inflight 512->768 Raise per-step batch (256->512 groups) and inflight-rollout concurrency cap (512->768) for both glm45air search and terminal ablations. The prior 512 cap sat ~42% utilized under the weight-sync barrier, so lift concurrency and grow the batch to keep inference busier per step. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: search v2 run — job/wandb name glm45air-search-v2 Fresh search ablation from step 0 on the pulled branch (vLLM 0.24 + dispatch-gate fixes) with the new 512 batch / 768 inflight config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: hardcode prime sandbox cleanup label in glm45air configs Decouple pre_run_command's sandbox-delete label from $SLURM_JOB_NAME and pin it to each run's harness label. Fixes search.toml, where job_name (glm45air-search-v2) diverged from the harness label (glm45air-search), so pre-run cleanup targeted a label no sandbox carried. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: search v2 — train openseeker+redsearcher, eval browsecomp, batch 256 / concurrency 512 Trim search train set to openseeker + redsearcher and eval to browsecomp only. Drop orchestrator batch_size 512->256 and max_inflight_rollouts 768->512 to match the swe runs (was over-driving inference). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp: search v3 — rlm auto-compaction (train draw 65536-131072 per task, eval fixed 98304) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * exp: terminal train on tmax-v1; eval swebench-verified + terminal-bench-2 - swap terminal train env terminal-lego -> tmax-v1 (TMax Harbor taskset) - eval both swebench-verified and terminal-bench-2 every 20 steps - bump research-environments to latest main (adds the tmax-v1 taskset) - bump verifiers to origin/main (dev422), required by latest research-envs (browsecomp-v1 + others now pin verifiers>=0.1.15.dev422) - register tmax-v1 in pyproject envs + sources; relock Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * exp: search v3 — migrate judge config to plugged judges list (post vf-bump schema) openseeker/redsearcher: taskset.judge is gone; declare [[taskset.judges]] reference entries (reward key 'correct', A/B verdicts, Qwen3-235B judge model). Note the taskset-plugged BC-style prompt is replaced by the reference judge's stock prompt. browsecomp keeps its taskset.judge field (still valid on BrowseCompConfig). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * exp: terminal v2 — bump job + wandb name to glm45air-terminal-v2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * exp: keep base run names in configs — version suffix goes on the launch CLI (--slurm.job-name / --wandb.name, e.g. glm45air-search-v3) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * exp(glm45air): terminal + search ablation config updates terminal: - terminal-bench-2 eval at avg@4 (group_size=4) - add weight-0 rlm + swe rubric monitors (GLM-5.2 judge) on train + eval envs - drop length penalty on output tokens (input/turns kept) - run prime runtime as micro-VM (vm=true) search: - add weight-0 rlm rubric monitor (GLM-5.2 judge) on train + eval envs - drop length penalty on turns + output tokens (input kept) - run prime runtime as micro-VM (vm=true) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp(glm45air): trim header comment blocks from search + terminal configs Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp(glm45air): drop tmax taskset inline comment Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp(glm45air): disable idle_timeout on vm prime runtimes The Prime API rejects idle_timeout_minutes for VM sandboxes (HTTP 422), and the prime runtime defaults idle_timeout to 1h. A debug eval rollout on scaleswe-v1 + swebench-verified-v1 (vm=true, use_prime_registry) failed at provisioning until idle_timeout was cleared. Set idle_timeout = "None" on every vm=true prime runtime (coerced to None; VM lifetime stays bounded by timeout_minutes). Re-ran both envs: VM provisions, image pulls from the prime registry, rollout runs to the 10-turn cap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp(glm45air): run swe config on prime micro-VM Match the terminal/search ablations: run scaleswe train + swebench-verified eval on vm=true prime runtimes with idle_timeout = "None" (the Prime API rejects idle_timeout_minutes for VM sandboxes). Also set use_prime_registry on the scaleswe taskset so its image resolves from the Prime platform registry (pullable on the VM), matching swebench-verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * exp(glm45air): comment out rlm/swe rubric monitors (vm-only test) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: register tmax-v1 taskset in pyproject The terminal ablation config references the tmax-v1 taskset, but the package was never added to the envs extra, so config loading failed with ModuleNotFoundError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * exp: align swe/terminal ablation configs with search - swe: length penalty on input tokens + turns only (drop output-token term), matching terminal - terminal: batch_size 256 / max_inflight_rollouts 512, matching swe and search - swe + terminal: rlm auto-compaction like search — train draws a per-task threshold in [65536, 131072], eval compacts at 98304 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
6bfbd64aef |
chore(deps): bump verifiers + research-environments to latest main (#2976)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bump both submodules to their current upstream main: - verifiers: 50883f16 -> a497ee52 - research-environments: 404f0fa8 -> 3e3b5ac3 Reconcile pyproject/uv.lock with upstream changes: - research-environments moved the SWE tasksets under environments/swe/, so repath r2e-gym-v1, scaleswe-v1, swebench-pro-v1, swebench-verified-v1 and swelego-v1 to environments/swe/<name>. - research-environments removed the v0 general_agent and rlm_search envs (#646), so drop general-agent and rlm-search from the `envs` extra and [tool.uv.sources]. general-agent-v1 is unaffected. verifiers is consumed only via the verifiers.v1 namespace; the removed verifiers.rl / verifiers-rl code and the RolloutContext->ModelContext rename do not touch prime-rl. Verified `uv sync --extra envs` resolves, all 64 env dists install, the moved SWE envs import, and prime-rl's verifiers.v1 imports (incl. EnvConfig(vf.EnvServerConfig)) still work. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
1b028ca1d1 |
bump depsj (#2967)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
1ab29c0587 |
fix(deps): refresh flash-linear-attention lock to unbreak GDN training on Hopper (#2939)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
At the locked rev (bd67d11, June 22) fla's tilelang chunk_bwd_dqkwg fails to JIT for sm_90a (tvm InternalError: Get different layout for b_dq), and the Triton fallback is guard-blocked on Hopper (wrong dg/db/dk, fla#640) — so any GDN model (Qwen3.5-MoE, Qwen3-Next) crashes at the first backward on H100/H200. Upstream fixed the kernel in fla#975 (June 29). fla is an unpinned git dep, so this is a lock-only refresh: bd67d11 -> a954753. Co-authored-by: fares <fares@primeintellect.ai> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
5e6b641574 |
fix(deps): bump torchtitan to 23e4dfc to fix EP grad-clip crash with empty ep_grads (#2911)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bumps torchtitan one commit forward (a1fdd7e -> 23e4dfc) to pull in pytorch/torchtitan#1541, which guards _clip_grad_norm_with_ep against calling .full_tensor() on a plain Tensor when ep_grads is empty. This crash surfaces when EP is enabled but no trainable parameter is EP-sharded — e.g. LoRA targeting only non-expert modules, or PP+EP setups where some PP ranks own no MoE layers — causing get_total_norm([]) to return tensor(0.) (a non-DTensor) and the subsequent .full_tensor() to raise AttributeError at step 0. The diff between the two torchtitan commits is exactly this one fix (torchtitan/distributed/utils.py, +6/-1); all other prime-rl imports from torchtitan (ExpertParallel, expert_parallel, TOKEN_GROUP_ALIGN_SIZE_M, generate_permute_indices) are unchanged. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com> |
||
|
|
9fede0ac78 |
feat: auto-create curated W&B overview view per project (#2933)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: auto-create curated W&B "overview" saved view per project Creates an idempotent "overview" saved view (train / eval / stability / performance sections) on the first run into a W&B project, so a new project gets a usable overview without hand-picking panels from the thousands of logged metrics. - New src/prime_rl/utils/monitor/workspace.py builds the view via wandb-workspaces - WandbMonitor creates it after wandb.init (run's primary process, online only, best-effort so a failure never breaks training; skips if it already exists) - Per-env train/<env> and eval/<env> sections built from the orchestrator's resolved env names; single train env collapses to train/<env>, multiple add train/agg on top - inference/* panels use the wall-clock x-axis (they are logged against _timestamp); every other panel uses `step` - Config: WandbConfig.create_overview (default True; --wandb.no-create-overview) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: add time/wait_for_batch to overview performance section * feat: always create overview when wandb enabled (drop create_overview config) * chore: rename overview env-name params to train_env_names/eval_env_names * chore: make overview metric/layout constants public * feat: version overview on env-set change; make helpers public, inline x_for * refactor: fold overview view code into monitor/wandb.py * docs: note deliberate metric volume + auto-created W&B overview view * feat: unify train/eval overview metrics (reward vs avg@), all subset only * chore: drop perf throughput/throughput_per_gpu/peak_memory from overview * fix: isolate per-view load in overview reuse loop so one bad view doesn't abort --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
b2b4f3f711 |
feat: bump vLLM 0.23.0 -> 0.24.0 (#2921)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: bump vLLM 0.23.0 -> 0.24.0 Base runtime bump. Changes: - pyproject.toml: `vllm>=0.24.0` + the x86_64/aarch64 wheel URLs to v0.24.0 (cu129 cp38-abi3); uv.lock regenerated (vllm 0.24.0 pulls humming-kernels 0.1.6, prometheus-fastapi-instrumentator 8.0.2, starlette 1.3.1; drops gguf). - weight_transfer.py: 0.24 turned `FusedMoE` into a factory returning a `MoERunner` and split its state -- the expert map now lives on `MoERunner.routed_experts` (RoutedExperts) and EPLB state on `MoERunner.router`. `isinstance(module, FusedMoE)` would raise TypeError. Rewrote `build_expert_map`/`_build_expert_source_indices` to match `MoERunner` and read both submodules. Keying by the MoERunner name still prefix-matches the nested `routed_experts.*` params in load_weights_kernel. (Only reached on the quantize_in_weight_transfer=True path.) - patches.py: verified all 7 monkeypatches still apply on 0.24; only a docstring version ref updated (is_3d_moe_weight still defaults True in 0.24). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(inference): rebase monkey_patch_no_moe_lora onto vLLM 0.24 __post_init__ 0.24 made FusedMoEConfig.intermediate_size the ctor field and intermediate_size_per_partition a -1 sentinel that __post_init__ must compute. The patch replaced __post_init__ with a verbatim-0.23 copy that never set it, leaving intermediate_size_per_partition=-1 (silent corruption of every downstream consumer) and dropping the % tp_size assert + aiter/mori/platform guards. Mirror 0.24's body verbatim, then flip is_lora_enabled off. Found in a second-pass audit of all 16 active monkeypatches (registered across patches.py, orchestrator.py, server.py, worker/__init__.py); the rest KEEP. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(inference): drop 2 LoRA reload monkeypatches for vLLM 0.24 native load_inplace 0.24's native OpenAIServingModels.load_lora_adapter reuses the existing lora_int_id on a same-name reload and repoints the path, and its worker LRUCacheWorkerLoRAManager.add_adapter force-reloads when lora_request.load_inplace is True -- exactly what monkey_patch_load_lora_adapter and monkey_patch_LRUCacheWorkerLoRAManager reimplemented by copying upstream bodies. Replace both with the native path plus a small mechanism in prime-rl's /load_lora_adapter endpoint: - set load_inplace=True on the incoming request so 0.24 doesn't reject the same-name reload and the worker re-reads the new weights during add_lora; - reset the *stored* LoRARequest's load_inplace back to False afterward, because it is a sticky field that _maybe_get_adapters hands to every generation request -- left True it would force a per-scheduler-step disk reload (the perf trap the old _apply_adapters(force_load=False) override avoided). The orchestrator awaits this endpoint before dispatching rollouts for the new policy version, so the reset lands before any generation resolves the adapter. Also refresh stale "vLLM 0.23.0" version refs in comments to 0.24.0 where the described behavior was re-verified against the 0.24 source (minimax gate dtype, V2-runner routing rationale, NemotronH layerwise-reload shim -- the latter's counting path is byte-identical in 0.24, so the shim stays needed). Requires a live LoRA weight-sync run to validate before merge: confirm the adapter picks up fresh weights each step AND that there is no per-step reload regression. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * style: ruff format (unwrap lines within 120-col limit) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(inference): simplify monkey_patch_no_moe_lora to wrap upstream __post_init__ The previous version copied vLLM 0.24's FusedMoEConfig.__post_init__ body verbatim (intermediate_size_per_partition compute, ROCm/aiter/mori guards, platform checks) just to append `is_lora_enabled = False` -- carrying a drift-prone "keep in sync with upstream" burden plus _aiter_ops/current_platform imports. `is_lora_enabled` is never read inside __post_init__ (only later during kernel selection in modular_kernel.py / oracle/unquantized.py), so flipping it after the original runs is equivalent. Wrap the original instead: it computes intermediate_size_per_partition and runs every guard itself, so nothing can drift and the -1 sentinel can never leak. Verified against the 0.24 wheel: with tp_size=2, intermediate_size_per_partition = 128 and is_lora_enabled = False. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(inference): reset load_inplace unconditionally in /load_lora_adapter Previously the sticky-flag reset ran only on success, so an ErrorResponse returned before resetting. Not triggerable on vLLM 0.24 (native load_lora_adapter stores the adapter only after add_lora succeeds, and builds a fresh request rather than mutating the stored one), but the correctness relied on that vLLM-internal invariant. Reset whatever is stored for the name regardless of outcome so a lingering load_inplace=True can never force a per-scheduler-step disk reload, independent of vLLM internals. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(inference): remap flat MoE kernel wire names to vLLM 0.24 routed_experts params vLLM 0.24 nests FusedMoE expert weights under MoERunner.routed_experts (...experts.routed_experts.w13_weight), while the trainer's convert_layer_to_vllm_kernel still emits the pre-0.24 flat names (...experts.w13_weight). load_weights_kernel's 'name not in params' gate fired before the expert-map prefix match, so the first fp8 kernel weight update raised 'Kernel weight transfer skipped N weights not found in model'. Wrap the incoming stream with upstream's remap_moe_expert_weights, the compat shim vLLM ships for exactly this transition (covers w13/w2 weights and their _scale_inv variants; leaves gate/shared_experts names untouched). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(inference): drop NemotronH mixer.D reload shim, fixed upstream in 0.24 vllm-project/vllm#44814 did land in the pinned 0.24.0 release - in reload/meta.py, which caps copied_numel at param.numel() to fix the composed_weight_loader double-count that finalized layers early and dropped Mamba mixer.D. The earlier audit diffed mamba_mixer2.py and reload/layerwise.py (byte-identical) and missed it. The capture/restore shim is now dead weight on every non-quantized weight update; remove it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(inference): LoRA/MoE patch hygiene for vLLM 0.24 - Drop monkey_patch_skip_lora_module_warnings: the per-module regex warning loop it skipped was removed upstream before 0.23, so it was a pure drift-carrier - its _load_adapter copy silently dropped 0.24's moe_ep_spec= passthrough (EP read-time expert filtering) and the lora.is_3d_lora_weight stamp (needed for enable_mixed_moe_lora_format). Stock _load_adapter now runs in workers. - Re-derive _patch_lora_key_prefix's from_local_checkpoint copy from the 0.24 original so the stock caller's moe_ep_spec= kwarg is accepted; keeps only the real payload (accept bare-suffix OR qualified expert module names) and picks up the EP remote-expert pruning + tensorizer hardening. Docstring rewritten: vllm#38522 was closed unmerged and the base_model.model. prefix case is handled upstream. - Drop the MiniMax M2 forward patch: the MoERunner already all-reduces internally (_maybe_reduce_final_output), so the patched forward's extra tensor_model_parallel_all_reduce doubled the MoE output at TP>1. Upstream's forward needs no changes; the gate rebuild + hf_to_vllm mapper stay. - Remove the dead transformers-v5 tie_word_embeddings shim (class attr exists on the pinned transformers, guard never fired) and refresh stale comments: DP coordinator upstream timeout is 120s not 30s; 0.24 routes MoE archs (DeepseekV2/Qwen2Moe/GraniteMoe) to the V2 runner by default too, making the forced V1 more load-bearing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(inference): rename transformers_v5_compat to apply_shared_vllm_patches The function is the vllm.general_plugins entry point dispatching the six patches that must run in every vLLM process; the transformers-v5 shim it was named for was removed. Entry-point target updated in pyproject.toml (vLLM swallows plugin load failures, so a stale target would silently skip all patches - uv run re-syncs metadata automatically). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(inference): restore 0.23 parser semantics + guard new 0.24 request validation vLLM 0.24 behavior changes outside this branch's original diff surface: - qwen3_coder (parser engine) now full-strips every tool parameter value where 0.23 trimmed exactly one leading/trailing newline, corrupting whitespace-significant args (str_replace old_str/new_str, indented file content). Restore single-newline trim via monkey_patch_qwen3_coder_param_newline_trim (also covers nemotron_v3, which reuses qwen3_config). - minimax_m2's engine swallows the literal </think> in CONTENT state and strips content on tool turns, breaking minimax_m2_append_think round-tripping. Drop the (CONTENT, THINK_END) transition and disable the strip. - VLLM_ENFORCE_STRICT_TOOL_CALLING default flipped to True in 0.24: structural-tag constrained decoding for required/named/strict tools would sample a distribution the trainer never sees. Default it off in setup_vllm_env. - 0.24 rejects temperature > 2.0 at request validation; mirror the bound in TrainSamplingConfig/EvalSamplingConfig so misconfigured sweeps fail at config load, not per-rollout with HTTP 400s. - Fix stale 30s -> 120s DP-coordinator timeout comment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(inference): cover plugin entry-point load, MoE kernel remap, MoE mismatch KL CI could not see three load-bearing paths of the 0.24 bump: - vLLM swallows vllm.general_plugins load failures, so a stale/misnamed entry point (renamed on this branch) silently drops every shared patch; load it exactly like vLLM does and assert the padded-input scrub applied. - The MoERunner weight-sync rewrite (flat trainer names -> nested routed_experts params via remap_moe_expert_weights, expert-map prefix slicing) is only reachable via NCCL broadcast, which no CI config uses; exercise load_weights_kernel directly on a fake module tree. - reverse_text_moe asserted exit code only; add a trainer/inference mismatch-KL bound so silent MoE weight corruption fails the job. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: address review — drop test additions and comment flourishes Per review: remove the plugin entry-point test, the weight-transfer kernel unit tests, and the reverse_text_moe mismatch-KL addition; trim the vLLM-0.24 references from the temperature docstrings (the le=2.0 bound stays). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: faresobeid <111092724+faresobeid@users.noreply.github.com> Co-authored-by: hallerite <git@hallerite.com> Co-authored-by: fares <fares@primeintellect.ai> |
||
|
|
50aeb3c7d6 |
chore(deps): bump research-environments + wire s1-deepresearch-v1/arxivmath-v1 (#2934)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore(deps): add s1-deepresearch-v1 + arxivmath-v1 environments to pyproject.toml + uv.lock Bumps the research-environments pin to pick up the two new bring-your-own-search v1 tasksets: - s1-deepresearch-v1: ScienceOne-AI/S1-DeepResearch-15k closed-ended deep-research QA (6000 verifiable tasks, en/zh filter), binary semantic LLM judge. - arxivmath-v1: MathArena/arxivmath-training research-level math (2605 tasks), in-runtime math-verify scoring of the boxed answer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(deps): bump research-environments for trace.last_reply scoring fix Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(deps): bump research-environments to merge with upstream main Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(deps): relock for research-environments verifiers pin bumps The submodule merge brought main's env pyproject updates (verifiers pins unified to >=0.1.15.dev411), which uv.lock records as requires-dist metadata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(deps): bump research-environments to merged main (s1-deepresearch/arxivmath #630) 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> |
||
|
|
fd5db5df6a |
chore(deps): add longpdfs-v1 environment to pyproject.toml + uv.lock (#2920)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
The longpdfs-v1 environment was added to research-environments main (commit f1bdab50f, PR #542) but was missing from this PR's pyproject.toml. - Add longpdfs-v1 to envs optional dependencies and [tool.uv.sources] - Add longpdfs-v1 package entry to uv.lock Co-authored-by: Sami Jaghouar <sami@primeintellect.ai> |
||
|
|
7b7c7efdfa |
chore(configs): migrate v1 harness ids for the verifiers null/default rename (#2919)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
2e2accb121 |
fix(deps): enable verifiers[harbor] extra so swebench-verified eval loads (#2917)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
The `swebench-verified-v1` (and other Harbor) tasksets require the Harbor CLI, shipped via the `harbor` extra of the `verifiers` package. The root project depended on plain `verifiers`, and `uv sync --all-extras` only enables the root project's own extras (not a dependency's), so `harbor` was never installed — the eval env-pool worker crashed in `load_tasks()` with `RuntimeError: Harbor tasksets require the Harbor CLI`. Switch the root dep to `verifiers[harbor]` so `harbor==0.14.0` is pulled in (and lands on SLURM compute nodes via the sbatch `uv sync --all-extras`). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
2a0007f51d |
chore: bump verifiers + research-environments to main (#2904)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to main - verifiers: aa95826d → 97be43bf - research-environments: 99ebd2e13 → bae0ffe5a - lock new v1 envs: lean-v1 (6 per-dataset Lean tasksets), prolog-v1 - bump verifiers floor 0.1.15.dev400 → dev404 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: lock remaining research-environments v1 envs Lock the 21 previously-unlocked RE v1 env packages into the `envs` extra + tool.uv.sources, and alphabetize both the `envs` list and the env source entries. tau3-bench-v1 is intentionally excluded: it requires tau2 @ git 58e5e1a, which conflicts with the tau2 @ 337326e pinned by the already-locked tau2-bench-v1 (uv cannot resolve two URLs for one package). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: drop rlm-swe to remove the verifiers override rlm-swe pins verifiers>=0.1.15.dev17,<0.1.15.dev156 — a stale upper bound that conflicts with the editable verifiers submodule (dev404) and with the other envs / prime-rl-configs. It was the sole reason verifiers needed a global override-dependencies entry (without it, resolution is unsatisfiable). Dropping rlm-swe lets us remove that override: verifiers now resolves to the editable submodule through tool.uv.sources alone. Also prunes rlm-swe's heavy transitive deps (modal, swebench, swe-rex, pygithub, …) from the lock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: migrate rlm_swe config dependents to r2e-gym-v1 Dropping the rlm-swe env orphaned its in-repo config dependents: - examples/glm5_llmd/rl.toml: migrate the v0 `rlm_swe` env block to the v1 `r2e-gym-v1` taskset on the rlm harness (prime runtime), mirroring configs/debug/v1/r2e_gym.toml - configs/rlm_swe/qwen35_4b.toml: remove (superseded by configs/debug/v1/r2e_gym.toml) - skills/training/start-run: point the find_spec example at r2e_gym_v1 - configs/debug/v1/r2e_gym.toml: drop the stale reference to the removed v0 config Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
4e7bc94fcd |
Update configs for renderer thinking retention (#2900)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
0be5ac452a |
feat: algorithm abstraction — named algorithm classes + inline frozen-model references (grpo, opd, sft_distill, self_distill, echo) (#2746)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
3cbeb5d0f1 |
feat: vLLM 0.23 bump + GLM-5.2 16-node P/D inference config (mooncake + llm-d) (#2883)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump vLLM to 0.23.0 and prune/adapt monkeypatches Bump vllm 0.22.0 -> 0.23.0 (pyproject + regenerated uv.lock). Remove two now-redundant monkeypatches (verified against 0.23.0 source, adversarially double-checked): - monkey_patch_deep_gemm_silu_mul_quant_int64: upstream kernel already uses int64 pointer arithmetic, so the patch was a behavioral no-op. - _patch_qwen35_lora (vllm#36372): the Qwen3.5 GDN LoRA IndexError is fixed natively in vLLM; the patch is redundant and would corrupt the native path. Adapt two patches the bump moved/changed: - serving_tokens: get_max_tokens moved out of the deleted vllm.entrypoints.utils to vllm.entrypoints.serve.utils.api_utils (import-time breakage otherwise). - monkey_patch_minimax_m2_for_lora: the MoE gate is now GateLinear (was ReplicatedLinear); rebuild as GateLinear(out_dtype=float32) with a bf16 weight so the LoRA Triton kernel's bf16/fp16 assertion passes while router logits stay fp32. Default VLLM_USE_V2_MODEL_RUNNER=0: vLLM 0.23.0 routes dense Llama/Mistral/Qwen3 to the V2 GPU model runner, which has no _preprocess hook for the padded-input scrub and does not zero the padded decode tail itself, reproducing NaN logits. Forcing V1 keeps the scrub effective for every model and is also required for routed-experts capture. setdefault keeps it overridable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(inference): cite vllm#44814 as the NemotronH mixer.D reload fix The _restore_reload_corrupted_params workaround's removal trigger was vague ("once the upstream bug is fixed"). The upstream fix is vllm-project/vllm#44814 (merged 2026-06-10), which is NOT in the pinned 0.23.0 release, so the workaround is still required. Record the root cause (mixer.A's composed_weight_loader double-count drops the trailing mixer.D) and the exact removal condition. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(configs): add GLM-5.2 16-node P/D mooncake + llm-d inference config Standalone `inference` deployment for GLM-5.2-FP8 on 16 nodes: disaggregated 8 prefill (4 replicas) + 8 decode, mooncake distributed CPU KV store, llm-d router (EPP+Envoy), vLLM 0.23. Requires source-built NIXL/UCX 1.19.x (scripts/install_nixl_from_source.sh) — the wheel UCX segfaults on P/D KV transfer. Validated: 1000-req/500-concurrent burst, 0 faults / 0 RPC_FAIL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(inference): keep Qwen3.5-MoE on 2D per-expert LoRA format Dropping _patch_qwen35_lora wholesale also removed the Qwen3_5MoeForConditionalGeneration.is_3d_moe_weight = False override. vLLM 0.23.0 defaults that flag to True, so the LoRA loader expects 3D stacked-expert adapters, but our trainer emits the 2D per-expert layout (MultiLoRAGroupedExperts.state_dict_for_adapter) which vLLM only reads when is_3d_moe_weight is False (or enable_mixed_moe_lora_format=True). Without the override Qwen3.5-MoE LoRA adapters fail to load. Re-add it as a minimal standalone patch. The rest of the old shim (in_proj_qkvz packed-mapping + N-slice can_replace_layer/slice_lora_a for vllm#36372) stays removed -- 0.23.0 handles it natively via expand_packed_lora. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(dockerfile): bake NIXL-from-source into base image The PyPI nixl wheel ships its own UCX that segfaults on prefill->decode KV transfer (#2883). Rebuild NIXL against the UCX 1.19 we already compile in the builder stage so the disagg P/D path works without per-host rebuilds. Adds ~5 min to the amd64 build. arm64 unchanged for now — NIXL upstream should support it but hasn't been validated here. * gate NIXL build behind INCLUDE_NIXL_FROM_SOURCE arg Default off — base build stays identical. The hosted-rl workflow that builds the disagg P/D variant passes --build-arg INCLUDE_NIXL_FROM_SOURCE=1 (and should tag-suffix the result, e.g. prime-rl:<ver>-nixl-amd64, to keep image streams disambiguated). * fix(dockerfile): seed pip into venv before building NIXL wheel uv-created venvs don't include pip by default. Mirror install_nixl_from_source.sh which seeds it via 'uv pip install pip' before invoking 'python -m pip wheel'. Also swap the final install to 'uv pip install' so we don't depend on the .venv/bin/pip shim either. * feat(dockerfile): opt-in disagg extras build (INCLUDE_DISAGG_EXTRAS) Adds --build-arg INCLUDE_DISAGG_EXTRAS=0 (default) gating --extra disagg in the uv sync step. The disagg extra installs deep-ep, deep-gemm and quack — heavy source builds only the disaggregated-MoE inference path needs (e.g. GLM-5.2 16-node P/D with deepep_high_throughput). Default off so training-only / single-node inference builds are unaffected. Enable via --build-arg INCLUDE_DISAGG_EXTRAS=1; pairs with --build-arg INCLUDE_NIXL_FROM_SOURCE=1 (#2885) for full disagg P/D images. --------- Co-authored-by: hallerite <git@hallerite.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: faresobeid <fares@primeintellect.ai> Co-authored-by: Jannik Straube <info@jannik-straube.de> |
||
|
|
d1f366b1bc |
chore: bump verifiers + research-environments to main (#2887)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to main Bump deps/verifiers (62dc38a5 -> aa95826d, 0.1.15.dev396 -> dev400; adds the reusable vf.Judge) and deps/research-environments (0687a15c -> 99ebd2e1) to their latest main, and follow the env ports / removals they shipped. research-environments removed six v0 envs prime-rl pinned (ported to v1): - code-env -> i3-code-v1 - ifeval -> ifeval-v1 - math500 -> math500-v1 - mmlu-pro -> mmlu-pro-v1 - science-env -> i3-science-v1 - simpleqa-verified -> simpleqa-verified-v1 Also drop v0 envs that nothing references anymore: hle, rlm-swe, rlm-search, tau2-bench (tau2-bench-v1 stays). Configs: - Migrate the math500 eval env onto math500-v1 (hendrycks_math, nemotron_4node, nemotron_debug). - Remove the stale env_mix and math_group configs. Bump the verifiers floor dev396 -> dev400 and relock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: keep rlm-swe + rlm-search env deps Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
35b452b01c |
chore: bump verifiers + research-environments to main (#2873)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bump deps/verifiers (b055799f -> 20abcd91) and deps/research-environments
(dbc58e14 -> 0687a15c) to their latest main, and follow the env
deprecations/ports they shipped.
research-environments removed several v0 envs and ported others to v1:
- drop dead v0 env deps (removed upstream): color-codeword,
mini-swe-agent-plus, opencode-{cp,deepdive,math,science,swe}
- migrate ported envs v0 -> v1: deepdive, gpqa, livecodebench
- migrate the two multimodal color-codeword configs onto the
color-codeword-v1 taskset (default harness, subprocess runtime)
Also bump the verifiers floor 0.1.15.dev388 -> dev394 to match the new pin
and relock.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
d3765e289d |
chore(deps): bump verifiers to 0.1.15.dev388 (#2870)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
a3151e3711 |
chore: repoint v1 tasksets to research-environments (#2864)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore(deps): repoint scaleswe/swebench-verified/terminal-bench-2 v1 tasksets to research-environments The three container-backed v1 SWE tasksets moved out of verifiers into research-environments. Repoint their [tool.uv.sources] paths and bump both submodules to match. - deps/verifiers: drop the three envs - deps/research-environments: add the three envs + advance to current main - uv lock Taskset ids are unchanged, so run configs that reference them by id need no changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(deps): bump verifiers + research-environments submodules to current heads Picks up vf#1851 (swebench-verified ensures uv on PATH before scoring), now ported into the research-environments copy of swebench_verified_v1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(deps): repoint 6 more v1 tasksets to research-environments Following their move out of verifiers, repoint math-env-v1, aime24-v1, r2e-gym-v1, swelego-v1, wikispeedia-v1, and general-agent-v1 from deps/verifiers to deps/research-environments, and bump both submodules to the updated heads. The moved envs now pin verifiers>=0.1.15.dev381 (satisfied by the editable verifiers). - uv lock Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(deps): bump research-environments (drop moved eval configs + scaleswe fix) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(deps): swap v0 aime for v1 tasksets + reference tau2-bench-v1 Following the aime/wikispeedia v0->v1 replacement in research-environments: - drop aime2024, aime2025 (v0); reference aime24-v1, aime25-v1, aime26-v1 - add tau2-bench-v1 - bump deps/research-environments + uv lock Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(deps): repin verifiers + research-environments to merged main verifiers#1853 (remove the moved v1 tasksets) and research-environments#527 (add them) have merged; repin both submodules to the merged main commits. uv.lock unchanged (already consistent — `uv lock --check` passes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(configs): point aime eval envs at the v1 tasksets The v0 aime2024/aime2025 packages were dropped from the `envs` extra + sources, so `uv sync --extra envs` no longer registers them and eval sections using the legacy ids fail at runtime. Switch those eval entries to the v1 tasksets (aime24-v1 / aime25-v1; default `subprocess` harness), keeping the display names for metric continuity. - configs/acereason_math/{stage1,stage2}.toml - configs/debug/hendrycks_sanity/rl.toml - configs/math_group/rl.toml Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
7089ba1e4d |
feat: vf v1 <> nano bridge (#2742)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: add vf-nano as submodule
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/vf-nano to feat/env-server (EnvServer)
Points the submodule at the vf-nano EnvServer branch so the orchestrator can
build on the env-server abstraction.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: run orchestrator on a vf-nano env server (reverse-text)
Switch prime-rl's env path to vf-nano: the orchestrator spawns a vf-nano
EnvServer per env (it never loads an environment), dispatches rollouts by task
index, and trains on the returned Trace dicts (branches + renderer tokens).
- pyproject: dep verifiers -> vf-nano; drop v1/research env packages; only the
vf-nano reverse-text example; override out the transitive v1 verifiers (pulled
by the prime CLI) so it can't shadow vf-nano's `verifiers` package; add orjson
/pandas/msgspec (were transitive via verifiers).
- EnvConfig inherits vf-nano's swappable agent/runtime (+ max_turns).
- envs.py: spawn EnvServer child + EnvClient, info() for num_tasks/group-scoring,
dispatch by task_idx, adapt Trace -> RolloutOutput-shaped dict.
- trajectories.py: trace_to_samples (one sample per Trace branch) + trace_to_output.
- train_source: index sampling; client pool builds vf-nano ClientConfig; lag
monitor vendored; env-server entrypoint repointed; ~14 files retyped off
vf.RolloutOutput / vf.ClientConfig.
- configs/debug/vf_nano_reverse_text.toml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: consume vf-nano Trace natively (branches→samples, shared renderer config)
- trace_to_samples stitches each Trace branch's tokens into one TrainingSample
(prompt = branch start, then each turn's new context [masked] + generated
tokens [trained]); drop the RolloutOutput adapter — read the Trace's native
fields directly (reward, error{type,message}, timing generation/scoring,
num_turns, branches).
- envs returns the raw Trace; eval_sink / train_sink / dispatcher / metrics /
orchestrator read native Trace fields (no token_usage/completion/timing.total).
- client pool forwards the shared renderers.RendererConfig to the env server's
renderer client (so it uses qwen3, not the tool-less default fallback).
- debug config: tool_call_parser=hermes (vLLM accepts the agent's tools),
max_steps=20.
- bump deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: pass typed ClientConfig/SamplingConfig to the env client (no timeout)
- Env.run_rollout/run_group pass the vf-nano ClientConfig object and a
SamplingConfig (built from the env's sampling args) directly — no model_dump,
no per-rollout timeout forwarded to the server.
- debug config: max_steps=20.
- bump deps/vf-nano (typed env-server RPC).
* refactor: orchestrator holds a typed vf.Trace[EnvTask] (no dicts)
The env server returns a Trace minus its derived fields; the orchestrator resolves
the env's Task subclass (from config.id) and validates the wire dict into a strict
Trace[EnvTask], so the whole orchestrator works with a real, typed vf.Trace —
typed task fields included (e.g. task.answer), nothing subscriptable.
- envs.py: resolve_task_type(env_id); run_rollout/run_group validate -> Trace[EnvTask].
- trajectories/types/dispatcher/train_sink/eval_sink/metrics/filters/advantage/utils
/orchestrator: attribute access on the typed Trace (reward, error{type,message},
branches, timing.<span>.duration, num_turns, ...); derived fields recompute on the
consumer.
- Task/Trace/TimeSpan stay strict (StrictBaseModel) — no extra=ignore anywhere.
- bump deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: depend on vf-nano[serve]; bump submodule
The orchestrator spawns the env server, so request the serve extra
(zmq/msgpack) explicitly now that vf-nano keeps them out of core.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (client docstring cleanup)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: drop redundant forward-ref quotes in advantage.py
`from __future__ import annotations` already defers all annotations to strings,
so the quotes + `# noqa: F821` on the TYPE_CHECKING-only `vf.Trace` / `TrainRollout`
annotations are unnecessary (no import cycle — verifiers.nano never imports prime_rl).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: rename FinishedRollout.raw -> trace
The field holds a typed vf.Trace, so `trace` reads truer than `raw` (which
suggested an unparsed dict). Renames the field + every `.raw` access, the
`emit_rollout(trace=...)` param/kwarg, the to_dict field filter, and the
dispatcher cancel-path locals.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: simplify FinishedRollout, read straight off the typed Trace
- Drop the FinishedRollout proxy properties (error/reward/is_truncated and the
example_id field); consumers now read r.trace.{reward,is_truncated,task.idx,...}
directly. The trace is the single source of truth.
- Use vf.Trace.has_error for existence checks instead of `.error is not None`.
- Replace the prime-rl trace_* token-length utils with vf.Trace.{completion_len,
total_tokens,has_response} (now on the trace); keep trace_to_samples.
- Carry task_idx end-to-end (GroupState.task_idx, env.run_rollout/run_group(task_idx),
source dict key) instead of the example/example_id dict carrier; identity comes
off trace.task.idx.
- Mark the local-package env arrangement as a temporary/experimental TODO.
- Move the debug config to configs/debug/nano/reverse_text.toml.
- Bump deps/vf-nano (Trace/Turn accessors).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: spawn env server on an OS-assigned port, drop the startup poll
- The env server binds tcp://127.0.0.1:0 and reports its concrete address back
over a queue; the orchestrator connects to that. Removes _get_free_port and its
TOCTOU race (the OS assigns the port atomically).
- A spawned server has already bound + loaded by the time it reports its address,
so the untimed info() is enough — only poll wait_for_server_startup for an
external (config.address) server, which has no spawn handshake.
- Bump deps/vf-nano (port report + Trace/Branch token-length accessors).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: use vf.task_type instead of a local resolve_task_type
The Task-subclass introspection now lives in vf-nano (vf.task_type); drop the
prime-rl copy and build the typed Trace via vf.Trace[vf.task_type(env_id)]. Bump
deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: restore backfill_rollout_tokens for SFT (typed Trace)
SFT trains on a teacher served over the chat client, which returns no token ids,
so the trace's turns have tokens=None and trace_to_samples yields nothing. Restore
backfill: for each tokenless turn, render its prompt + assistant response with the
student chat template and split on the longest common prefix to fill TurnTokens
(masks/logprobs come from trace_to_samples). train_sink.process_rollout backfills
when any turn lacks tokens, before building samples.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: pass task_idx when building Cancelled traces on off-policy drop
drop_group's error_rollout_output calls omitted the required task_idx, so an
off-policy cancel (on_new_version) raised TypeError. Use the group's task_idx
(or -1 when the group is already gone), mirroring handle_completed_rollout.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: consume typed Trace[WireTask]; inline synthetic error traces
- envs.py: EnvClient now returns Trace[WireTask]; upgrade to this env's real Task
subclass via self.trace_type.model_validate(wire.to_wire()).
- dispatcher.py: drop the error_rollout_output helper — inline the synthetic error
Trace at each call site using vf.Error's field names (type/message/traceback); the
task-exception path carries a real traceback, cancels/empty-trajectory carry none.
- Bump deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: env-server file logging; align debug config batch/group to canonical
- Spawned env servers now route their output (logging + subprocess-runtime output)
to <output_dir>/logs/envs/<name>.log via a _run_env_server wrapper that redirects
stdout/stderr and sets up logging in the child. Previously the orchestrator-spawned
server logged nowhere.
- Debug config: batch_size 16->128, group_size 8->16, eval num_examples 8->128
(interval=1), matching configs/debug/training_modes/rl.toml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: don't double the envs/ segment in the env-server log path
The orchestrator already passes a train/eval-split log_dir (.../logs/envs/train,
.../logs/envs/eval), so _spawn must drop the file directly under it
(<log_dir>/<name>.log) rather than re-adding an envs/ subdir — which had buried the
train/eval split under logs/envs/<kind>/envs/<name>.log.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (Error.traceback str | None)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (to_wire ordering)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: launch env servers as separate processes from the rl entrypoint
Instead of the orchestrator sidecar-spawning each env server as an mp child, the
rl launcher now spawns one `env-server` process per env (train + eval), each on a
free port, with output to logs/envs/{kind}/{name}.log and a crash monitor — same
model as inference/trainer. It sets env.address in the orchestrator config so the
orchestrator attaches (its existing external path) instead of spawning. Envs that
already set address (user-managed external server) are left alone; the orchestrator's
mp sidecar stays as the fallback for running `orchestrator` directly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: env servers use fixed configurable ports, not get_free_port
Add RLConfig.env_server_base_port (default 5000); the i-th launcher-managed env binds
base_port + i. Drops the get_free_port dependency in the launcher.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: separate train/eval env-server port blocks
Train envs bind base_port + i; eval envs bind base_port + ENV_SERVER_KIND_STRIDE + i
(stride 1000), so each kind has headroom for many envs without the blocks colliding
(was a single running index — train and eval sat adjacent).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: env-server logs + sidecar queue cleanup; train-only debug config
- env_server entrypoint: intercept vf-nano stdlib logging so the server's own logs
(EnvServer up, request failures) land in logs/envs/<kind>/<name>.log — previously
only loguru output was captured, swallowing them.
- envs.py: close the address-handoff mp.Queue after use (no resource_tracker
leaked-semaphore warning on the sidecar path).
- configs/debug/nano/reverse_text.toml: drop the eval block, mirroring
examples/reverse_text/rl.toml (train-only smoke; eval path validated separately).
- bump deps/vf-nano (serve/types docstring trim).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (BaseRequest marker, no request_type field)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: env client uses client= (was client_config=); bump vf-nano
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (drop renderers dep comment)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump vf-nano (configs/ + cli/ split, serve/ runtime-only)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: drop FinishedRollout.to_dict; serialize the Trace to disk directly
The I/O boundary (save_rollouts + monitor sample tables) now dumps the typed
vf.Trace itself (r.trace.model_dump(mode="json")) instead of a Trace+metadata
merge — the on-disk rollout is just the trace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: track vf-nano agent->harness rename
vf-nano renamed its rollout-driver abstraction Agent -> Harness. Update the
integration: EnvConfig.agent -> harness (HarnessConfig/DefaultHarnessConfig);
env.run_rollout/run_group spawn forwards harness_config; the env-server entrypoint
passes harness_config/harness_timeout; debug config uses `harness = {...}`. Bump
deps/vf-nano to the renamed branch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: track vf-nano plugin reorg (reverse-text path + bump)
vf-nano reorganized examples into examples/{tasksets,harnesses}/; point the
reverse-text editable source at examples/tasksets/reverse_text and bump deps/vf-nano.
No prime-rl code change — EnvConfig.harness (default) resolves via vf-nano's built-in
harness registry. Verified: 3-step reverse-text smoke trains (0.26 -> 0.42, 0% error).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: reuse vf.EnvConfig in the orchestrator (typed taskset/harness, drop args)
prime-rl's EnvConfig now subclasses vf.EnvConfig and resolves taskset + harness to their
specific config types by id (taskset_config_type / harness_config_type), so env-specific
fields are validated against the real config — the untyped `args` dict and the top-level
`id` are gone (id/stripped_id/resolved_name are now properties off taskset.id). Timeouts
come from vf.TimeoutConfig (timeout.rollout / timeout.scoring), superseding prime-rl's flat
timeout. The env server is spawned with the typed taskset_config (no env_id/args).
- pyproject: install the vf-nano plugin packages (default/rlm harnesses, gsm8k taskset)
as path sources; bump deps/vf-nano to the plugin-packages branch.
- configs/debug/nano/reverse_text.toml: taskset = { id = ... }, harness.id (was harness.type).
Verified: custom taskset (gsm8k.split) + harness (rlm.ref) resolve to typed configs; bad
fields are rejected; the migrated TOML loads through RLConfig.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: inherit vf's shared plugin resolution; trim dead EnvConfig fields
EnvConfig drops its own _resolve_plugins (now inherited from vf.EnvConfig's shared
validator) and the dead v1-forwarding fields: extra_env_kwargs, max_total_completion_tokens,
state_columns (no readers on the vf-nano branch). Also drop stripped_id (no hub installs ->
no @version, so id == it) — callers use .id. Bump deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: require a configured taskset per env (no reverse-text default)
EnvConfig no longer auto-defaults its taskset to reverse-text; an env with no taskset id
errors at validation. Env-list defaults are empty (eval's non-empty check still fires only
when an eval block is configured). Bump deps/vf-nano.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/vf-nano (dashboard taskset.id/harness.id fix)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/vf-nano (sampling max_tokens fix)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(env-server): require a configured env; build EnvServer from the EnvConfig
EnvServerConfig.env was a bare EnvConfig() default, which now raises (no taskset) and
crashed the env-server at import. Make env required — the orchestrator always passes a
real env config. Build the server straight from config.env (vf-nano EnvServer takes the
EnvConfig). Bump deps/vf-nano (is_truncated computed field).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(nano): reverse-text uses default harness with enable_bash=false
The model answers directly (no bash tool), so the tool_call_parser is no longer needed.
Bump deps/vf-nano (enable_bash flag).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(nano): hendrycks-sanity config on the math-env taskset
Add configs/debug/nano/hendrycks_sanity.toml (vf-nano analog of configs/debug/hendrycks_sanity):
math-env train env on the sanity dataset (R1-distill, default renderer with think parser,
single-turn no-bash), aime24 eval env. Register math-env + aime24 in the envs group + sources.
Bump deps/vf-nano (math/aime tasksets, enable_bash, SerializeAsAny + is_truncated fixes).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/vf-nano to merged main (math/aime tasksets, fixes)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: drop deps/verifiers, bump deps/vf-nano to merged main
vf-nano main (#8) adds the subprocess-runtime env passthrough (inherit host env
minus API_KEY, so UV_CACHE_DIR reaches rollout workers and lands the uv cache on
local disk) and the math-verify scoring fix (wrap gold + prediction in \boxed,
matching v1 math-env — fixes matrix/vector answers scoring 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(nano): hendrycks-sanity mirrors examples/hendrycks_sanity + slurm overlay
nano config is now a verbatim copy of examples/hendrycks_sanity/rl.toml with only
the env sections swapped to vf-nano taskset/harness syntax (math-env taskset,
default harness, subprocess runtime; aime24 eval). Adds a slurm overlay setting
the output dir, wandb run name, and partition.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(nano): fold wandb + slurm into hendrycks_sanity config
Move the [wandb] and [slurm] sections from the slurm overlay into the base config, so it
submits to slurm by default (run locally with --no-slurm). The overlay now only redirects
output_dir. wandb run name is vf-nano-subprocess.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(nano): fold output_dir into hendrycks_sanity config, drop slurm overlay
Everything (output_dir, wandb, slurm) now lives in the one config; remove the now-empty
slurm overlay. Run locally with --no-slurm.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(vf-v1): run on the unified verifiers package (v0 envs + v1=nano + legacy bridge)
Depend on the single verifiers package (deps/verifiers, nesting vf-nano) instead of standalone
vf-nano. EnvConfig is dual-mode: v0 envs via id+args (legacy bridge), v1 envs via taskset/harness
(native nano). The env-server spawn (standalone + mp) picks LegacyEnvServer for v0 and EnvServer
for v1; both return vf.Trace so the orchestrator is unchanged. Plugin sources repointed under
deps/verifiers; reverse-text is the v0 env, reverse-text-v1 the nano taskset.
Verified: uv run rl @ examples/reverse_text/rl.toml (v0, unchanged) trains via the bridge
(reward 0.14->0.79); vf-eval + vf-eval-v1 reverse-text both reward 1.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(v0): wire alphabet-sort (multi-turn) + bump verifiers (State scrub)
Add the v0 alphabet-sort env as an installable source; bump deps/verifiers to the State-scrub
commit. Verified the bridge on a multi-turn v0 env: alphabet-sort runs (Turns 2.0, 128/128
trainable, 0% error) alongside single-turn reverse-text.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(v0): wire wordle + add configs/wordle/rl.toml (2-GPU)
Wire the v0 wordle TextArena env (multi-turn game) as an installable source; add a 2-GPU
(1 trainer + 1 inference) wordle config. Verified through the legacy bridge: wordle trains
(Turns ~5.3, reward ~0.81, 128/128 trainable, 0% error).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/verifiers (v1 hygiene: init.py/tests/docs)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(v1): track de-vendored verifiers, rename nano -> v1
- Bump deps/verifiers to the de-vendored commit: vf-nano is now vendored as the
verifiers.v1 subpackage (no nested deps/vf-nano submodule).
- Repoint env-plugin sources from deps/verifiers/deps/vf-nano/... to
deps/verifiers/{examples,packages}/...
- Rename verifiers.nano -> verifiers.v1 across the orchestrator/utils/configs;
rename configs/debug/nano -> configs/debug/v1. "v1" is the name now (no "nano").
Verification: v0 reverse-text (legacy bridge) and v1 reverse-text-v1 (native)
both train over a 3-step smoke (reward present, 0% error).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers (eval/serve, v1 deps in base, bundled plugins)
- Bump deps/verifiers: v1 runtime deps moved to base (no `v1` extra), v1 CLIs
renamed eval/serve, shipped plugins bundled in the tasksets/harnesses umbrella
packages, verifiers/v1/harness.py (flattened harnesses subpackage).
- Depend on `verifiers` (was verifiers[v1]) and the `harnesses` umbrella package
(was standalone default/rlm).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers (Task.system_prompt); write full rollout jsonl
- Bump deps/verifiers to the system_prompt commit: Task.system_prompt + harness
APPENDS_SYSTEM_PROMPT support, reverse_text_v1 byte-identical to the v0 env (separate
system message), plus this branch's eval/serve, v1-deps-in-base, CI fixes, and the
retired semgrep policy.
- save_rollouts: drop exclude_keys={"trajectory"} for both train and eval rollouts so the
jsonl carries the full trajectory.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: drop semgrep from uv.lock (verifiers retired the policy group)
Follow-up to the deps/verifiers bump (00c7b77a removed the `policy` dependency
group); regenerates the lock to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: pin the env-server renderer tokenizer to the base model for LoRA runs
Wire `renderer_model_name` (the base model) into the renderer client config so
the env-server renderer builds its tokenizer from the base model instead of the
per-request LoRA adapter name, which has no published HF tokenizer and 404'd
once LoRA training set the served model name to the adapter. Mirrors the
`renderer_model_name` wiring already in `setup_clients` on main. Bumps
deps/verifiers to the matching fix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(orchestrator): request vLLM token ids for MITO training (#2745)
On the MITO path (no renderer), set return_token_ids in the train env
sampling args so the openai_chat_completions client gets the prompt and
completion token ids back from vLLM and can carry them for training
instead of re-tokenizing the messages downstream. Scoped to
renderer is None so it never reaches the renderer /inference/v1/generate
endpoint (which forwards sampling params to vLLM verbatim).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule; restore v0 env catalog + v1 -v1 imports
- bump deps/verifiers to the feat/nano-as-v1 tip (token-parse #1585, bridge meta #1586,
taskset -v1 rename #1587, native retries #1588, runtime resource cleanup #1590)
- restore the full v0 env catalog in optional-dependencies.envs + [tool.uv.sources]
(init the research-environments submodule); the taskset -v1 rename freed the v0 names,
so v0 envs (legacy bridge) and v1 tasksets coexist
- point the v1 taskset sources at their -v1 names / _v1 paths (gsm8k-v1, math-env-v1,
aime24-v1; reverse-text-v1 already correct)
- update v1 configs to the -v1 taskset ids (hendrycks_sanity) and drop the superseded
standalone configs/debug/reverse_text_v1.toml
- relock
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip (textarena #1592)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip
Pulls in runtime resources named after the rollout id (#1596) and the
alphabet-sort-v1 taskset (#1595).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip
Brings in env-hub ids (#1597), v0 envs on the eval CLI (#1598), modal runtime (#1594).
* chore(v1): add v1 alphabet-sort debug config (port of examples/alphabet_sort)
* fix: forward extra_env_kwargs to v0 legacy envs; drop dead trajectory tests (#2749)
Restores main's escape hatch for v0 (legacy-bridge) envs: a legacy env's extra_env_kwargs
is auto-populated (timeout_seconds <- timeout.rollout, max_total_completion_tokens <-
max_output_tokens, max_seq_len <- seq_len) and forwarded to LegacyEnvServer at spawn, so v0
rollouts again honor the wall-clock timeout, multi-turn completion budget, and seq-len
truncation (all were silently dropped on this branch).
Also removes tests/unit/orchestrator/test_{trajectories,sft_trajectories}.py, which imported
the deleted interleave_rollout and broke test collection.
* fix: install the bundled `tasksets` package (harbor-v1, textarena-v1)
The `envs` extra wired `harnesses` and the individual `*-v1` example tasksets but
never the bundled `tasksets` package, so the integration tasksets it ships
(`harbor-v1`, `textarena-v1`) couldn't be resolved — `import_taskset("harbor-v1")`
raised ModuleNotFoundError ("tried to import 'harbor_v1'").
Add `tasksets` to the `envs` extra + a path source, and bump the verifiers
submodule to the feat/nano-as-v1 tip (#1600), where the bundled tasksets live
under the `tasksets` namespace package (`tasksets.harbor_v1`) and the loader
resolves the namespaced module.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: consume the v1 message-graph trace (#2763)
* feat: consume the v1 message-graph trace (graph-walk trace_to_samples)
Walk the new message graph (verifiers feat/trace-message-graph, PR #1606): trace_to_samples
builds one TrainingSample per branch by concatenating each branch path's node token_ids /
sampled_mask / logprobs (graph.branch_token_sequences), splitting prompt|completion at the
first sampled token — identical training tensors to the old per-turn stitching, off a trace
that is now linear (not quadratic) in turns. backfill_rollout_tokens is a no-op (training is
renderer-only; `trajectory` is now a read-only view over the graph). Bumps the verifiers
submodule to the graph-trace branch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump verifiers submodule (MessageNode.mask rename)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: wire alphabet-sort-v1 taskset
Add alphabet-sort-v1 to the `envs` extra + `[tool.uv.sources]` so
configs/debug/v1/alphabet_sort.toml resolves (it referenced an example taskset that was
never wired into prime-rl). Used to verify graph-based training-sample construction on real
RL runs — v0 (legacy bridge) and v1 (native renderer path) both train cleanly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: consume nodes/branches directly (drop Turn/trajectory readers)
`trace_to_samples` already walks the graph; the remaining readers move off the removed
Turn/trajectory API: the gibberish/repetition filters iterate per-node completions,
advantage/dispatcher use `trace.num_turns`/`trace.completion_len`, `get_model_completion_len`
is dropped (use `trace.completion_len`), and the renderer-only train_sink drops the backfill
path (also removing `backfill_rollout_tokens`). Bumps the verifiers submodule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump verifiers submodule (merge #1605 multiplex interception)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump verifiers submodule (dead-code cleanup)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers (readme highlight + ruff format)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: enforce renderer, SFT backfill, branch-first-class logging
Training is renderer-only now. RL/OPD roll out through the renderer client
(exact sampled token ids + logprobs); SFT rolls out against a chat-completions
teacher that returns no tokens and re-renders the conversation to backfill them
(`backfill_trace`). A renderer is required for every mode (`renderer=None`
rejected) — the oai client never produces correct training tokens for the
message graph. Drops the MITO no-renderer training path.
Logging consumes `trace.branches` as the first-class unit (`branch.token_ids` /
`branch.messages`) instead of the removed `trajectory` field; `trace_to_samples`
builds one sample per branch from the same accessors. Sample loggers take the
rollout objects so env_name/advantage are available.
Add configs/v1/training_mode (rl/opd/sft + lora/external) mirroring the v0
debug configs. Fix the v0 SFT debug configs + rlm_swe to validate under the
renderer requirement.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: flat TrainingSample (token_ids + mask), required renderer
Drop the prompt/completion split from TrainingSample — it doesn't fit a
multi-turn/agentic branch, where context and model-sampled spans interleave. A
sample now carries the branch's flat `token_ids` plus per-token `mask` (True =
trainable), `logprobs`, and `temperatures` (all aligned). `prepare_sample`
passes them straight into the MicroBatch (already flat), and the packer
validates against `token_ids` length.
Make `orchestrator.renderer` a non-optional type (drop the `enforce_renderer`
validator) — training is renderer-only, so the type carries the requirement.
Bump the verifiers submodule to feat/nano-as-v1 (merged #1606 + Branch.branches
inlined).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: SFT teacher rolls out through the renderer client (drop backfill)
Training is renderer-only across every mode, so the SFT teacher now rolls out
through the renderer client too — its rollouts carry tokens directly, the same
as RL/OPD. Drops the chat-completions backfill (`backfill_trace` + the SFT path
in TrainSink) and the now-unused TrainSink renderer.
This requires a self-hosted teacher that shares the student's tokenizer (the
student trains on exactly the ids the renderer feeds the teacher); distilling
from an external chat API is no longer supported. Remove the `sft_external`
debug configs.
Validated: SFT on reverse-text-v1 trains cleanly (Trainable 128/128, eval reward
~0.1 -> ~0.82 over 20 steps) with the teacher on the renderer client, no backfill.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: drop configs/v1/training_mode README
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: consolidate rollout types into Rollout(vf.Trace)
The trace *is* the rollout: replace the FinishedRollout/TrainRollout/EvalRollout
wrappers with a prime-rl Rollout(vf.Trace[TaskT]) subclass that carries the
orchestration metadata (kind, env_name, group_id, policy_version,
off_policy_steps, samples, advantage, is_filtered, filter_results, eval_step) as
exclude=True fields — so dumping a Rollout still yields a plain trace (on-disk
results.jsonl unchanged). envs.py validates the wire trace into Rollout; the
dispatcher stamps the metadata; train vs eval is the `kind` discriminator
(replacing the isinstance check). All consumers read rollout.X directly instead
of rollout.trace.X.
Drop the monitor's SampleRollout duck-type Protocol — the loggers take the real
Rollout (TYPE_CHECKING import) and read branch.token_ids / branch.messages. Also
drop the prime monitor's _split_branch_messages and _json helpers: the
conversation is the unit (no prompt/completion split — meaningless multi-turn).
Fix a latent dispatcher bug surfaced along the way: synthetic error traces used
`error=` / `r.error = ` (a read-only computed field) — now `errors=[...]` /
`r.errors.append(...)`.
Rewrite the (long-stale, dict/`raw`-based) advantage + filters unit tests to
build real Rollouts — they now exercise the current trace-based code (previously
all failing on import/construction).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: allow verifiers + datasets in the slim-config dep check
The v1 config types (EnvConfig, Task, ...) extend `verifiers.v1`, which is a
declared, pure-pydantic dependency of prime-rl-configs (it pulls `datasets` for
the taskset/Task types but no GPU/ML deps). Drop `verifiers` and `datasets` from
the slim-install forbidden list — keep the real heavy training deps (torch,
vllm, transformers, ...).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip
Picks up the v1 end-to-end eval test suite (#1609) and the v0 legacy
env-server group-scoring fix (#1612).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip
Picks up the v0 legacy-bridge fixes: guard against non-renderer training
clients (#1613) and serve the eval split for eval-only v0 envs (#1614).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): fix stale sft.toml teacher comments
The SFT teacher rolls out through the renderer client (token-in/out) and
must share the student's tokenizer; drop the leftover oai-client / token
backfill description removed in the renderer-only refactor.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers (v0 eval chat-completions client)
Picks up verifiers#1615: the legacy bridge builds a chat-completions client
for v0 eval rollouts (renderer for training), instead of raising on the
non-renderer eval client.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): scaleswe configs + taskset registration (#2765)
- register the scaleswe-v1 taskset (pyproject envs list + uv source)
- point the existing rlm-swe config (configs/rlm_swe/qwen35_4b.toml) at the
scaleswe taskset (task_type="scaleswe", train + eval)
- add configs/debug/v1/scaleswe.toml — a per-env v1 port of that config using
the scaleswe-v1 taskset via the rlm harness on the prime runtime
Companion to verifiers feat/scaleswe-v1 (scaleswe-v1 taskset + setup/workdir hooks).
Needs the deps/verifiers submodule bumped to that branch once it lands.
* feat(v1): multimodal training through the message graph + color-codeword-v1
Consume the v1 trace's multimodal sidecar. `trace_to_samples` builds, per branch,
`mm_kwargs` (the branch's per-image renderer items concatenated on dim 0 and
EncodedTensor-encoded) and `mm_token_type_ids` (the renderer's
`mm_token_type_id_map` applied to the branch tokens); `TrainSink` threads the
mapping through. The wandb sample logger now renders the task as a Table-safe JSON
string with image data elided — an image-bearing instruction crashed wandb's
Table type inference on the nested content list.
Adds `configs/v1/multimodal_color_codeword.toml` (Qwen3-VL-4B on color-codeword-v1,
2-GPU) and registers the `color-codeword-v1` taskset; bumps the verifiers submodule
for the multimodal message-graph support.
Verified end-to-end: the VLM trains through the mm path (eval 0.69 -> 0.78,
Trainable 256/256 — mm_kwargs reach the Qwen3-VL forward); v0 `color-codeword`
eval 0.625 ~= v1 `color-codeword-v1` eval 0.69 (faithful port).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Revert "feat(v1): multimodal training through the message graph + color-codeword-v1"
This reverts commit 85b27cfc0be12b84f9b36456675b10387d01dc8a.
* feat: multimodal training through the v1 message graph + color-codeword-v1 (#2766)
* feat(v1): multimodal training through the message graph + color-codeword-v1
Consume the v1 trace's multimodal sidecar. `trace_to_samples` builds, per branch,
`mm_kwargs` (the branch's per-image renderer items concatenated on dim 0 and
EncodedTensor-encoded) and `mm_token_type_ids` (the renderer's
`mm_token_type_id_map` applied to the branch tokens); `TrainSink` threads the
mapping through. The wandb sample logger now renders the task as a Table-safe JSON
string with image data elided — an image-bearing instruction crashed wandb's
Table type inference on the nested content list.
Adds `configs/v1/multimodal_color_codeword.toml` (Qwen3-VL-4B on color-codeword-v1,
2-GPU) and registers the `color-codeword-v1` taskset; bumps the verifiers submodule
for the multimodal message-graph support.
Verified end-to-end: the VLM trains through the mm path (eval 0.69 -> 0.78,
Trainable 256/256 — mm_kwargs reach the Qwen3-VL forward); v0 `color-codeword`
eval 0.625 ~= v1 `color-codeword-v1` eval 0.69 (faithful port).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin — multimodal review-pass cleanups
Picks up the verifiers feat/v1-multimodal head: the multimodal review-pass
(capability-flag docstrings, trimmed mm comments, color-codeword-v1 config
validator + module constants) and the merged malloc_trim worker-RSS fix (#1621).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (content-part mm attribution) + config/test sync
- Bump deps/verifiers to the content-part multimodal attribution (drops the unused
placeholder offset machinery).
- Drop max_turns/seed from the color-codeword-v1 taskset args in the config — the
taskset hard-codes them as module constants now, and passing them is rejected.
- Update the mm egress unit test to assert mm_items order (the new attribution),
not placeholder offsets.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(trainer): slice mm_kwargs on truncation so tokens match embeddings
When a sample exceeds seq_len, prepare_sample truncated input_ids and
mm_token_type_ids but passed mm_kwargs through whole — leaving more image
embeddings than surviving image placeholders. Now truncation cuts to a
whole-image boundary (never splitting an image's placeholder block) and slices
mm_kwargs (pixel_values + image_grid_thw) to the images that fully survive, so
image-placeholder count == image-embedding count.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to ruff-formatted graph.py
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): remove test_trajectories_mm.py
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: thread num_workers to the env-server worker pool (#2768)
* feat(v1): thread num_workers to the env-server worker pool
Wire the verifiers env-server worker pool into prime-rl: the orchestrator's
spawned env server (envs.py) and the `env-server` CLI now serve via
verifiers' serve_env with num_workers, so requests fan out across N worker
processes instead of one event loop. num_workers was already a config field but
dropped on the floor; it's now passed through and defaults to 4.
Companion to verifiers feat/v1-env-workers; needs deps/verifiers bumped to it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): default num_workers to 4
Make the worker pool the default: num_workers defaults to 4 (was "auto"->1)
across the per-env, train, and eval configs, so training/eval env servers fan
rollouts across 4 worker processes out of the box. "auto" stays a valid value
(scales per concurrency); set num_workers=1 for the old single-process server.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): keep num_workers="auto" default on the orchestrator
Revert the orchestrator's per-env / train / eval num_workers defaults back to
"auto" (was 4) so they keep scaling 1 worker per 256 concurrent rollouts out of
the box. The standalone env server can't scale (no concurrency context — it's
driven by external clients), so its resolver collapses "auto" to a fixed 4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to be76cbc3 (env-server worker pool)
Align the pin with #1623 (env-server worker pool: router + N workers),
which the just-merged #2768 (thread num_workers to the pool) requires;
the pin had lagged at the pre-#1623 multimodal tip.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): register r2e-gym-v1 taskset
Add r2e-gym-v1 to the base v1 taskset deps + uv sources (editable from
deps/verifiers/examples/tasksets/r2e_gym_v1) so the id resolves through
the v1 loader, matching the other -v1 tasksets.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(swe): use r2e-gym for rlm_swe configs (v0 + v1)
- v0 configs/rlm_swe/qwen35_4b.toml: restore the train env to r2e and the
eval env to swebench-verified-quick (as on main), reverting the scaleswe switch
- v1: rename configs/debug/v1/scaleswe.toml -> r2e_gym.toml, point the train env
at the r2e-gym-v1 taskset, and drop the eval block
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(swe): point rlm_swe configs at r2e-gym (content)
Apply the edits the prior rename commit missed:
- v0 rlm_swe/qwen35_4b.toml: train -> r2e, eval -> swebench-verified-quick (as on main)
- v1 debug/v1/r2e_gym.toml: taskset -> r2e-gym-v1, eval block removed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): restore env-server worker logs to the env log file (#2770)
Env servers spawn their worker pool as fresh `spawn` processes with no logging
handlers (verifiers#1626), so per-rollout logs (rollout start/done, context-exceed
warnings) were silently dropped. Pass `setup_env_server_logging` to verifiers'
`serve_env` as `log_setup`; it runs in the broker and in every worker. A worker
inherits the broker's redirected stdout/stderr, so its logs land in the same
`envs/{train,eval}/<name>.log` as before — no new files or paths.
Bumps deps/verifiers to the worker-logging fix.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 955b6cdf (dashboard token usage fallback)
Realign the pin onto origin/feat/nano-as-v1 and pick up #1627: the --rich
dashboard's token counts fall back to provider usage when the endpoint returns
no token ids (no more 0/0). The prior pin 3df34ba5 was a pre-rebase #1626
variant; 955b6cdf already contains the equivalent #1626 (env-server worker
logging) plus #1627.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 8e4ad735 (clean env-server teardown)
Picks up the serve_env SIGTERM-teardown fix: pool/in-process env servers no
longer print a spurious KeyboardInterrupt traceback into the env logs on
shutdown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(deps): bump verifiers (renderers floor 0.1.8.dev40)
Picks up the verifiers floor bump so the renderers offset-tokenizer fix (dev40,
PRs #72/#75) can't be undercut by a pre-fix PyPI resolution. Re-locks uv.lock to
the dev40 specifier.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to db82b38a (reap subprocess tree on cancel)
Picks up #1628 (reap the whole subprocess tree when a runtime run is cancelled).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: elastic env-server pool (inherit static/elastic pool config) (#2774)
* feat(v1): elastic env-server pool (inherit pool config from verifiers)
Companion to verifiers#1629. prime-rl's EnvConfig now extends vf.EnvServerConfig, so
each env inherits the `pool` discriminated union (static{num_workers=4} |
elastic{max_workers=None, multiplex=128}, default elastic) and the orchestrator's env
servers scale workers on demand instead of pre-spawning a fixed `auto` count.
- Drop the per-env / train-group / eval-group `num_workers` fields + the auto-resolution
(ceil(max_inflight/256)); the elastic pool self-sizes from load.
- envs.py / env_server.py pass `vf.pool_serve_kwargs(env.pool)` to serve_env.
- Bump deps/verifiers to the elastic-pool branch.
Breaking: `num_workers` is replaced by `pool`. Configs set `pool = { type = "elastic",
multiplex = N }` or `{ type = "static", num_workers = N }`; the rlm_swe + r2e debug
configs are migrated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): back-compat shim mapping legacy num_workers -> pool
EnvConfig forbids extra fields, so configs still setting the removed `num_workers`
would hard-fail. Add a `model_validator(mode="before")` that maps it onto `pool`:
an int -> a fixed `static` pool, `"auto"` -> the default `elastic` pool; an explicit
`pool` always wins. Keeps existing (incl. out-of-tree) configs parsing without edits.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): drop num_workers from rlm_swe + r2e configs (use default elastic pool)
The default `pool` is already elastic (multiplex 128), so an explicit `pool` here was
redundant — just remove the legacy `num_workers` and inherit the default.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to f404e97f (elastic env-server pool)
Realign the pin onto origin/feat/nano-as-v1: the prior pin d0c5bc98 was the
unsquashed #1629 feature branch, now squash-merged as f404e97f
(content-identical). Picks up #1629 (static/elastic env-server pool config).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 88e9bedd
Picks up #1631 (per-rollout setup timing as a distinct phase) and #1632
(per-call model + runtime retries).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 40a2e89f (fix trace.timing.*.duration to_wire validation)
Fixes RunRolloutResponse ValidationError 'trace.timing.setup.duration: Extra
inputs are not permitted' that crashed every rollout (#1636 drops computed
durations from to_wire).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 5dc084f5
Picks up #1638 (add --resume for evals: re-run a previous run's
missing/errored rollouts).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 472622ba
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: stop importing env modules in the orchestrator (always Rollout[WireTask]) (#2781)
* chore(v1): stop importing env modules in the orchestrator
The orchestrator built its per-env trace_type as Rollout[vf.task_type(env_id)] for v1 envs, and
vf.task_type imports the env package just to read its Task subclass for typing the wire trace.
Nothing reads typed env task fields - only task.idx and a full task.model_dump - and WireTask
(extra="allow") preserves those fields (incl. on disk). Always use Rollout[vf.WireTask], so the
orchestrator never imports an env package: the env's type and runtime both live only in the
server process.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): hoist the constant Rollout[WireTask] to a module-level ROLLOUT_TYPE
It no longer varies per env, so it doesn't belong as a per-instance attribute set in
Env.__init__ - lift it to a module constant used directly in run_rollout/run_group.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 7270e69b
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to 66c87d5b
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers to ef45f720
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (alphabet-sort host user sim, #1645)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (modal creates_per_sec 5 -> 40, #1646)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: cap v1 hendrycks-sanity scoring at 10s (#2790)
* fix(v1): cap hendrycks-sanity scoring at 10s
Without a scoring timeout (the default is no limit), a wedged math verify holds its
rollout's permit forever — sympy can spin past the in-script alarm — and at 512
concurrency that starves the pool and stalls long runs. Set timeout.scoring = 10 on the
train and eval envs so the framework cancels and the subprocess runtime kills a runaway
verify, freeing the permit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: drop inline comment on the scoring timeout
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers (eval/train client rename) + adopt config imports (#2792)
Bump deps/verifiers to feat/nano-as-v1 HEAD (8873a740), which includes verifiers#1654 — the v1
interception rework: role-named clients (EvalClient/TrainClient), route-detected wire dialects
(chat/responses/anthropic), 1:1 relay + streaming, reasoning preserved.
Adopt the renamed client config classes in prime_rl/utils/client.py:
OpenAIClientConfig -> EvalClientConfig, RendererClientConfig -> TrainClientConfig.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (subprocess cached-interpreter uv-scripts, #1660)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (codex built-in harness, #1661)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: track terminal-bench-2-v1 as a taskset dependency
It was only a manual editable install, so `uv sync` pruned it. Add it to the env dependency
group + [tool.uv.sources] (mirroring r2e-gym-v1) so it persists across syncs and is available
out of the box.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): keep multimodal tensors out of rollout dumps (#2794)
verifiers#1653 (carry mm tensors across the env-server wire) is merged and pinned, so
`MessageNode.multi_modal_data` is no longer `exclude=True` — `model_dump(mode="json")` now
serializes the base64 pixel tensors into `train_rollouts.jsonl` and the wandb sample tables,
bloating every line. They're the training `mm_kwargs` carrier, not part of the rollout
record, so exclude them at the dump boundary (train + eval paths).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): install all v1 example tasksets in prime-rl
Declare the remaining 7 verifiers v1 example tasksets (code-golf, deepwiki,
glossary, swelego, wiki-search, wikispeedia, wordle) as editable deps so uv sync
installs every example, matching the verifiers examples set. chromadb/textarena
were already present via the v0 wiki-search/wordle envs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): install the compact example harness in prime-rl
The example harness (examples/harnesses/compact) was missing from prime-rl deps,
so the documented --harness.id compact branching example failed to resolve
(ModuleNotFoundError: harness compact not found). Declare it like the example
tasksets so uv sync installs it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (v1 docs #1662 + Trace.info #1664)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): encode router-replay routed_experts into transport (#2808)
* feat(v1): encode router-replay routed_experts into transport
Pack Branch.routed_experts ([tokens, layers, top_k]) into the transport
RoutedExperts the trainer replays, realigning the token axis to len(token_ids)
as a backstop. Bumps the verifiers pin to the companion router-replay commit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (raw-bytes wire) + exclude routed_experts from disk dumps
Bumps deps/verifiers to the raw-bytes router-replay codec (RoutedExperts rename +
msgpack bin wire). routed_experts now rides the env-server wire as raw bytes, so it
can't round-trip the json disk dump — add it to ROLLOUT_DUMP_EXCLUDE alongside
multi_modal_data (both are training inputs, not part of the rollout record).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): guard router-replay vs prefix caching + bump verifiers/renderers pins
- Add disable_prefix_caching_for_router_replay validator: prefix-cache hits skip
recomputing the cached prefix, so the engine returns no routed-expert decisions for
those tokens. Router replay needs routing for every token, so force
enable_prefix_caching=False (mirrors the existing kv_cache_offload guard).
- Bump deps/verifiers: tail-pad routed_experts so the final node aligns (the engine
omits the last position's routing).
- Bump deps/renderers: _get_offset_tokenizer immune to the global fastokens patch race.
Together these make v1 MoE router replay work end-to-end (Qwen3-30B-A3B): verified
mismatch_kl drops vs no-replay (0.0005/0.0002/0.0002 vs 0.0015/0.0015/0.0005 @ steps 0/1/2).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/renderers pin (ruff format fix)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/verifiers pin (ruff format)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump deps/verifiers pin to merged feat/nano-as-v1 (router-replay #1672)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Remove disable_prefix_caching_for_router_replay validator
Drops the guard that force-disabled inference.enable_prefix_caching under router replay.
Validating whether prefix caching is actually compatible with router replay (cache hits
may carry no routed-expert decisions); re-add if the A/B shows it drops routing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(orchestrator): keep top-level advantage wiring after merge
The merge auto-resolved train_sink.py and the orchestrator's TrainSink
construction to main's per-env advantage design (#2721), but envs.py and the
configs were kept on the branch's top-level design — so TrainSink read
`train_envs.get(env_name).advantage_fn`, which TrainEnv no longer defines
(AttributeError at rollout time).
Restore the branch's top-level advantage: TrainSink takes `advantage_config`
and builds its own `self.advantage_fn` once. Verified end-to-end with a
reverse-text-v1 RL smoke (reward climbs 0.16 -> 0.40 over 6 steps).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to merged main (1b7736a8)
deps/verifiers feat/nano-as-v1 now includes origin/main merged in
(composable tasksets + sandbox/save utils). Pin moves 7a98b566 -> 1b7736a8.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: bump pydantic-config submodule to main (single-dash short flags)
deps/pydantic-config 896ade4 -> 99f47c6 (origin/main). Picks up #16
(single-dash short flags for single-character aliases, e.g. `eval -n -m`)
and upstreams the dict[str,str] preservation fix (#14). No uv.lock change
(editable path source).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (5fc0b295)
Picks up the py3.11 TypedDict CI fix and #1676 (prime-sandbox programs run for
the sandbox lifetime instead of the 15-min background-job default, + retry-log
wording). Pin moves 1b7736a8 -> 5fc0b295.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 3af08c9b
Includes verifiers#1677 - scaleswe-v1 resolves task images via Prime's
Artifact Registry instead of the incomplete public Docker Hub mirror.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(orchestrator): trim glibc heap back to the OS each step (#2821)
Factor the existing end-of-run malloc_trim into a `trim_process_memory()`
helper and also call it at the end of `finalize_train_batch`. Each step frees a
step's worth of rollouts / traces / transport buffers, but glibc keeps those
pages in per-arena free lists, so orchestrator RSS climbs over a long run
without ever shrinking. Trimming per step returns them to the OS.
Mirrors the per-step trim in prime-rl #2807 — the trim only; that PR's
`.raw`-based retention helpers don't apply to this branch's typed Rollout/Trace.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 7862985b
Includes verifiers#1678 - scaleswe-v1 Prime Artifact Registry is now opt-in
(`use_prime_registry`, default off), so the default Docker Hub image path works
on local docker runtimes again.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: route consistent_hash on X-Session-ID for cross-turn prefix reuse (#2822)
The vllm-router `consistent_hash` policy keys on request-id headers (default
x-request-id / x-correlation-id / x-trace-id / request-id). The v1 inference
clients send none of those per rollout, so a multi-turn rollout's turns hashed
to random DP shards and re-prefilled the growing prompt cold each turn (~40%
prefix cache hit rate on an agentic SWE run, where it should approach the
eviction-limited ceiling).
Launch the router with `--request-id-headers x-session-id` so it keys on the
per-rollout `X-Session-ID` header the v1 clients now emit (companion verifiers
change). Every turn of a rollout pins to one engine, keeping its cross-turn
prefix warm. Harmless for the random / round_robin policies, which ignore
request-id headers.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 211faecb (session-affinity routing)
Picks up verifiers #1680 (session-affinity routing header for cross-turn
prefix reuse) — the counterpart to prime-rl #2822. Pin 7862985b -> 211faecb.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 3f45f73b (scaleswe-v1 image filter)
Picks up verifiers #1679 (filter unavailable scaleswe-v1 images at load).
Pin 211faecb -> 3f45f73b.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 44da378c (r2e-gym-v1 registry opt-in)
Picks up verifiers #1681 (r2e-gym-v1 Prime Artifact Registry opt-in, default
off). Pin 3f45f73b -> 44da378c.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to a723977c (scaleswe-v1 image_url filter)
Picks up verifiers #1683 (filter on Docker Hub image_url, not the resolved
image). Pin 44da378c -> a723977c.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to 0c8d0aa1 (rootless harness install)
Picks up verifiers #1685 (harnesses install/run without root, pinned
/tmp/vf-{harness}) and #1684 (remove Claude Code harness). Pin a723977c -> 0c8d0aa1.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to d4b054e3 (skip region-limited e2e test)
Picks up verifiers #1686 (skip test_multi_turn on prime — colocated user-sim
port exposure is region-limited). Pin 0c8d0aa1 -> d4b054e3.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: point verifiers env paths at the flattened environments/ dir (#2824)
* chore: point verifiers env paths at the flattened environments/ dir
Companion to verifiers #1695 (flatten examples/ into a single environments/).
Update the deps/verifiers editable source paths in pyproject.toml + uv.lock:
examples/tasksets/<x> -> environments/<x> and
examples/harnesses/compact -> environments/compact. Bump the verifiers pin to
the flatten branch (7ddc78b2) so the relocated paths resolve.
Re-pin to the merged commit once verifiers #1695 lands.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(deps): bump verifiers to 22b02e4b (flatten examples/ into environments/, #1695 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): advance verifiers pin to feat/nano-as-v1 tip (Trace.state + DNS fix)
#2824 retargeted the env paths but pinned deps/verifiers at 22b02e4b (#1695,
just after the examples/->environments/ flatten), which predates the later
merges. Advance the submodule to the actual feat/nano-as-v1 tip bf30ae5f
(verifiers 0.1.15.dev298): adds Trace.state (#1711), the unconditional MCP
DNS-rebinding relax (#1715, fixes the in-prime tool 421 CI failures), and the
init scaffold (#1713).
bf30ae5f also dropped verifiers' self-referential `packages` extra, so drop
`[packages]` from the verifiers override-dependency (and refresh the stale
sources comment).
Smoke: `eval reverse-text-v1 -n 1` (subprocess, temp=0) runs clean — no errors,
not truncated, reward ~1.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (#1717 + #1719)
Advance deps/verifiers bf30ae5f -> f7fa7482:
- #1717 train-client prefix bridging + token-based message-graph branching
- #1719 default the harness runtime to subprocess
No prime-rl-side changes needed: every prime-rl v1 config already sets
harness.runtime.type explicitly (#1719's default flip is a no-op here), and the
consumed verifiers surface (serve EnvClient/serve_env/pool_serve_kwargs,
clients.config Eval/TrainClientConfig, task.TaskT, the Trace branch/token API) is
untouched by #1717. Imports resolve; reverse-text-v1 eval smoke clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (f7fa7482 -> bbfd5646)
New since the last pin: #1718/#1721 (CI + tests), #1723 (per-harness tool
disabling), #1666 (client consolidation + chat-completion header forwarding),
#1722 (warn on non-default subprocess harnesses). No prime-rl-side changes
needed: clients.config (the consumed surface) is untouched by #1666's client
refactor, #1722 only warns and exempts the default harness (what prime-rl's
subprocess configs use), and the rest is additive/CI-only. Imports resolve;
reverse-text-v1 eval smoke clean (reward 1.0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: verifiers #1732 companion (model_dump traces, Task.prompt rename) (#2831)
* chore(v1): add prime CLI as deps/prime submodule (feat/nano-as-v1)
Tracks the companion PrimeIntellect-ai/prime#751 branch that adds verifiers v1
eval support to the prime CLI (run/view consume the v1 entrypoint + Trace format).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (bbfd5646 -> 220f21d4)
New: #1727 (per-rollout isolation for shared writable tool servers) and #1702
(trim verifiers runtime deps — modal/notebook/quest/pdf moved to extras). No
prime-rl-side changes needed: the only dropped transitive dep is pymupdf, used
solely by verifiers' experimental quest PDF tool via a lazy import behind the
quest extra (prime-rl never touches it). Imports resolve on dev307;
reverse-text-v1 eval smoke clean (reward 1.0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: validate env-server traces via model_dump (companion to verifiers to_wire removal)
verifiers drops Trace.to_wire/from_wire and the derived computed fields (reward,
is_truncated, error, duration are plain properties now). Swap wire.to_wire() ->
wire.model_dump() when re-typing a returned Trace into ROLLOUT_TYPE; the .reward /
.is_truncated the metrics/eval code reads are the Trace properties, so they still work.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: rename vf.Task(instruction=) -> prompt= (verifiers #1732 companion)
verifiers #1732 renames Task.instruction -> Task.prompt; update the dispatcher's
error-rollout Task construction to match. Pin bump to the merged commit comes when #1732
lands.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to chore/v1-general-cleanup tip (220f21d4 -> d78d7474)
Pin #1732 (general v1 cleanup) so this companion's model_dump trace handling and the
Task.prompt rename round-trip against a verifiers that actually has them. Re-pin to the
feat/nano-as-v1 tip once #1732 merges.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (d78d7474 -> caaf0ff3)
#1732 (general v1 cleanup) merged into feat/nano-as-v1; re-pin off the chore branch onto the
integration tip. This companion's model_dump trace handling + Task.prompt rename now run
against merged verifiers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: error-rollout placeholder task uses prompt=None
An error rollout has no prompt; None is the honest value (Task.prompt is str | Messages |
None) rather than an empty string.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): drop removed enable_bash from harness configs (verifiers #1723) (#2833)
verifiers #1723 (in the current pin) removed the default harness's enable_bash
field — the default harness now exposes only the taskset's MCP tools (use an
agentic harness like mini-swe-agent for a shell). All v1 configs still set
`enable_bash = false`, which now fails config validation (Extra inputs are not
permitted). Drop it (no-bash is the default, so behavior is unchanged); no src/
code referenced it.
Verified: `uv run rl @ configs/debug/v1/reverse_text.toml` (Qwen3-0.6B, 2 steps)
runs end-to-end — orchestrator rollouts Error 0.0% (reward 0.117 -> 0.177),
trainer steps + checkpoint, 'Training finished!'.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (caaf0ff3 -> cc4afd52)
New: #1733 (robust env-server teardown, no leaked tunnels/sandboxes), #1734
(general-agent solver v1 taskset, additive/opt-in), #1735 (reject unsupported
task system_prompt). No prime-rl-side changes needed: consumed serve/clients
surface unchanged, default harness supports system_prompt, new taskset not
registered. Imports resolve; reverse-text-v1 eval clean (reward ~1.0, no errors).
Note: #1733's worker teardown throws KeyboardInterrupt on SIGTERM but run_server
doesn't swallow it, so a benign KeyboardInterrupt traceback prints at env-server
shutdown (cosmetic; verifiers follow-up).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): add debug general-agent-v1 RL config + register the taskset
Add configs/debug/v1/general_agent.toml — the v1 general-agent-v1 taskset
(GeneralAgentSolverTaskset) on the default harness, with the agent and its tool
server colocated in a modal sandbox. Adapted from configs/general_agent/
rl_qwen3_4b.toml (Qwen3-4B, batch 256). Register general-agent-v1 in
[tool.uv.sources] + the envs extra so the id resolves.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): add scaleswe-v1 RL config (Qwen3.6-35B-A3B, 65k ctx)
configs/debug/v1/scaleswe.toml — the v1 scaleswe-v1 SWE taskset on the rlm
harness + modal runtime (each row injects its own Docker image into the sandbox;
no MCP toolset). Qwen3.6-35B-A3B, batch 256, 65k context, qwen3.6 renderer with
thinking. Deployment/parallelism (cp=2, infer dp=2 tp=4, 1 train + 1 infer node)
seeded from the 30B-A3B reference — tune on the cluster for the 35B / 65k
footprint. Multi-node slurm; scaleswe-v1 was already registered.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (cc4afd52 -> 3c5f6586) + register swebench-verified-v1
New: #1738 (swebench-verified harbor taskset, prime prebuilt images), #1739
(don't retry program exec - fixes forked duplicate trace branches), #1736/#1737
(quest pdf sanitization, dashboard rotation). Register the new swebench-verified-v1
env (source + envs extra); no other prime-rl changes needed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(v1): add SWE-Bench-Verified online eval to the scaleswe run (prime runtime)
Mirror the v0 rlm_swe SWE-bench eval on the v1 scaleswe config: [orchestrator.eval]
interval=20, an eval env on the swebench-verified-v1 taskset via the rlm harness on
the prime runtime (use_prime_registry=true -> prime's prebuilt instance images),
rollout timeout 3600s. Train stays on modal; eval runs on prime.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(v1): use public images for the scaleswe SWE-Bench-Verified eval
A debug eval showed use_prime_registry=true fails with IMAGE_PULL_FAILED on the prime
runtime: the SWE-bench Verified sweb.eval.* instance images aren't mirrored into prime's
prod-sandbox Artifact Registry. The same prime sandbox pulls r2e-gym-v1's prime-registry
image and the public swebench/sweb.eval.* image fine, so it's a missing-mirror issue, not
credentials. Drop use_prime_registry (default false -> public Docker Hub images) so the
online eval works on the prime runtime now; flip it back on once the images are mirrored.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin + re-enable use_prime_registry for the scaleswe SWE eval
Bump deps/verifiers 3c5f6586 -> 952b2a7d, which lands the swebench-verified-v1 prime-image
path fix (PrimeIntellect-ai/verifiers#1740): the mirror keeps the swebench/ org, so
use_prime_registry=true now resolves to prod-sandbox/swebench/sweb.eval.* and pulls. Flip the
scaleswe SWE-Bench-Verified eval back to use_prime_registry=true (verified to pull on a prime
sandbox), for the fast cached mirror instead of public Docker Hub.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): cap hendrycks-sanity at 256 in-flight rollouts + 30s scoring timeout
Set orchestrator max_inflight_rollouts=256 (below the 512 batch) and bump the per-env
scoring timeout 10s -> 30s on both the train and eval envs. Guards against the subprocess
env-server stall where unbounded concurrency + a hanging math-verify hold permits until the
run wedges.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (general-agent-v1 colocated toolset fix)
Bump deps/verifiers 952b2a7d -> 56a720ca: PrimeIntellect-ai/verifiers#1741 makes the
general-agent-v1 toolset work when colocated in a sandbox (ships the task's tools.py + db.json
over /task). Env-package only - no framework/config surface, no prime-rl changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump hendrycks-sanity scoring timeout to 5min
Raise the per-env scoring timeout 30s -> 300s on both the train and eval envs - 30s was too
tight for the math-verify scoring under load.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(orch): show avg branches next to turns in step + eval log lines
Add 'Branches {mean:.1f}' alongside 'Turns' in the per-step train head, the per-env
breakdown, and the eval line - the average trace branch count per rollout (1 = linear, >1 =
compaction/subagents).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): update tmux + monitor-run skill for flattened env log paths
Env logs are now one file per env (envs/{train,eval}/{env_name}.log)
instead of nested env_server/env_worker_* files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(v1): bump verifiers pin (retry backoff + relay retries)
Bump deps/verifiers 56a720ca -> 6647fe0a: PrimeIntellect-ai/verifiers#1744 adds exponential
backoff + jitter to the per-call client/runtime retries (so concurrent rollouts don't
re-thunder a shared endpoint) and lets harness clients retry the relay. Internal/additive -
no config schema or API change, no prime-rl edits.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix routed SLURM inference DP rank client config (#2830)
Co-authored-by: Codex <codex@primeintellect.ai>
(cherry picked from commit
|
||
|
|
38494ccb41 |
fix: sync uv.lock to v0.6.0 (#2858)
The release bump (#2855) updated pyproject.toml but not uv.lock, so `uv sync --locked` fails on main (CPU Tests, Docker Push). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
efeddae6bb |
add rlm uuid ctf env (#2832)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
b0612a0e1f |
add rlm search (#2783)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* add rlm search * bump dep |
||
|
|
04d067145f |
update deps (#2736)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* update deps * update deps * update deps |
||
|
|
54012df504 |
orch improvements (#2725)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* orch improvements * fixes |
||
|
|
53b22b55c8 |
fix: add prime-pydantic-config as direct dep so uv uses editable path source (#2733)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
The [tool.uv.sources] override for prime-pydantic-config was being ignored because it was only a transitive dependency (via prime-rl-configs). uv only applies source overrides for packages that appear in project.dependencies. Adding it as a direct dependency makes uv resolve from the local editable path (deps/pydantic-config) instead of PyPI. |
||
|
|
e5c9169566 |
chore: add tasksets/harnesses to exclude-newer ignore list (#2716)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
5b5f234053 |
add worlde (#2704)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
|
||
|
|
563b37a9c7 |
fix: preserve Qwen3.5 broadcast weight names (#2690)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* exp: add qwen35 kl debug configs * exp: lower qwen35 wordle kl drift * fix: preserve qwen3.5 broadcast weight names * chore: keep qwen35 debug configs local * chore: clarify qwen3.5 weight naming bypass * fix: use upstream qwen3.5 conversion mapping * chore: use released transformers package * chore: drop qwen3.5 cp patch * chore: remove wordle env packaging |
||
|
|
c13409e2c1 |
[KV Offload]: Tiered offloading + MoonCakeStore (#2689)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(inference): tiered KV cache offload (native + mooncake, CPU/disk) Replace the flat `inference.kv_cache_offload` (single `cpu_bytes`) with a typed, backend-swappable, tiered config discriminated on `type`: - native: vLLM `OffloadingConnector` (cpu) / `TieringOffloadingSpec` (cpu+disk, fs_python secondary). Fully self-contained. - mooncake: per-node standalone-store (`mooncake_master` + `mooncake_client`, RDMA), cpu and/or disk tiers. Composable `cpu`/`disk` tiers (cpu required, disk-only rejected); `disk.num_bytes` is mooncake-only (native fs tier is filesystem-bounded; warns if set on native). Centralize the vLLM `kv_transfer_config` build in `InferenceConfig.build_kv_transfer_config` (NIXL transfer + offload composed via `MultiConnector`); both SLURM templates stop hand-rolling the JSON and launch the node-local Mooncake store. New `src/prime_rl/inference/mooncake.py` launches the master+client and writes `MOONCAKE_CONFIG_PATH`; `server.py` brings it up for local runs. Verified: - Single-node (Qwen3-0.6B, H200): all four configs boot + serve; native-cpu and mooncake-rdma both round-trip KV (store ~1.1GB / reload ~205MB). - Multi-node 3-node SLURM disaggregated (Qwen3-30B-A3B): NIXL P/D transfer serves coherent output; with mooncake offload, MultiConnector[Nixl, MooncakeStore] + per-node RDMA store serves coherent output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(inference): drop unused mooncake disk num_bytes and metadata_server - DiskOffloadTier.num_bytes: removed. Neither backend enforces a disk byte quota (capacity is bounded by the filesystem at disk.path), so it was a no-op knob. - MooncakeKVCacheOffloadConfig.metadata_server: removed. The launcher always hosts the HTTP metadata server on the node-local master and auto-derives the URL from the master host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(inference): launch Mooncake store in sbatch bash; add CHANGELOG Address PR review: replace the Python launcher CLI (+ env.sh round-trip) with an explicit bash launch in the SLURM templates, and document the breaking config change. - New `templates/_mooncake_store.sh.j2` partial (shared via `{% include %}` by `inference.sbatch.j2` and `multi_node_rl.sbatch.j2`): launches the node-local `mooncake_master` + `mooncake_client`, writes the config JSON, and exports `PYTHONHASHSEED` / `MOONCAKE_CONFIG_PATH` inline — visible in the rendered script. Removes the hacky orphan-process CLI, the `print`, and the unquoted-`env.sh` round-trip. - Delete `src/prime_rl/inference/mooncake.py` and the `server.py` store-launch hook. - Mooncake offload is now SLURM-only: `inference_local` errors (when no store env is present) and an `RLConfig` validator rejects local RL + mooncake. Native offload is unchanged and still works locally. Entrypoints pass `kv_offload_{cpu_bytes,disk_path, device_name}` template vars. - CHANGELOG.md: document the `inference.kv_cache_offload.cpu_bytes` -> discriminated `type` breaking change (per .cursor/BUGBOT.md). Verified single-node SLURM (Qwen3-0.6B): store launches via the template bash, MooncakeStoreConnector (standalone-store) loads, and the server serves coherent output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(inference): Mooncake shared distributed KV pool across nodes Switch the Mooncake offload backend from per-node isolated stores to a single shared distributed pool, so all inference nodes' CPU RAM (and disk) form one KV cache and a prefix cached on any node is reusable by every other node/replica. - `_mooncake_store.sh.j2`: the head inference node (first in the SLURM nodelist) runs the one master + HTTP metadata server; every node runs a client pointing at the head and contributes its segment. Store keys are model + parallel-rank + content-hash (no instance id), so the pool is reused across nodes and replicas. - Drop the now-unused `MooncakeKVCacheOffloadConfig.master_server_address` (auto head). - docs: describe the shared pool (total pool ≈ num_bytes × #inference-nodes). Verified on a 2-node SLURM job (Qwen3-0.6B): one master on the head, both clients join (2 segments), and a prefix cached on node A is served from node B over RDMA (load_get ~160 MB cross-node hit). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(inference): drop runtime mooncake-requires-slurm check The RLConfig `validate_mooncake_offload_requires_slurm` config validator already guards the misuse case; the per-request runtime check in `inference_local` (and its `import os`) was redundant. Remove it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |