RLCSD icon indicating copy to clipboard operation
RLCSD copied to clipboard

Reproducing Olmo-3-7B-Think K&K RLCSD (Table 1, 66.1): released code reaches ~62; could you share checkpoints, logs and the exact environment?

Open mayug opened this issue 2 months ago • 4 comments

Hi, and thanks for releasing the code, configs and data. We have been trying to reproduce the Olmo-3-7B-Think Knights & Knaves RLCSD row of Table 1 with the released repository. In-domain we match the paper closely. Out-of-domain we land about 4 points short on the 4-split average, consistently, and we haven't been able to find the cause on our side. Details below, then a few requests.

What we ran

  • Code: this repo at a6f8afa ("Update RLCSD training and synchronize paper results"), unmodified except for one patch (below). Your launcher (scripts/logic_kk/run_olmo3_7b_think_rlcsd.sh -> scripts/_run_verl.sh), your vendored verl, your trainer entry.
  • Config: configs/logic_kk/olmo3_7b_think_rlcsd.yaml as shipped (lr 1e-6, warmup 50, 64 prompts x 8 rollouts, mini-batch 16, max_completion_length 16,384, val_max_completion_length 38,912, val temp 0.6 / top_p 0.95 / top_k 20, thinking on, GT-CoT positive, tau 1.3, beta 1.0, lam 0.5, delta 0.02, eta 0.5, fixed teacher).
  • Data: scripts/download_data.py (train / val parquets).
  • Model: allenai/Olmo-3-7B-Think, HF revision d97e442d7cc678210054dbcc9b440894d62c89a4.
  • Only overrides (none numerical): trainer.total_training_steps=400, logger without SwanLab, and from step 100 on data.val_batch_size=800 (same prompts, same n=1 sampling, just faster validation).
  • Hardware / stack: 8 x NVIDIA B200, driver 580, torch 2.9.0+cu128, vLLM 0.12.0, transformers 4.57.6, flash-attn 2.8.3, Ray 2.56.1, Python 3.12. VLLM_ATTENTION_BACKEND=FLASH_ATTN (FlashInfer JIT does not build on sm_100).
  • Trained to step 300.

Results (K&K pass@1, %)

row KK 4-8 KK 9 KK 10 KK 11 4-split avg
paper, Base 70.6 64.0 55.0 35.0 56.2
paper, RLCSD 75.4 76.0 65.0 48.0 66.1
ours, Base (your in-run step-0 validation, two runs) 72.8 / 72.4 67.0 / 67.0 58.0 / 58.0 30.0 / 37.0 57.0 / 58.6
ours, RLCSD step 300 (your in-run validation, n=1) 73.8 66.0 63.0 46.0 62.2
ours, RLCSD step 300 (separate eval, n=2, same 38,912 cap and sampling) 75.5 70.0 60.5 42.5 62.1

In-run 4-split validation every 50 steps (steps 0, 50, ..., 300): 58.6, 57.2, 58.5, 60.7, 61.1, 61.5, 62.2. The curve plateaus around 61-62 from step 150 on. The base model matches the paper within noise, and in-domain RLCSD matches (75.5 vs 75.4). The whole gap is out of domain (KK 9/10/11). An independent re-implementation of ours on top of verl gives the same curve (within ~0.7 points at every validation) and the same final numbers, so the gap is not specific to one code path.

A crash we had to patch: Olmo3 + FSDP2 + gradient checkpointing

As shipped, training crashes at the first actor backward with torch.utils.checkpoint.CheckpointError: Recomputed values for the following tensors have different metadata than during the forward pass (saved bf16, recomputed fp32, shape [1, 1, seq, 128], i.e. the rotary cos/sin).

Cause: Olmo3RotaryEmbedding.forward returns cos/sin in fp32 (Llama/Qwen3 cast them to x.dtype). FSDP2's cast_forward_inputs=True pre-forward hook casts them to bf16 in the forward pass, but the hook returns early in the PRE_BACKWARD state, so the checkpoint recompute sees fp32.

We reproduced this in a minimal script (verl-style FSDP2 + non-reentrant checkpointing + bf16) on torch 2.7.1, 2.8.0 and 2.9.0, with transformers 4.57.6 and 5.17.0: it crashes on every combination. With verl's FSDP1 strategy it trains, and RoPE stays fp32 throughout. We fixed it by casting cos/sin to x.dtype at the source (23-line monkey patch in verl/models/transformers/monkey_patch.py), which makes RoPE bf16 in the trainer.

