Repository navigation
ci: track, not gate, raw_reward in the Kimi K3 4-layer tests - #4576
Merged
Merged
Conversation
Both tests use --rm-type deterministic_random, which scores a sample by sha256(tokens + response)[0] % 2. raw_reward is therefore the mean of 16 coin flips per step and has nothing to regress. The default band (floor 0.8 x mean, about 0.42) fails 6/16 or fewer, about 23% of fresh draws. Two of 22 main nightlies (2026-10-12 and 10-14) scored 0.375 at step 1, and #4548 failed on 0.3125. Declare the metric with constraint=None so it is still recorded and reported against its own history, the same as perf/actor_train_mfu. The grad_norm, ppo_kl, train_rollout_logprob_abs_diff and train_rollout_kl gates still cover rollout and train numerics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Collaborator
Author
|
@claude review |
Rockdu
enabled auto-merge (squash)
October 31, 2026 04:16
Rockdu
disabled auto-merge
October 31, 2026 04:17
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
rollout/raw_rewardin the two Kimi K3 4-layer e2e tests is now tracked, not gated (constraint=None). This is the same mode asperf/actor_train_mfu: the value is still recorded and reported against its own history, but it never fails CI or untrusts a run.grad_norm,ppo_kl,train_rollout_logprob_abs_diffandtrain_rollout_klkeep their default bands.Why
Both tests use
--rm-type deterministic_random, because the pruned 4-layer model scores 0 on gsm8k. That reward issha256(str(tokens) + response)[0] % 2(miles/rollout/rm_hub/__init__.py). Soraw_rewardis the mean of 16 coin flips per step. It carries no model-quality signal, and no regression can lower its expected value of 0.5.The default band floors it at
0.8 x mean. With the current baseline mean of 0.521875 the floor is 0.4175, so the gate fails at 6/16 or fewer. For 16 fair coins that happens 22.7% of the time.Two more effects make it worse:
mainwith the same code. For example, the nightlies of 2026-10-14, 10-15 and 10-16 have bit-identical step-0grad_norm(2.4867029190063477), yet their step-1raw_rewardwas 0.375, 0.5 and 0.5625.trusted=false, and the baseline reads only trusted rows. Low draws never enter the baseline, so its mean and floor keep drifting up.Validation
Step-1
raw_rewardfrom every scheduledPR Testnightly onmainfrom 2026-10-09 to 10-30 (22 runs):mainruns (10-12, 10-14) scored below today's 0.4175 floor. The gate was not enforcing yet then, so they did not fail.cur=0.3125 vs mean=0.521875 (n=20) outside [0.4175, inf]. Its step-0 rollout matched amaincluster (raw_reward0.625, rollout logprob -10.22097). Its step-1 rollout logprob, logprob abs diff, train/rollout KL and grad norm were all inside the 22-runmainrange.Local checks:
rollout/raw_reward: steps="all", constraint=None, enforce=False.pytest tests/ci/test/{test_ci_register,test_history_gate,test_gate_integration,test_metric_selection,test_history_replay}.py: 374 passed. This includestest_every_training_e2e_with_a_history_gate_also_gates_mfu, which scans the e2e files.ruff checkon both files is clean.Not in this PR: the band in
GATE_DEFAULTSand the trusted-only baseline. Other tests with a real reward still need them.Files
tests/e2e/megatron/model_scripts/test_kimi_k3_4layer_ci.py:rollout/raw_rewardis tracked instead of gated.tests/e2e/megatron/model_scripts/test_kimi_k3_4layer_lora_ci.py: same change.Checklist
pre-commit run --all-filespasses (not run;ruff checkon the two changed files only)pytest -xis green (partial: thetests/ci/testgate suites above, 374 passed; the full suite and the GPU e2e were not run)python3 train.py --helpstill parses (n/a: no flags changed)🤖 Generated with Claude Code