Qwen4-Max 1.40×
Harness: Qwen Code · switches: OPD_SKIP_DEAD_REF=1 OPD_SKIP_DEAD_ENTROPY=1 OPD_FUSE_LOGPROB_PASS=1 OPD_TRAIN_CPU_THREADS=24 OPD_RECOMPUTE=none OPD_GC_FREEZE=1 OPD_MAX_TOKENS_PER_GPU=8400 OPD_GDN_TP_HEADS=1
The first final judge failed with CUDA OOM in all three full runs (each short by 0.12–0.41 GiB; an ops keepalive held 1.1 GiB on every GPU at the time). After the keepalive was removed on 11-20, the same submission (same source digest) was judged again: PASS, N1, 1.4004×.
- Judged
- 1.40×
- Tier
- N1
- Self-best
- 1.38×
- Rounds
- 12
- Hours
- 10.0
- API cost
- $15.8
- Input tokens · 94.2% cached
- 89 M
- Output tokens
- 0.4 M
- Requests
- 663
§ 02Key levers
- Candidate, three windows (s)
- 114.2 / 113.9 / 116.1
- Rollout side
- ≈1.0×
- Teacher side
- ≈1.0×
- Train side
- 2.29×
- Per-step sampler sync
- ✗ not in the log; round 5 looked at rollout: it attributed the ~1.9 ms of GPU idle per decode step to the scheduler's Python frames (
load_batch,process_batch_result_decode, etc.) and counted the sampler by kernel time only (~0.19 ms of 4.54 ms per step), concluding what remains is weight-bandwidth-bound GEMMs that are hard to improve; rollout unchanged (its own full checks 0.9912–0.9969×) - Train-side main levers
- ✓ skip zero-coefficient reference forward and entropy, OPD advantages formed in the loss from training-forward logprobs (round 2, 1.3362×, check PASS N1); CPU Adam 24 threads (round 5, optimizer tail ~11.5→5.5 s) plus full recompute off (round 4), the two together 1.8036× in round 7; GC freeze (round 9, each
gc.collect0.605–0.788→0.060–0.076 s); 8400 tokens per GPU so each microbatch holds two samples, microbatches 63→32 (round 11, train-only timing 2.0397×); GDN split by head over TP, the split heads all-gathered back before a fullout_proj, forward bitwise identical by design (round 12, three-side check PASS N1 1.3749×, train side 2.2943×;update_direction_cos0.96142, floor 0.95660)
Round 4's CP head split also splitout_projand all-reduced two bf16 partial sums: INCORRECT (grad_norm_firstoff by 0.0219, tolerance 0.00165) and only 0.4% faster; the FlashQLA kernel was slower (1.8237× vs 1.8781×); packing caps 16384 and 12288 both OOM; comm groups still destroyed and rebuilt every step (~1.7 s), left alone for fear of a hang - Teacher-side changes
- ✗ teacher logprob algorithm unchanged; round 3 tried raising the all-reduce fusion cap to 4096 (teacher 0.9728×, reverted), chunked prefill 8192 (1.0296×, ~+0.3% on the step; not adopted to avoid touching teacher numerics that were bitwise identical at the time) and 2048 (0.9098×); in the re-judge the teacher is bitwise identical to the reference (
mean_abs0.0)
§ ARaw trace
Raw work log13 sections
0.5 hRound 1 — profile the unchanged reference (23:49 → 00:15)
Commands (detached, sequential, one GPU lock each):bench.py profile --tree /submission/slime_opd --out /tmp/r1/prof_<side> --side <side>for rollout, teacher, train. Logs/tmp/r1/prof_*.log, driver PID 420893. ### rollout (/tmp/r1/prof_rollout/kernel_report.md, 200 decode steps, TP-0 of engine 0) - window 2230 ms, GPU busy 40.7 % (profiler inflates CPU); kernel time 4.9 ms/step vs ~6.6 ms/step real (engine log: 32 running requests, 4858 tok/s per engine). - GEMMs (nvjet) 53 % of kernel time;fused_recurrent_gated_delta_rule_packed_decode9.9 %; flashinfer oneshot-lamport allreduce fusion 8.2 %; one 3-block splitK GEMM (GDN b/a projection) 6.1 % at SM coverage 0.02. - largest gaps sit between the eager sampling / logprob elementwise kernels (outside the decode CUDA graph). ### teacher (/tmp/r1/prof_teacher/kernel_report.md, 64 prefill steps of replayed rollout 1) - window 9247 ms, GPU busy 92.2 %. - GEMM 42.5 % + 7.7 %; ncclDevKernel_AllReduce_Sum_bf16_RING_LL 22.5 % (8256 calls, median 228 us, 24 blocks, SM cov 0.18) — exposed TP4 allreduce, LL protocol; AllGather 3.7 %; big elementwise copies 4.1 %; GDN prefill kernels ~5 %. - cause:FUSE_ALLREDUCE_MAX_BATCH_SIZE = 2048in sglanglayers/layer_boundary/residual/add_norm.py, so the teacher's 4096-token prefill chunks never take the flashinfer fused allreduce path the student's decode uses. ### train (/tmp/r1/prof_train/profile_train/train.log, slime timers, steady state) -ref_log_probs11.8 s +log_probs10.4 s +actor_train51.9 s =train74.9 s (judge window ~80 s). - 64 micro-batches per step (one ~8250-token sample each:max_tokens_per_gpu 4096 × cp 2= 8192 cap). -ref_log_probsis dead work:--kl-loss-coef 0.00andkl_coef 0, yetwith_refiskl_coef != 0 or use_kl_loss(placement_group.py) so a whole reference forward runs every step. -log_probsrepeats the training forward: withuse_opd,can_reuse_log_probs_in_lossis forced False, but its only consumers are the ratio's old policy (same weights → ratio 1) and the student side of the per-token reverse KL. Advantages are per token (normalize_advantagesdefault False, GRPO task rewards broadcast per sample), so the loss can form them from its own detached log-probs. - GDN linear attention runs throughslime_plugins/models/qwen3_5.py's *replicated* wrapper:HuggingfaceAttention.forwardall-gathers the sequence over CP and every TP rank computes all 32 heads on the full sequence → 4× redundant, ~48 % of train FLOPs. Megatron's TP/CP-sharded GDN (--qwen-gdn-implementation megatron) exists but renames/reshapes parameters, and the judge's train record gate compares parameter names/shapes exactly → not usable as-is.
0.5 hRound 2 — dead and redundant forward passes in the train step (00:10 → …)
Changes (all in thetrainside), each behind its own switch, off by default: -OPD_SKIP_DEAD_REF:loss.dead_ref_kl_terms();actor.pyskips loading the reference checkpoint when both KL coefficients are 0 (so"ref" not in backup_tagsand the ref forward is skipped by the existing guard),policy_loss_functionskips thekl_lossterm. -OPD_SKIP_DEAD_ENTROPY:loss.dead_entropy_term();with_entropy=Falsein the policy loss whenentropy_coef == 0(the term is multiplied by 0),entropy_lossreported as 0. -OPD_FUSE_LOGPROB_PASS:loss.opd_advantages_in_loss();actor.pytreats the actor log-prob pass as reusable, andpolicy_loss_functionbuilds the OPD advantage from its own detached log-probs andbatch["teacher_log_probs"], reportingopd_reverse_klas before. Expected from the timers: −11.8 s (ref) −10.4 s (actor log-probs) of 74.9 s → train ≈ 1.4×. Numerics tier: N1 (the ratio becomes exactly 1 and the advantage uses the training forward's log-probs). Result (bench.py check --side train --config /submission/switches.json --out /tmp/r2/check, finished 01:08:40): PASS, tier N1./tmp/r2/check/check.json: train windows 63.269 / 58.242 / 57.660 s vs reference 80.010 / 79.953 / 79.061 → side speedup 1.3362, projected full-loop 1.1431 (bar 1.0208).exact: ok(parameter/optimizer names, shapes, dtypes unchanged),bitwise: false, 6338 tensors differ. Statistical endpoints all inside tolerance: update_norm d −9.6e-5 (tol 1.2e-3), exp_avg_sq_norm d 1.0e-4 (tol 4.4e-4), loss_mean d 5.6e-6 (tol 3.8e-5), grad_norm_first d −9.4e-6 (tol 1.7e-3), update_direction_cos 0.9941 (min 0.9566, reference noise 0.9913). Mismatch ratio 1.0. Theref_log_probsandlog_probstimers disappear fromtrain.log; slime's ownTimer train enddrops to 52.6 / 52.1 / 57.5 s. Cost 1.80 GPU-hours. Note on process hygiene: the Round-1profile --side trainrun never finished — kineto'sexport_chrome_tracegrew past 1 GB gz per rank and was still writing after 20 min with the GPUs idle. It was terminated (PID 438666 and its driver) so the queued Round-2 check could take the lock; the partial traces were deleted. Lesson: do not re-runprofile --side trainon this recipe; slime's own timers plus the rollout/teacher kernel reports are enough.
1.2 hRound 3 — teacher all-reduce fusion ceiling (00:18 → …)
sglang/python/sglang/srt/layers/layer_boundary/residual/add_norm.py:FUSE_ALLREDUCE_MAX_BATCH_SIZEis nowint(os.environ.get("OPD_AR_FUSION_MAX_TOKENS", "2048")). Default unchanged. The teacher prefills in 4096-token chunks, i.e. exactly above the stock ceiling, so it never takes the flashinfer fused allreduce+add+norm path and pays an exposedncclDevKernel_AllReduce_Sum_bf16_RING_LL(22.5 % of its kernel time). Screening configs:/tmp/r3/sw_fusion4096.json(OPD_AR_FUSION_MAX_TOKENS=4096),/tmp/r3/sw_chunk2048.json(OPD_TEACHER_SERVER_ARGS=--chunked-prefill-size 2048, the other way to get under the ceiling),/tmp/r3/sw_chunk8192.json,/tmp/r3/sw_fusion8192.json. ### Result:OPD_AR_FUSION_MAX_TOKENS=4096REJECTED (02:32:28 → 02:35:47,/tmp/r6/t_fusion4096)time --side teacher, status ok, layout clean, but slower: windows 18.775 / 18.813 / 18.445 (mean 18.678) vs the reference's 18.278 / 18.325 / 17.904 (mean 18.169) → side 0.9728×, projected 0.9971. The hypothesis was wrong in an informative way: flashinfer's oneshot-lamport fused allreduce+add+norm is built for *decode*-sized batches (the student's bs=32), and at a 4096-token prefill it is worse than the plain NCCL ring allreduce it replaces — whilebase_runner.py:317also grows the fusion workspace with the ceiling, costing bandwidth. The switch stays at its stock default 2048. Follow-up (/tmp/r10/queue.sh, detached, PID 658379, log/tmp/r10/queue.log, waits for the r9 queue): attack the same 22.5 % allreduce share by *count* instead of by fusion —--chunked-prefill-size 8192(≈1 chunk per ~8300-token request instead of 3, so fewer exposed all-reduces and larger GEMMs) and--chunked-prefill-size 2048(the opposite direction, which gets under the stock fusion ceiling with a batch size the fused kernel is actually good at). Teacher chunking cannot change what is computed — causal attention is exact under any chunking — but it may move the reduction order, so it would need acheckbefore adoption. Measured (/tmp/r10/t_chunk8192,/tmp/r10/t_chunk2048, bothtime --side teacher, status ok, layout clean): | teacher args | windows (s) | mean | side | projected | |---|---|---|---|---| | stock (4096) | 18.278 / 18.325 / 17.904 | 18.169 | 1.0 | 1.0 | |--chunked-prefill-size 8192| 17.513 / 17.972 / 17.457 | 17.648 | 1.0296 | 1.0030 | |--chunked-prefill-size 2048| 20.042 / 20.134 / 19.734 | 19.970 | 0.9098 | 0.9899 | |OPD_AR_FUSION_MAX_TOKENS=4096| 18.775 / 18.813 / 18.445 | 18.678 | 0.9728 | 0.9971 | So the mechanism is real but small: fewer/larger chunks help (+3 %), smaller chunks hurt (−9 %), and forcing the fused allreduce at prefill size hurts (−2.7 %). Not adopted. +3 % on a side weighted 0.1027 is +0.3 % on the step, and it would add an unverified numerics change to the teacher gate — which is currently *bitwise* identical to the reference (mean_abs 0.0). Risking a zero on the whole submission for 0.3 % is a bad trade.OPD_TEACHER_SERVER_ARGSstays unset.
1.2 hRound 4 — activation recompute and the replicated GatedDeltaNet (00:45 → …)
Two independent train-side changes, each behind its own switch, both off by default: -OPD_RECOMPUTE(slime/backends/megatron_utils/arguments.py::_recompute_override, applied at the top ofvalidate_args):noneclearsrecompute_granularity/method/num_layers,selectiveselects selective granularity. The recipe recomputes every layer (full/uniform/1) — a second forward per micro-batch. Memory is the only reason for it and the colocated engines release their occupation while the trainer runs, so this is a memory strategy change, not a semantics change. Recompute replays the same forward, so the activations are bitwise identical → expected N0. -OPD_GDN_CP_HEADS(slime_plugins/models/qwen3_5.py): the replicatedQwen3_5GatedDeltaNetmultiplies every head over the whole CP-gathered sequence on every rank, so its projections arecp_size× redundant (~47 % of the step's FLOPs at cp=2). Each CP rank now selects its own head rows ofin_proj_qkv/conv1d/in_proj_z/in_proj_b/in_proj_a/dt_bias/A_logand its own columns ofout_proj, and the partialout_projsums are all-reduced over CP. Parameter names, shapes and dtypes are untouched (the judge's record gate compares them exactly, which is what rules out Megatron's native TP/CP-sharded GDN). Gradient argument:dist_nn.all_reduce's backward all-reduces the gradient, and each CP rank only keeps its own zigzag output chunks, so the GDN backward sees the same full output gradient as before and produces the partial parameter gradient of its head slice. Megatron already sums partial CP gradients (calculate_per_token_loss=False→ scale1/dp_cp, sum over dp_cp), so the reduced gradient is unchanged. Only the fp32 reduction order insideout_projdiffers → N1. Screening queue (/tmp/r4/queue.sh, detached):check --side trainwithOPD_GDN_CP_HEADS=1(/tmp/r4/gdn_check), thentime --side trainwithOPD_RECOMPUTE=none(/tmp/r4/recomp_time), thentime --side teacherwithOPD_AR_FUSION_MAX_TOKENS=4096(/tmp/r4/t_fusion4096). Superseded by the Round-6 queue below, which runs the same jobs after the CPU-threads screen. ### Result:OPD_GDN_CP_HEADSREJECTED (01:09 → 02:05,/tmp/r4/gdn_check/check.json) status INCORRECT, and the speed it bought was noise. Both reasons to leave it off: - Correctness:grad_norm_first1.01865 vs reference 0.99674, d 0.0219 against a paired-noise tolerance of 0.00165 (13× over);update_direction_cos0.9313 vs min 0.9566.update_norm,exp_avg_sq_normandloss_meanwere all inside tolerance, so this is not a gradient-plumbing bug — the plumbing is right, the *precision* is not. Shardingout_proj's K dimension splits one fp32-accumulated 4096-term GEMM into two 2048-term GEMMs that each round to bf16 before the CP all-reduce adds them. That extra rounding is ~1e-3 relative on the GDN output, which is far above the reference's own run-to-run noise. A bitwise-preserving variant would have to keepout_projunsharded (all-gathercore_attn_outover CP first, then every rank runs the full GEMM), which gives back a third of the saving. - Speed: train windows 58.802 / 59.953 / 59.448 (mean 59.401) → side 1.3414 vs Round 2's 1.3362 on the same base. +0.4 %, inside the reference's 1.04 % spread. The micro-batch loop went 40 s @ 1.59 mb/s → 39–42 s @ 1.64–1.70 mb/s (~5 %), not the ~23 % the FLOP count predicted. The GDN's cost is evidently dominated by the Triton chunked delta-rule recurrence and the CP sequence all-gather, not by the head projections the sharding halves. The switch stays committed but off;/submission/switches.jsondoes not set it. With the flag unset the wrapper takes the original replicated path. Also measured in the same run (the inertOPD_STUDENT_SGLANG_ARGShook makes the judge score all three sides): rollout 0.996× and teacher 0.9973× — both at parity with the reference, inside their 0.72 % / 0.22 % spreads. So the full-loop projection is dominated by the train side: train 1.34× against a 0.4976 weight gives 1.1425× overall. ### Result:OPD_RECOMPUTE=noneLANDED (02:19:18 → 02:32:28,/tmp/r6/recomp_time/time.json)time --side train, status ok, train side speedup 1.6354, projected full loop 1.2397. Windows 49.389 / 48.814 / 47.966 s, mean 48.723.OPD_RECOMPUTE=none: recompute_granularity=Noneis logged, so the override is confirmed active.actor_train41.0 / 43.1 / 42.5 / 41.5 / 42.9 s (was 51.4–52.4 s) → ~9 s saved, and the micro-batch loop rate rises 1.57–1.61 → ~1.90 mb/s. That is the second forward pass disappearing, as predicted. No OOM: this screen has no teacher resident, but the full loop still leaves ~76 GB/GPU for activations (see the offload correction above), and the packing screen below probes the memory ceiling directly. This lever and the CPU-threads lever are independent — one shortens the micro-batch loop, the other the optimizer tail — so they are expected to add: 48.7 − 6.3 ≈ 42.4 s → train ≈ 1.88×. ### Correction to the Round-1 note on offloadlaunch.shpasses no--offload-train/--offload-rollout, butslime/utils/arguments.py:2135-2146defaults both to True under--colocate. So the colocated dance does happen:sleep3.0–3.4 s andwake_up1.5 s per step (slime timers), and the student engines' 0.45 static fraction is released while the trainer runs. That leaves roughly 143 − 36 (teacher) − 31 (Megatron) ≈ 76 GB per GPU for activations in the *full* loop, which is what makesOPD_RECOMPUTE=noneworth screening.
1.4 hRound 5 — the CPU-offloaded Adam step runs on one core (01:00 → …)
actor_trainis ~52 s while the 64-micro-batch forward/backward loop inside it is only ~40 s (actor train: 64/64 [00:40, 1.59microbatch/s]). The remaining ~11 s is grad finalization plusoptimizer.step(). Sampling the actor's threads over a whole run: - main thread 429.1 CPU-seconds, autograd thread 168.8 s, all 104 other threads together 1.6 s; - a 36 s per-thread poll never saw more than one thread above 0.3 CPU; -py-spycatchescore/optimizer/cpu_offloading/hybrid_optimizer.py:109 _set_sub_optimizer_grads. So Ray'sOMP_NUM_THREADS=1for workers leaves the whole CPU Adam update on a single core of a 96-core host, four actors each on their own core.HybridDeviceOptimizer.build_cpu_optimizer_listalso builds one Adam optimizer per parameter tensor, so every update is a chain of full-tensor elementwise passes — exactly the shape that scales with intra-op threads. Change:OPD_TRAIN_CPU_THREADS(slime/backends/megatron_utils/actor.py, right after thedebug_rollout_onlyguard) callstorch.set_num_threads(int(...)). Off by default. Adam is elementwise and the grad norm is computed on GPU, so the thread count cannot change any value → expected N0. Screening 24 threads (96 cores / 4 actors). Queue/tmp/r6/queue.sh(detached, PID 528491, log/tmp/r6/queue.log), one GPU lock per command, started after the Round-4 GDN check released the lock at 02:05:53: 1.time --side trainOPD_TRAIN_CPU_THREADS=24→/tmp/r6/threads_time2.time --side trainOPD_RECOMPUTE=none→/tmp/r6/recomp_time3.time --side teacherOPD_AR_FUSION_MAX_TOKENS=4096→/tmp/r6/t_fusion4096(The earlier/tmp/r5/queue.shwas killed before it ran anything: it would have re-run the GDN check that was already in flight.pkill -fon a queue script also matches the invoking shell's own command line, so the queues are stopped by explicit PID now.) ### Result:OPD_TRAIN_CPU_THREADS=24LANDED (02:05:53 → 02:19:18,/tmp/r6/threads_time/time.json)time --side train, status ok, train side speedup 1.4938 (Round 2's base was 1.3362). Windows 51.759 / 56.207 / 52.255 s, mean 53.407, against the reference's 80.010 / 79.953 / 79.061. The timers confirm the diagnosis exactly — the whole win is in the optimizer, none in the loop: -actor_trainsteady state 45.4 / 45.5 / 45.9 / 45.6 s (was 51.4–52.4 s) → ~6 s saved; - the 64-micro-batch loop is unchanged at 40 s, 1.57–1.61 microbatch/s; - so the non-loop part ofactor_trainwent ~11.5 s → ~5.5 s.torch intra-op threads 24is logged by all four actors, so the switch is confirmed active. Expected numerics tier N0: the CPU Adam update is elementwise (each element independent, so the thread partition cannot change a value) and Megatron's grad-norm/clip runs on the GPU. 24 = 96 cores / 4 colocated actors, which is why it is not oversubscribed. ### Rollout: investigated, no change yet Decode is weight-bandwidth bound: 4.54 ms of GPU kernel time per step at bs=32 per engine (~4950 tok/s), of which the nvjet GEMMs are ~2.85 ms ≈ 59 % of the 4.8 TB/s peak. The remaining ~1.9 ms/step is GPU idle. Attributing the idle gaps in the rollout trace to Python frames puts them indecode_cuda_graph_runner.load_batch(223 ms/200 steps),process_batch_result_decode(222 ms),prepare_for_decode/alloc_for_decode(163 ms) — scheduler bookkeeping, not kernels.num_continuous_decode_steps, the knob that would amortize exactly this, is declared insrt/arg_groups/fields/schedule.pybut never read anywhere in this sglang tree, so it is dead. The sampler's full-vocab fp32 passes (div_by temperature 1,softmax,log) are only ~0.19 ms of the 4.54 ms, so they are not worth the numerics risk. No rollout change submitted so far;OPD_STUDENT_SGLANG_ARGS(commit c22526a5) is the hook for screening engine args if a lever turns up. ### Rollout fast-path inventory (what is already enabled — do not re-try these) Per-decode-step kernel budget, from/tmp/r1/prof_rollout/kernel_report.md(200 steps, TP-0): | kernel | calls/step | ms/step | note | |---|---:|---:|---| |nvjet_…128x32_64x10_4x1_v_bz_TNT| 32 | 1.044 | 96 blocks, SM cov 0.73 | |nvjet_…64x32_64x16_4x1_v_bz_TNT| 32 | 0.512 | 96 blocks, SM cov 0.70 | |nvjet_…64x32_64x16_2x1_v_bz_splitK_TNT| 32 | 0.493 | | |fused_recurrent_gated_delta_rule_packed_decode| 24 | 0.487 | one per GDN layer, SM cov 1.00 | |flashinfer allreduce_fusion_oneshot_lamport| 64 | 0.405 | 2 per layer, already fused | |nvjet_…64x32_64x16_1x1_h_bz_splitK_TNT| 24 | 0.300 | 3 blocks, SM cov 0.02 =in_proj_ba| |nvjet_…64x16_64x16_1x2_h_bz_TNT| 32 | 0.265 | | |cublasLt splitKreduce| 56 | 0.117 | serves both splitK GEMMs | | flash attn fwd (+combine) | 8 | 0.123 | one per full-attention layer | | sampler softmax / allgather / argmax / rand / log | 1 each | ~0.19 | eager, outside the graph | Already-enabled fast paths, verified in this tree: - decode CUDA graph (disable_cuda_graph = False), so the model forward is graph-replayed; - overlap scheduling is ON, not off:_mamba_radix_cache_resolution(srt/arg_groups/overrides.py:451) only forcesdisable_overlap_schedule=Truewhen it picksno_buffer, and it picksextra_bufferwhen overlap is wanted andlinear_attn_backend == "triton"— which it is (the FLA Triton decode kernel is in the trace). The teacher'sget_server_infoconfirmsdisable_overlap_schedule = False. -in_proj_baalready runs on a second CUDA stream during graph capture (qwen3_next.py::_forward_input_proj,alt_stream,seq_len < 1024), so the 3-block under-filled GEMM is largely *hidden* behindin_proj_qkvz— the union-of-kernels busy time (907 ms) is 8 % below the sum of durations (987 ms). Merging b/a into qkvz would therefore recover much less than its 0.300 ms/step of kernel time. -fused_qkvzba_split_reshape_cat,_fused_qkvzba_causal_conv1d_update_contiguous,_fused_qk_rmsnorm_rope_gate,_fused_sigmoid_mul,act_and_mul, flashinfer RMSNorm fusion. Why the remaining rollout headroom is hard: at the fixed 32 requests/engine the GEMMs are weight-bandwidth bound and the two largest run on 96 of 132 SMs (M=32 → one M-tile, N=12288 → 96 N-tiles of 128), reaching ~62 % of the 4.8 TB/s peak. Filling 132 SMs needs a tile count that does not divide the fixed N, and splitK=2 gives 192 blocks = 1.45 waves, i.e. the same 0.73 utilization. Raising the batch per engine is forbidden by the fixed layout (2 engines × TP2) and the fixed global batch (64 samples).
2.4 hRound 6 — micro-batch packing (02:06 → …)
The step runs 64 micro-batches for 64 samples:max_tokens_per_gpu 4096 × cp 2= an 8192-token bin, and a sample is ~8300 tokens (8135 response + prompt), sofirst_fit_pack(slime/utils/dp_schedule.py:120) puts every sample in a bin of its own — the documented "individual sample larger than the cap" exception. Every micro-batch therefore pays the full per-micro-batch Python/launch/grad-accumulation cost for one sample's worth of GEMMs. Packing is semantically free here.loss.py:1623-1629scales the loss bynum_microbatches / step_global_batch_size * dp_world_size(with_context_parallel=True), which cancels Megatron's1/num_microbatchesand the1/dp_cpgradient scale. The step's gradient isΣ_samples (Σ_tokens x·mask / sample_mask_sum) / 64for *any* binning.get_sum_of_sample_mean(cp_utils.py:54) also derives each sample's CP zigzag split from that sample's owntotal_length, not from the bin, so the CP chunk boundaries do not move either. Only GEMM shapes and accumulation order change → N1, the same class as the landed log-prob fusion. The layout gate only comparesrank/world/tp/cp/pp/dp/ep/device/visible(judge/megatron_layout.rank*.json), so the token budget is not pinned. Change:OPD_MAX_TOKENS_PER_GPU(slime/backends/megatron_utils/arguments.py::_dynamic_batch_override, called fromvalidate_argsnext to the recompute override) setsmax_tokens_per_gpuandlog_probs_max_tokens_per_gpu. Off by default. Commit a155fe5b. Screening queue/tmp/r8/queue.sh(detached, PID 612655, log/tmp/r8/queue.log), waits for the Round-6 queue then runstime --side trainfor 16384 (≈3 samples/bin → ~22 micro-batches) and 32768 (≈7/bin → ~10):/tmp/r8/pack16384,/tmp/r8/pack32768. Note this lever andOPD_RECOMPUTE=nonecompete for the same activation memory, so they are screened separately and only the better one goes into the final switch set. Superseded before it ran anything: onceOPD_RECOMPUTE=nonemeasured 1.6354× on its own, the useful question became packing's *marginal* contribution on top of the best base, not packing alone. The idle queue was stopped by explicit process group (kill -TERM -- -612658; no bench child had started) and replaced by/tmp/r9/queue.sh(detached, PID 648713, log/tmp/r9/queue.log), which waits for the Round-6 queue and then runstime --side trainfor: 1./tmp/r9/combo— threads 24 + recompute none (/tmp/r9/sw_combo.json), the leading candidate; 2./tmp/r9/combo_pack— that plusOPD_MAX_TOKENS_PER_GPU=16384(/tmp/r9/sw_combo_pack.json), which also tests whether the two memory-hungry levers fit together. Process note:pgrep -f 'bash /tmp/rN/queue.sh'run from a shell whose own command line contains that string returns the *invoking shell's* PID, not the queue's. Read the queue's real PID fromps -eo pid,pgid,cmdinstead. ### Result:OPD_MAX_TOKENS_PER_GPUREJECTED — OOM (02:48:43 → 02:52:07,/tmp/r9/combo_pack)time --side trainwith the best base plusOPD_MAX_TOKENS_PER_GPU=16384(≈3 samples/bin, ~12450 tokens/GPU) died: `torch.OutOfMemoryError ... Tried to allocate 508.00 MiB. GPU 2 has a total capacity of 139.80 GiB of which 446.25 MiB is free ... 135.21 GiB is allocated by PyTorch`. Status ERROR, rc 1, no windows. The switch stays off. Useful side effect: this bounds the activation footprint. 135.2 GiB allocated − 30.9 GiB of params/grads ≈ 104 GiB of activations at ~12450 tokens/GPU, so ≈ 35 GiB at the stock 4096 budget. In the full loop the trainer has 139.8 − ~35 (teacher's 0.25 static fraction) ≈ 105 GiB, and needs 33 + 35 ≈ 68 GiB → ~37 GiB of headroom forOPD_RECOMPUTE=none. That is why the recompute lever is safe but packing on top of it is not: they compete for the same memory, and recompute buys far more (1.6354× vs packing's untestable claim).
3.0 hRound 7 — the two independent train levers together (02:36 → …)
/tmp/r9/combo(time --side train,/tmp/r9/sw_combo.json= Round-2 base +OPD_TRAIN_CPU_THREADS=24+OPD_RECOMPUTE=none), 02:36:38 → 02:48:43, status ok: | config | train windows (s) | mean |actor_train| mb loop | train side | projected | |---|---|---|---|---|---|---| | reference | 80.010 / 79.953 / 79.061 | 79.675 | — | — | 1.0 | 1.0 | | Round-2 base | 63.269 / 58.242 / 57.660 | 59.724 | 51.4–52.4 | 40 s @ 1.59 | 1.3362 | 1.1431 | | + threads 24 | 51.759 / 56.207 / 52.255 | 53.407 | 45.4–45.9 | 40 s @ 1.61 | 1.4938 | 1.1969 | | + recompute none | 49.389 / 48.814 / 47.966 | 48.723 | 41.0–43.1 | ~34 s @ 1.90 | 1.6354 | 1.2397 | | both | 45.806 / 43.829 / 42.973 | 44.203 | 35.3–39.7 | 31–32 s @ 2.03 | 1.8036 | 1.2849 | They add almost exactly (−6.3 s and −11.0 s separately, −15.5 s together), which is the expected result for one lever that shortens the optimizer tail and one that shortens the micro-batch loop./submission/switches.jsonnow carries this set.
4.3 hRound 8 — the colocated offload dance (03:56 → …)
Full check/tmp/r11/finalpassed at 1.2884×, so the trees were free to edit again. Plan written up front in/tmp/r12/plan.mdwhile the check held the GPUs. Hotspot: with the loop now 31.5 s,sleep(3.0–3.4 s) +wake_up(1.5 s) is ~4.5 s = 10 % of the 44 s train window, and it is pure memory strategy. Composition of the window: loop 31.5 s (71 %), grad finalize + CPU Adam ~5 s (11 %), sleep 3.2 s (7 %), wake_up 1.5 s (3 %), rest oftrain_wait~1 s (2 %).clear_memory(slime/utils/memory_utils.py) is the prime suspect and is called by both:accelerator.synchronize()+gc.collect()+accelerator.empty_cache()+ optionallytorch._C._host_emptyCache(). Suspicions, in order: the full Python GC over an actor holding the Megatron model, the per-tensor Adam sub-optimizers and the rollout batch;cudaFreeover ~34 GiB of activation cache; and dropping the pinned host cache that the CPU-offloaded optimizer re-allocates every step under--overlap-cpu-optimizer-d2h-h2d(host RAM is not scarce: 2 TB total, ~1.65 TB available). Two switches, both off by default, both N0 (host-memory caching and logging; no value touched): -OPD_OFFLOAD_TIMING=1logs the four component durations ofclear_memory. Threetime.perf_counter()reads (~150 ns) are unconditional so the body is not duplicated; the logging is gated. No GPU work, so it cannot move the measurement. -OPD_KEEP_PINNED_CACHE=1skipstorch._C._host_emptyCache(). Its only caller withclear_host_memory=Trueisactor.sleep(actor.py:194), so the blast radius is exactly the per-step offload. The pinned blocks are reused every step, so the footprint plateaus. Deliberately *not* done: droppingempty_cache()fromsleep(the engines' 0.45 static fraction must fit when they resume, so the untagged activation cache has to go back to the driver); droppinggc.collect()(it breaks the cycles holding GPU tensors — risks growth and a full-loop OOM); keeping process groups alive acrosstorch_memory_saver.pause()(NCCL's buffers would be allocated inside the paused region and then discarded). Commit 45525a7d. Screeningtime --side trainwith both on: detached PID 770803, log/tmp/r12/offload.log, out/tmp/r12/offload, started 04:03:17. One run gives both the breakdown and the speedup against the 44.203 s / 43.505 s baselines. ### Result:OPD_KEEP_PINNED_CACHEREJECTED, but the instrumentation found the real cost/tmp/r12/offload/time.json, 04:03:30 → 04:15:21, status ok: windows 46.276 / 43.317 / 42.834, mean 44.142 vs the combo's 44.203 → side 1.8068, projected 1.2857. No gain (0.1 %, noise). The switch stays off. The reason is unambiguous in the new breakdown: ``` clear_memory(host=True): sync 0.000s gc 0.605s empty_cache 0.120s host_emptyCache 0.000s clear_memory(host=False): sync 0.000s gc 0.640s empty_cache 0.000s host_emptyCache 0.000s clear_memory(host=True): sync 0.000s gc 0.788s empty_cache 0.076s host_emptyCache 0.000s clear_memory(host=False): sync 0.000s gc 0.615s empty_cache 0.000s host_emptyCache 0.000s ``` -host_emptyCacheis 0.000 s — the hypothesis was simply wrong; there is nothing to save. -synchronizeis 0.000 s — the GPU is already idle at the offload boundary. -empty_cacheis only 0.08–0.12 s insleepand 0.000 s inwake_up. -gc.collect()is 0.61–0.79 s per call, and it runs twice per step ≈ 1.25 s/step. That is ~2.8 % of the whole train window and ~28 % of the offload dance, spent walking a Python object graph that is almost entirely immortal (the model, and one Adam sub-optimizer per parameter tensor).sleeptotals 3.5–3.8 s andwake_up1.5 s, so ~2.8 s ofsleepis still outsideclear_memory(destroy_process_groups,torch_memory_saver.pause,reset_cuda_stack_size,print_memory).
4.7 hRound 9 — freeze the immortal GC graph (04:19 → …)
Directly attacks the measured 1.25 s/step.OPD_GC_FREEZE=1(slime/backends/megatron_utils/actor.py, at the end ofinit, afterprof.on_init_end()) runs onegc.collect()and thengc.freeze(), which moves every currently tracked object into CPython's permanent generation, where all later collections ignore it. The model and the per-tensor Adam sub-optimizers are exactly the immortal population that dominates the walk, and by the end ofinitthey all exist. Per-step garbage is allocated *after* the freeze, so it is still collected normally — this is notgc.disable(), and it does not risk the growth that droppinggc.collect()would. N0: garbage collection cannot change a value. Notegc.freeze()returnsNoneon CPython 3.12, so the log reportslen(gc.get_objects())taken just before the freeze instead. Also added, under the existingOPD_OFFLOAD_TIMINGflag:_OffloadClock, a per-component stopwatch forsleep/wake_up(inert null-object when the flag is off), to account for the remaining ~2.8 s ofsleep. Commit 0b191710. Screeningtime --side trainwithOPD_GC_FREEZE=1+OPD_OFFLOAD_TIMING=1(and not the rejected pinned-cache switch): detached PID 790371, log/tmp/r13/gcfreeze.log, out/tmp/r13/gcfreeze, started 04:26:57. ### Result:OPD_GC_FREEZEADOPTED (04:27:09 → 04:38:35,/tmp/r13/gcfreeze/time.json) Status ok.OPD_GC_FREEZE=1: froze 1260655 tracked objects into the permanent generation— 1.26 M immortal objects, which is exactly why each collection cost 0.65 s. The component effect is unambiguous, a 10× reduction: | | before | after | |---|---|---| |gc.collect()inclear_memory| 0.605–0.788 s | 0.060–0.076 s | |Timer sleep| 3.5–3.8 s | 3.1–3.2 s | |Timer wake_up| 1.5 s | 0.9–1.0 s | End to end: windows 42.560 / 43.324 / 44.882, mean 43.589, side 1.829, projected 1.2912. Honest caveat: that is only +1.4 % over the combo'stimescreen (44.203) and *level* with the combo'scheckwindows (43.505) — the ~1 s saving is at the edge of this host's 1–2 % run-to-run noise, and the third window (44.882) is an outlier. It is adopted on the strength of the component measurement plus the fact that it cannot cost anything: freezing only removes work from later collections, its one-off cost is at init (outside every timed window), and it is N0. ### The offload dance, fully accounted (new_OffloadClockmarks) ``` sleep : clear_memory 0.152-0.177 print_memory 0.001 destroy_process_groups 1.625-1.720 tms_pause 0.921-1.267 reset_cuda_stack_size 0.001 print_memory2 0.001 wake_up : print_memory 0.001 tms_resume 0.357-0.423 clear_memory 0.057-0.067 reload_process_groups 0.085-0.141 switch_model 0.380-0.427 print_memory2 0.001 ``` So after the GC fix the dance is dominated bydestroy_process_groups~1.7 s andtorch_memory_saver.pause~1.1 s, not by Python GC any more.destroy_process_groupsis *load-bearing*, not waste:_destroy_default_accelerator_process_group(slime/utils/reloadable_process_group.py) destroys WORLD so PyTorch shuts down every NCCL backend and releases all communicator memory, which the engines need when they resume. It cannot simply be skipped. The cheap fix would be to make teardown usencclCommAbortinstead of the blockingncclCommDestroy, but **TORCH_NCCL_ABORT_IN_DESTROY_PGdoes not exist in this torch (2.13.0+cu130)** — checked everytorch/lib/*.so. Callingabort()on the subgroups by hand before destroying WORLD is possible, but a mistake there hangs the job, and the prize is ~1.7 s of 43.5 s (~1.5 % on the step). Not attempted: with a passing 1.2884× submission in hand, risking a hang for that is a bad trade.
7.0 hRound 10 — kernel attribution of the micro-batch loop, and the FlashQLA GDN kernel (05:57 → 06:41)
The loop is 74 % of the train window and my FLOP model had already been wrong twice (GDN projections,host_emptyCache), so this round bought real attribution before touching anything. Experiment tree./tmp/expholds a copy ofslimeplus symlinks to the unchangedsglangandMegatron-LM, so/submissionstayed at the passing 1.3007× state throughout.bench.py timeaccepts--tree /tmp/expand--config <any switches file>, so the experiment carried its own environment and/submission/switches.jsonwas never touched. Instrument.bench.py profile --side trainis unusable here (kineto's chrome-trace export never finishes), so I addedOPD_MODULE_TIMING=<rollout ids|all>:torch.cuda.Eventpairs on forward and full-backward hooks, read back once per step, no trace export. Buckets arelayer,layer.<child>[Class],layer.<child>.<leaf>; the class name is what separates the 24 gated-delta layers from the 8 full-attention ones — both hang off the sameself_attentionattribute. ### Attribution (rank 0, steady step,/tmp/r15/profand/tmp/r15/qla_run) | bucket | fwd | bwd | total | calls | |---|---|---|---|---| |self_attention[Attention]— the 24 GDN layers | 8.21 s | 12.26 s | 20.46 s | 24×63 | |mlp[MLP]| 3.29 s | 5.14 s | 8.43 s | 32×63 | |self_attention[SelfAttention]— the 8 full-attn layers | 2.58 s | 1.95 s | 4.53 s | 8×63 | |embedding| 1.94 s | — | 1.94 s | 63 | |output_layer| 0.41 s | 0.77 s | 1.18 s | 63 | Inside the GDN wrapper:linear_attnfwd 4.63 s,input_layernorm2.84 s, and ~2.8 s of the wrapper's forward is the CP all-gather inhf_attention.py. (linear_attn's own backward span reads ~0 — its full-backward hook fires on outputs, so only the wrapper's backward is trustworthy.) So the replicated GDN is ~60 % of the loop, not the ~30 % the FLOP count suggested. Armed hooks cost ~5 s/step (mean 47.745 vs 42.432 clean), so later runs arm an *untimed* step only. ### Result:OPD_GDN_FLASHQLAREJECTED (/tmp/r15/qla_clean/time.json)fla0.5.2 ships a FlashQLA backend (fla/ops/gated_delta_rule/backends/flash_qla.py,default_enable=True, priority 3) andtilelang0.1.12 was already installed; onlyflash_qlawas missing. Its verifier matches this recipe exactly (SM90, bf16, K=V=128). Installedflash-qla==0.1.3with--no-depsinto/opt/candidate-envonly —bench.json'scandidate_python; the reference interpreter/opt/sglangstill reports it MISSING, and sglang's CUDA GDN path never importsfla, so rollout and teacher are untouched by construction. | run | windows (s) | mean | train side | |---|---|---|---| | current best (passing check) | 41.987 / 43.354 / 41.955 | 42.432 | 1.8781 | | FlashQLA, no hooks | 40.846 / 42.003 / 49.146 | 43.998 | 1.8237 | Slower. Per-stepactor_train: 34.9 / 34.6 / 35.5 / 36.5 / 39.8 / 41.6 — the early steps beat the baseline but the *timed* late steps do not, and one step paid 75.5 s with zero TileLang compiles, i.e. a runtime shape decision (flash_qla/.../cp/autocp/decision.py) that no cache covers. Numerics are equivalent: train/rollout logprob mismatch per step differs by ≤1e-4 (0.00822…0.03035 vs 0.00826…0.03037), so this was a speed rejection, not a correctness one. The switch is committed off, and it is now load-bearing in the other direction: with the package installed,flawould auto-enable FlashQLA, so the plugin pinsFLA_FLASH_QLA=0unless asked.
1.2 hWhy CP head sharding bought nothing (Round 4's puzzle, now explained)
The state scan's grid is(cdiv(V, BV), N * HV)(fla/ops/common/chunk_delta_h.py:710), withBVautotuned from{32, 64}on Hopper. AtBV=32,V=128,HV=32and one sample per bin that is 128 blocks on 132 SMs — a single wave. Halving the heads per rank halves the work *and* halves the block count to 64, which is still one wave, so per-rank wall time barely moves — while adding a full-width CP all-reduce per layer. That is exactly the +0.4 % measured. Below one wave, sharding work across ranks buys nothing; the scan is latency-bound on its sequential chunk loop, not FLOP-bound. Round 11 attacks occupancy instead.
7.6 hRound 11 — bin occupancy, not bin cap (06:44 → 07:18)
Round 6 rejected packing at 16384 (OOM) and concluded packing was a dead end. That conclusion was wrong: it never checked how many samples actually land in a bin.dp_schedule.py's invariant: a bin holds<= max_tokens_per_gpu * cp_sizetokens, **except that a sample larger than the cap lands alone**. Responses average 8135 tokens, so a whole sample is ~8300 tokens with its prompt: |max_tokens_per_gpu| bin cap | samples/bin | micro-batches | verdict | |---|---|---|---|---| | 4096 (stock) | 8192 | 1 (sample > cap!) | 63 | baseline | | 8192 | 16384 | still 1 (2×8300 = 16600 > cap) | 57 | 46.261 s — slower | | 8400 | 16800 | 2 | 32 | 39.063 s — WIN | | 12288 | 24576 | 3 | 21 | OOM | So raising the cap from 4096 to 8192 bought *nothing* — the cap moved but the occupancy did not. 8400 is the first cap that admits two samples, and it halves the micro-batch count. ### Result:OPD_MAX_TOKENS_PER_GPU=8400ADOPTED (/tmp/r16/pack8400/time.json) | | windows (s) | mean | train side | projected step | |---|---|---|---|---| | previous best | 41.987 / 43.354 / 41.955 | 42.432 | 1.8781 | 1.3007 | | + packing 8400 | 39.012 / 39.477 / 38.699 | 39.063 | 2.0397 | 1.3398 |actor_trainper step: 33.8 / 33.1 / 33.8 / 33.1 s. The windows are also tighter than the baseline's (spread 0.8 s vs 1.4 s), because 32 uniform two-sample bins replace 63 ragged ones. Semantics: unchanged, as established in Round 6 —loss.pyscales bynum_microbatches / step_global_batch_size, andget_sum_of_sample_meanderives each sample's CP zigzag split from its owntotal_length, not the bin's. Confirmed empirically: the per-step train/rollout logprob mismatch is identical to the baseline to 5 decimals (0.00826 / 0.00929 / 0.00951 / 0.01191 / 0.01743 / 0.02091 / 0.02705 / 0.03040). Why it pays — and why it is only +8.6 %, not +50 %: atBV=32the scan goes from 128 blocks (one wave) to 256 (two waves), so its wall time per bin *doubles* while the bin count halves — the scan's total is unchanged. The gain comes from everything around it: half the kernel launches, half the CP all-gathers and SP gathers/scatters, half the Python/autograd overhead, and GEMMs at M≈8300 instead of M≈4150. The scan itself is now above one wave, which is what makes rank-side sharding worth revisiting (see below). ### The memory wall is the logits gradient, not the activations 12288 OOM'd atppo_utils.py:925,grad_input = torch.empty_like(logits)— 5.68 GiB, i.e. 12288 tokens × 124160 vocab/TP × fp32._ChunkedLogProbEntropychunks the softmax workspace but still materialises the full logits and its gradient. The failed allocation had 14.03 GiB reserved-but-unallocated, so fragmentation is a real part of the wall. ### Result: 12288 +PYTORCH_CUDA_ALLOC_CONF=expandable_segments:TrueREJECTEDPYTORCH_CUDA_ALLOC_CONFis not inbench.json reserved_env, so it is a legal switch. It does fix the OOM — 29 micro-batches, no allocation failure — but it is slower:/tmp/r16/pack12288eswindows 45.437 / 43.631 / 44.919, mean 44.662 s, train 1.7845×. Per-stepactor_train35.0–38.8 s against 8400's 33.1–33.8 s. The reason is visible in the bin count: cap 24576 admits three ~8300-token samples only when they are short, so most bins still hold two and the count only falls 32 → 29, while the occasional three-sample bin pushes the scan to three waves and the logits gradient to 5.7 GiB. **8400 is the sweet spot**: the smallest cap that reliably doubles occupancy, and the largest that stays at two. ### Next: rank-side head sharding is worth revisiting *at the new occupancy* Round 4'sOPD_GDN_CP_HEADSwas measured at one sample per bin, i.e. below one wave, where it cannot pay. At two samples per bin the scan is at two waves, so halving the heads per rank would bring it back to one. Two things to fix before re-testing: the sharded conv path passedbias=self.conv1d.biasunsharded while slicing the weight rows, which is a genuine bug and a better explanation for the 2 %grad_normerror than bf16 rounding; and the partial-sum combine should ride the existing SP reduce-scatter rather than a new all-reduce.
9.7 hRound 12 — shard the replicated GDN heads over TP (07:50 → 09:19)
Round 4 tried this across CP and got INCORRECT + no speed. Two things changed: the occupancy (Round 11 put the scan above one wave, where halving heads per rank actually shortens it), and the combine, which is where Round 4 lost its precision. ### The design that keeps the forward exact Every per-head operation in the GDN — the projections' rows, the depthwise conv's channels, the chunk scan, the gated RMSNorm (which normalises overhead_v_dim, i.e. *within* a head) — is independent across heads. So a rank computing 16 of the 32 heads produces bit-for-bit what the replicated path produces for those heads. The only place heads meet isout_proj, which reduces over allnum_v_heads * head_v_dimcolumns. Round 4 slicedout_projtoo and summed two bf16 partials with an all-reduce — two extra roundings per layer, compounding over 24 layers, which is what produced its 2 %grad_normerror. This version instead re-gathers the heads along the last dim beforeout_proj(gather_from_tensor_model_parallel_region, whose backward splits), so that GEMM keeps the reference's full-width reduction and its single rounding. The layer output is therefore still replicated and the SP scatter is untouched; only the *input gradient* is partial, and it is summed by switching the SP gather's backward from split to reduce-scatter (tensor_parallel_output_grad). Sharded parameters are markedparam.sequence_parallel = Trueso Megatron'sfinalize_model_gradssums their gradients over TP.out_proj.weightis deliberately excluded: it still runs full-width, its gradient is already replicated, and summing it would double it. The wrapper'sinput_layernorm.weightis included, because its output gradient is the sharded GDN's partial input gradient. ### Result:OPD_GDN_TP_HEADS=1ADOPTED (/tmp/r18/tpheads/check.json, all three sides judged) PASS, tier N1, speedup 1.3749 (against 1.3246 for the same tree without the switch). | | windows (s) | mean | train side | |---|---|---|---| | Round 11 (packing only) | 39.744 / 39.980 / 39.547 | 39.757 | 2.0040 | | + TP head sharding | 35.723 / 33.627 / 34.896 | 34.749 | 2.2943 |actor_trainsteady steps 27.7 / 28.1 / 28.3 / 28.7 s against 33.1–33.8 s. (The first two steps read 32.5 s and 44.2 s — warm-up and a shape compile; judging from those alone would have wrongly rejected this as a ~1 s change.) Numerics, all within tolerance: | endpoint | d | tolerance | |---|---|---| | update_norm | −3.46e-5 | 1.20e-3 | | exp_avg_sq_norm | +1.46e-5 | 4.36e-4 | | loss_mean | +9.13e-6 | 3.75e-5 | | grad_norm_first | +4.77e-6 | 1.65e-3 | | update_direction_cos | 0.96142 | min 0.95660 |grad_norm_firstis 4600× tighter than Round 4's 0.0219 — the exact-forward design did what it was meant to do. Butupdate_direction_cosis the one to watch: 0.96142 against a 0.95660 floor is a 0.005 margin, where the unsharded path sits at 0.99338. The residual cost is the bf16 reduce-scatter of the input gradient, which is inherent to splitting that reduction./tmp/r19/finalis a confirming full check on the promoted tree, which also gives a second sample of that cosine.