Since _run_verl.sh has used strategy=fsdp2 + gradient checkpointing + bf16 since the first public commit, we suspect the run behind Table 1 used a slightly different setup at this point (FSDP1, a different torch version, a local patch, ...). We measured the direct per-token effect of bf16 vs fp32 RoPE and it is small (~0.01 nats mean absolute, similar to swapping the attention kernel). Still, it would help a lot to know what you ran.

Requests

Anything from this list would be very helpful, roughly in order of usefulness:

  1. Checkpoints. The Olmo-3-7B-Think K&K RLCSD checkpoint(s) behind Table 1 (the reported step, and ideally intermediate ones), e.g. on the HF Hub. This would let us separate training differences from evaluation differences immediately.
  2. Training logs. The SwanLab (or other) run for Olmo-3-7B-Think K&K RLCSD: training statistics (entropy, response length, clip ratio, reward, valid-group fraction) and the per-split validation curve. The README shows Qwen3-8B dynamics but no Olmo curves.
  3. Exact environment. pip freeze / conda env export of the training environment, plus GPU model, driver, CUDA toolkit, and anything set in the environment (e.g. VLLM_ATTENTION_BACKEND, VLLM_FLASH_ATTN_VERSION). In particular the torch, vLLM, transformers and flash-attn versions.
  4. Code and config state for Table 1. Which commit (or local changes) produced the Olmo-3-7B K&K numbers, the exact config and command-line overrides, and the actor/ref strategy (fsdp or fsdp2). How did you avoid the checkpointing crash above?
  5. Evaluation protocol. Is the reported pass@1 from the final checkpoint, a fixed step, or the best validation point over training? How many seeds or runs? n samples per prompt? Are truncated responses (at 38,912) scored as wrong? Is the eval the in-run _validate or a separate script?
  6. Training length. How many steps did the Olmo K&K RLCSD run train for (the yaml's 30 epochs is ~2,340 steps; the Qwen3-8B figure goes to 400)?
  7. Model revision. The HF revision (commit hash) of allenai/Olmo-3-7B-Think used, and whether the chat template was the repo default.
  8. Validation generations. If available, the validation outputs (generated text per puzzle) of the reported checkpoint.

We're happy to share our full training metrics and validation generations, or to run a check on our side if that helps. Thanks again!

mayug avatar Oct 02 '26 12:10 mayug

Hi, thank you so much for the careful reproduction and the very detailed report. We really appreciate the time you put into this. After going through it, we believe the gap mainly comes from the following:

Hardware. Our experiments were run on H20 GPUs rather than B200, so the underlying kernels differ, which can lead to some numerical differences.

How the number is selected. For Olmo, we trained for about 400 steps and reported the best validation value over training, rather than the value at a fixed step. Since your run stopped at step 300 while the curve was still rising, this may account for part of the gap.

Validation variance. We noticed that from step 100 on you used val_batch_size=800, which differs from the yaml default. Due to batch variance, this can lead to different generations. In addition, each OOD split has only 100 puzzles, so one puzzle already moves the score by one point. Your step-0 results already differ from ours even though no training is involved, which suggests the evaluation itself carries noticeable variance.

Apart from these, we don't expect other major differences in the setup. If convenient, it might be worth running to ~400 steps with the default val_batch_size and taking the best validation point.

We'd also be curious: have you tried reproducing other settings, such as other models or the math datasets? Do those match the paper, or is this the only configuration showing a noticeable gap? That would help us a lot in narrowing things down.

Thanks again for the thorough work, and please feel free to reach out with any further questions!

panly2003 avatar Oct 09 '26 07:10 panly2003

Thanks for the quick and detailed reply, and for clarifying how the Olmo number was selected. That is very useful.

Following your suggestion, we are resuming the same run (your code, your config) from step 300 to step 400 and will report the per-step validation reads and the best point here when it finishes.

For context on the curve so far: the in-run 4-split reads were 58.6 / 57.2 / 58.5 / 60.7 / 61.1 / 61.5 / 62.2 at steps 0 to 300, i.e. under half a point per 50 steps after step 150.

Independently of that, the thing that would help us most in narrowing down where the difference comes from is a direct comparison against your run, so we would like to request again for:

  1. Your best Olmo-3-7B-Think K&K RLCSD checkpoint (the one behind Table 1), on the HF Hub or anywhere convenient. Evaluating it with both your in-run validation and our harness would immediately tell us whether the gap is in training or in evaluation.
  2. The training logs for that run (SwanLab export or metrics file): the per-split validation curve and training statistics such as response length, entropy, clip ratio and valid-group fraction. Comparing those against ours step by step would localise any training-side divergence.
  3. Environment details: GPU and driver, torch / vLLM / transformers / flash-attn versions, the commit used, and whether the actor ran with fsdp or fsdp2 (a6f8afa as shipped crashes at the first backward with FSDP2 + gradient checkpointing on Olmo3, as described above).

Thanks again, and we will post the 400-step results as soon as they are in.

mayug avatar Oct 09 '26 09:10 mayug

Following up as promised: we resumed the same run (your code at a6f8afa, your config and data, 8 x B200) from step 300 to step 400.

In-run validation (your _validate, n=1, pass@1, %):

step KK 4-8 KK 9 KK 10 KK 11 4-split
0 72.4 67.0 58.0 37.0 58.6
50 71.8 64.0 58.0 35.0 57.2
100 72.0 68.0 55.0 39.0 58.5
150 72.8 65.0 63.0 42.0 60.7
200 72.2 71.0 60.0 41.0 61.1
250 74.2 67.0 61.0 44.0 61.5
300 73.8 66.0 63.0 46.0 62.2
350 75.2 67.0 62.0 40.0 61.1
400 75.0 70.0 65.0 41.0 62.8
paper, RLCSD 75.4 76.0 65.0 48.0 66.1

So the best validation value over the 400 steps is 62.8 (step 400). Separate n=2 evaluations with the same 38,912 cap and sampling give 62.1 / 63.1 / 63.6 at steps 300 / 350 / 400. In-domain matches the paper (75.0-75.8 vs 75.4); the gap is on KK 9 and KK 11.

One observation on validation noise: when the run resumed from step 300 it re-ran the step-300 validation on the identical weights and got 72.8 / 67.0 / 63.0 / 52.0 -> 63.7, versus 62.2 the first time. Six puzzles on KK 11 moved the 4-split by 1.5 points, so single-sample reads on 100-puzzle splits swing by that much between two evaluations of the same checkpoint.

Training statistics stayed flat through steps 300-400 (train score 0.61-0.64, response length ~12k, clip ratio ~29%, entropy ~0.30), so we would not expect further steps to change the picture.

At this point the most useful thing for narrowing down the difference would still be your best checkpoint for this row, or the training logs and environment details from that run. We would be happy to evaluate the checkpoint with both your validation and ours and report back here. Thanks again.

mayug avatar Oct 14 '26 13:10 mayug

Hi, thank you again for the detailed follow-up and for completing the run to 400 steps. The repeated validation of the identical step-300 checkpoint is also useful evidence of the variance in single-sample evaluation, although we agree that variance alone may not explain the entire remaining gap.

We would like to provide a few clarifications:

First, the Olmo-3-7B-Think K&K result reported in Table 1 was obtained from the step-400 checkpoint. Unfortunately, because of storage constraints, we enabled automatic checkpoint cleanup during our experiments. The corresponding checkpoint has since been deleted and is no longer available for release. The associated validation generations were not retained either. We apologize that we cannot provide them for direct comparison.

Second, the original training environment has also been cleaned up, so we no longer have its exact pip freeze, driver information, or complete package lockfile. The environment information we can still confirm follows the setup documented in the repository README:

  • 8 × NVIDIA H20 GPUs;
  • Python 3.10–3.12;
  • CUDA 12.6 with PyTorch cu126;
  • torch>=2.5.0,<2.10;
  • transformers>=4.45.0;
  • vllm>=0.6.0;
  • flash-attn>=2.6.0.

These are the documented compatibility ranges rather than the exact patch versions used in the original run. The actor and reference model did use FSDP2 with BF16 and gradient checkpointing.

Regarding the Olmo3 + FSDP2 checkpointing crash, site-packages/transformers/models/olmo3/modeling_olmo3.py had been manually modified in the training environment. This was a local Olmo3 compatibility change, but it was not captured in the released repository. This likely explains why our original run did not encounter the checkpointing crash that you observed. Your diagnosis is consistent with this missing environment-level modification, and we apologize for not preserving and documenting it in the initial release.

Finally, if resources permit, we strongly recommend reproducing at least one of the Qwen3 configurations. This additional comparison would make it much easier to identify the scope of the discrepancy:

  • If a Qwen3 configuration matches the paper while Olmo3 does not, the issue is more likely specific to the Olmo3 model, its local compatibility change, or its software stack.
  • If Qwen3 shows a similar gap, that would instead suggest a broader mismatch in the training or evaluation setup.

Thank you again for the careful reproduction work and for documenting all the results in such detail.

panly2003 avatar Oct 19 '26 04:10 panly2003