RAD origin-cosine, horizon 40, on R2E-Gym — Qwen3.5-4B, sampled trajectory
One RAD origin-cosine run (ocb0921a) on the R2E-Gym subset, starting from
Qwen/Qwen3.5-4B, published every five updates:
| subfolder | step5 | step10 | step15 | step20 | step25 | step30 | step35 | step40 |
|---|---|---|---|---|---|---|---|---|
| committed updates | 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 |
stepN holds the policy after N committed updates, converted from Megatron dist-checkpoint
iter_{N-1:07d}. The run saved a checkpoint at every update; intermediate ones are retained on the
training host.
What distinguishes this run
The origin of the token-weight box anneals on a cosine schedule, and this run sets
--lookahead-origin-horizon 40 so the schedule completes inside its 40-update budget:
origin(k) = 0.5 * (1 + cos(pi * (k - 1) / 39))
It therefore starts at 1.0 and reaches exactly 0 at update 40, where the box is the symmetric [-1, 1] and half the tokens carry negative weight. Measured at the final update: origin 0.00000, mean token weight -0.0035, negative-weight tokens 50.2 %, saturation 8.0 % low and 7.8 % high.
This is the difference from ziansu/r2egym-rad-origin-cosine,
which is a different run (ocf0916b) using the preset's default horizon of 100: over its 40 updates the
origin only annealed from 1.0 to about 0.66, so its box never approached [-1, 1]. ocf0916b scored
51.13 % pass@1 on SWE-bench Verified at 98,304 context / 100 turns, with the best pass@3 of that sweep
(65.00 %). This run exists to test whether completing the anneal inside the budget changes that.
Usage
Pass the subfolder explicitly — the repo root holds no weights:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "ziansu/r2egym-rad-origin-cosine-h40"
model = AutoModelForCausalLM.from_pretrained(repo, subfolder="step40", dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder="step40")
AutoModelForCausalLM yields Qwen3_5ForCausalLM (4.21 B parameters, the language model). The checkpoints
also carry the base model's vision tower, so AutoModelForImageTextToText yields the full
Qwen3_5ForConditionalGeneration (4.54 B). Agent evaluation in this project used the language model only.
Training
| Base model | Qwen/Qwen3.5-4B |
| Method | RAD, lookahead-projected-ascent-origin-cosine preset, against a frozen Qwen3.6-27B teacher |
| Origin horizon | 40 (--lookahead-origin-horizon 40), so the origin reaches 0 at the final update |
| Other RAD settings | TIS cap 5, one JVP microbatch per pass |
| Corpus | R2E-Gym subset |
| Rollout context | 65,536 tokens |
| Learning rate | 1e-6 |
| Global batch | 256 |
| Rollout batch | 32 task groups x 8 samples per update |
| Updates | 40 committed, finishing 2026-09-24 07:45 UTC |
Evaluation
Held-out and SWE-bench Verified evaluations of these checkpoints are in progress and will be added here when they complete. Until then this repo carries no score: do not transfer numbers from the other origin-cosine repo, which is a different run with a different origin horizon.
For reference, the comparable negative-warmup run (nwb0921a, published at
ziansu/r2egym-rad-negative-warmup) scored
52.58 / 54.93 / 52.58 / 56.34 % pass@1 on the frozen 71-task R2E holdout at updates 10/20/30/40
(213 episodes per point), against 45.07 % for the base model.
Conversion details
Exported with slime's tools/convert_torch_dist_to_hf.py (--vocab-size 248320 -a), pointing at each
iter_* directory directly, so the marker file is never consulted and a base-weight fallback cannot occur.
Every export was checked before upload: the full 738-tensor key set of the base model, matching shapes, and
at least one sampled weight matrix differing from the base model.
- The vision tower is byte-identical to
Qwen/Qwen3.5-4B; training updated the language model only. - 48 tensors are stored in bfloat16 where the base model uses float32:
linear_attn.A_logandlinear_attn.norm.weighton each of the 24 layers. Training held every parameter in bfloat16, and that is the precision the inference server served during training and evaluation. - At a learning rate of 1e-6 a single update moves a large matrix by roughly one bfloat16 ulp on 16-39 % of its elements, so even five updates apart these checkpoints look nearly identical tensor-by-tensor. They are distinct policies, not duplicates.