Hy4 1.31×
Harness: Codex · switches: none
- Judged
- 1.31×
- Tier
- N1
- Self-best
- 1.37×
- Rounds
- 23
- Hours
- 10.0
- API cost
- $6.79
- Input tokens · 94.1% cached
- 64 M
- Output tokens
- 0.4 M
- Requests
- 486
§ 02Key levers
- Sequence packing
- ✗ not done; instead tried sorting each step into a long and a short micro-batch by token length (check failed, then OOM), dropped
- Recompute / activations
- partial:
LLAVA_FAST_GC_PERIOD=2, 16 of the 32 decoder layers skip recompute (1.175 → 1.2117×); no recompute at all OOMed - Optimizer
- ✗ optimizer untouched, no fused or Triton AdamW in the log
- Communication & libraries
- ✓ round 5 late switch to ZeRO-2 (
LLAVA_FAST_ZERO_STAGE=2+LLAVA_FAST_ZERO_LATE=1), drops the per-layer param all-gather, 1.0534 → 1.1036×; buckets tuned; cuBLAS 12.8.5.5, 1.298 → 1.3369×; no FA3 - Other main levers
- round 15
LLAVA_FAST_SKIP_LOSS_ITEMdrops the per-steploss.mean().item()host sync, 1.2117 → 1.292× (largest single gain); Liger fused RMSNorm, 1.1231 → 1.175×, peak memory −22.14 GiB; cached flash-attn unpadding metadata (~+0.2%)
§ ARaw trace
Raw work log23 sections
0.0 hRound 1 (baseline profile)
- Start (UTC): 2026-11-18T22:21:59Z
- Tree: unchanged upstream c121f04
- Switch file: /submission/switches.json = {"environment": {}}
- Action: required baseline profile before code changes.
- Profile PID: 21909; log: /tmp/r1/profile.log; output: /tmp/r1/profile
- Profile: /tmp/r1/profile/profile_tree.md; rank 0 GPU kernel time 2625 ms/step.
- Top GPU kernels: bf16 GEMMs across five cuBLAS kernels total ~50.5%; NCCL AllGather 8.5% and ReduceScatter 3.0%; elementwise/copy kernels ~15%.
- CPU inclusive: CheckpointFunctionBackward 1631 ms, CheckpointFunction 682 ms; aten::nonzero 710 ms over 112 calls and aten::item 33 ms over 165 calls (flash-attn _get_unpad_data).
- Classification: checkpointing is a configuration/recomputation bottleneck; repeated unpadding is a host-sync/backend bottleneck. Round 1 targets only recomputation.
- Change: switchable selective gradient checkpointing via LLAVA_FAST_GC_PERIOD; default 1 is the upstream path.
- Time (GC period 0) PID: 22650; log: /tmp/r1/time_gc0.log; output: /tmp/r1/time_gc0
- time (GC period 0): /tmp/r1/time_gc0; status ERROR (CUDA OOM at 139.7 GiB in MLP down_proj); no speedup. Full recompute removal is not viable.
- Next: screen selective checkpoint periods 2/4/8, keeping the same optimizer-step samples.
- sweep: selective periods 4/6/8/12, one timing run each between two reference runs; output /tmp/r1/sweep_gc.
- Sweep PID: 23275; log: /tmp/r1/sweep_gc.log
- sweep periods 4/6/8/12: all ERROR (OOM at 139.6–139.7 GiB with 5.7–6.6 GiB reserved/unallocated); reference mean 2743.1 ms/step, spread 0.0052. Recompute removal must be much denser or allocator fragmentation must be addressed.
- Next screen: periods 2/3 and period 0 with PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True.
- Sweep 2 PID: 26605; log: /tmp/r1/sweep_gc2.log; output: /tmp/r1/sweep_gc2
- sweep periods 2/3 plus period 0 with expandable segments: all ERROR (OOM); reference mean 2740.9 ms/step, spread 0.0009. Expandable segments reduced fragmentation but full no-GC still needs ~137 GiB allocated.
- Direction: keep upstream checkpointing for most layers; uncheckpoint only every Nth layer. Need ~8–11 uncheckpointed layers rather than 16–28.
- Round 1 end (UTC): 2026-11-18T22:46:25Z. Conclusion: disabling or sparsifying activation recomputation is memory-bound on this 2×Hopper setup; no gain.
- Current summary: switch file /submission/switches.json remains {"environment": {}}; no full check run yet; best measured tree is upstream behavior (default switch off); all no/sparse-GC directions OOM.0.4 hRound 2 (dense selective checkpointing)
- Start (UTC): 2026-11-18T22:47:00Z. Uses round 1 baseline profile (no accepted change yet). - Change: reversed period semantics so only layers whose index is divisible by the period are uncheckpointed. - Screen: period 2/3 with expandable segments, period 3/4/6 without. - Sweep PID: 29378; log: /tmp/r2/sweep_rev.log; output: /tmp/r2/sweep_rev -sweepreversed periods:/tmp/r2/sweep_rev/sweep.json; reference mean 2763.8 ms/step, spread 0.0123. - period 2/3 (± expandable segments): ERROR (OOM); period 6: ok 2681.0 ms, speedup 1.0287, memory 108.54 GiB; period 4: ok 2608.7 ms, speedup_vs_frozen_reference 1.0572, speedup_vs_reference 1.0594, window spread 0.0041, memory 120.14 GiB. - Best switch:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4"}}. - Formal time (period 4) PID: 33255; log: /tmp/r2/time_rev4.log; output: /tmp/r2/time_rev4 -time(period 4):/tmp/r2/time_rev4; status ok, 2602.4 ms/step,speedup_vs_frozen_reference1.0598, beyond reference noise, window spread 0.0075, peak memory 120.14 GiB. - Full check (period 4) PID: 33866; log: /tmp/r2/check_rev4.log; output: /tmp/r2/check_rev4 - Full check (period 4):/tmp/r2/check_rev4/check.json; status PASS, speedup 1.0534, measured tier N0, bitwise 4724/4724, trajectory endpoints within 3σ. Timing windows 26.346 s / 26.016 s; peak allocated 120.14 GiB. - Round 2 end (UTC): 2026-11-18T23:12:59Z; accepted change: dense selective checkpointing (period 4), N0. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4"}}. - Latest full check:/tmp/r2/check_rev4/check.json, PASS, speedup 1.0534, N0. - Gain breakdown: +5.34% from checkpointing 24/32 layers and leaving 8 uncheckpointed; no other accepted gains. - Failed directions: full no-GC and sparse checkpointing (periods 0/2/3/4/6/8/12 in the original semantics) OOM at 136–140 GiB; expandable segments alone did not make period 0/2/3 viable. - Next: profile period-4 tree and target repeated flash-attn unpadding metadata / communication.
0.9 hRound 3 (fast flash-attn unpadding metadata)
- Start (UTC): 2026-11-18T23:13:30Z. Profile first on the accepted period-4 tree. - Profile PID: 36240; log: /tmp/r3/profile.log; output: /tmp/r3/profile - Profile:/tmp/r3/profile/profile_tree.md; rank 0 GPU kernel time 2589 ms/step. - Top GPU: bf16 GEMMs ~47.8%; NCCL AllGather 9.9%, ReduceScatter 6.0%; elementwise/copy ~15%. - CPU inclusive:CheckpointFunctionBackward1217 ms;aten::nonzero583 ms;aten::item34 ms; c10d allgather/reduce-scatter CPU ops 50/29 ms. - Classification: repeated_get_unpad_datais a host-sync/backend bottleneck; ZeRO-3 communication is a separate later hotspot. Round 3 targets only the unpadding metadata. - Change:LLAVA_FAST_UNPAD=1caches right-padding indices/cu-seqlens/max-length per mask and reconstructs indices without per-layernonzero; default off. CPU index tests passed. - Combined time + quick PID: 36755; log: /tmp/r3/combined.log; outputs: /tmp/r3/time_combined, /tmp/r3/quick_combined -time(period 4 + fast unpad):/tmp/r3/time_combined; ok 2597.1 ms/step,speedup_vs_frozen_reference1.062, beyond frozen-reference noise, window spread 0.015. -check --quick(period 4 + fast unpad):/tmp/r3/quick_combined/check.json; PASS, measured tier N0, bitwise 4724/4724, no exact failures. - Round 3 end (UTC): 2026-11-18T23:23:20Z; conclusion: unpadding metadata cache is exact (N0) but only ~0.2% faster than the period-4 baseline, inside run-to-run noise. Default remains off; no clear gain accepted. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4"}}(latest full check PASS 1.0534, N0). - Latest full check:/tmp/r2/check_rev4/check.json; no newer full check. - Gain breakdown: +5.34% from dense selective checkpointing; unpadding cache +0.2% (not clearly resolvable). - Failed directions: full/sparse GC OOM; unpadding cache did not give a resolvable gain; ZeRO-3 communication remains (AllGather 9.9%, ReduceScatter 6.0%). - Next: profile combined path and try ZeRO-2 to remove parameter allgathers.
1.1 hRound 4 (ZeRO-2 communication)
- Start (UTC): 2026-11-18T23:24:00Z. Profile the combined period-4 + fast-unpad path first. - Profile PID: 38794 (retry after creating /tmp/r4); log: /tmp/r4/profile.log; output: /tmp/r4/profile - Profile (combined path):/tmp/r4/profile/profile_tree.md; rank 0 GPU kernel time 2418 ms/step. Top GEMMs ~50.7%; NCCL AllGather 7.4%, ReduceScatter 3.0%;aten::nonzero3 ms over 48 calls;aten::item257 ms dominated by one 240 ms DeepSpeed loss-scale sync. - Classification: ZeRO-3 parameter allgather/gradient communication is a configuration/backend bottleneck. Round 4 targets it with stage 2 while retaining fp32 master weights and Adam state. - Change:LLAVA_FAST_ZERO_STAGE=2patches HF's DeepSpeed config in memory to stage 2 and removes stage-3-only keys;LLAVA_FAST_ZERO_BUCKETcan set reduce/allgather buckets. Default stage 3 unchanged. CPU config patch check passed. - ZeRO-2 sweep PID: 39317; log: /tmp/r4/sweep_z2.log; output: /tmp/r4/sweep_z2 -sweepZeRO-2:/tmp/r4/sweep_z2/sweep.json; all four runs were ~1.09–1.11× faster but ERROR: first logged loss 1.3758 vs frozen 1.3839 (0.00585 > 0.005). Data probes matched the reference partition, so this is a forward/initialization mismatch, not a data reassignment. Peak memory 106.66–118.26 GiB. - Next:check --quickon stage 2 to identify exact-item or tensor differences before deciding whether the initialization can be corrected. - Quick stage2 PID: 42733; log: /tmp/r4/quick_z2.log; output: /tmp/r4/quick_z2 -check --quickstage 2:/tmp/r4/quick_z2/check.json; PASS exact items, N1/NOT_BITWISE (2272 tensors beyond diagnostic tolerances), no exact failures, no dtype/precision changes. - Round 4 end (UTC): 2026-11-18T23:46:18Z; rejected. ZeRO-2 is ~1.11× but its first logged loss violates gate 1; quick numerics are N1, not a data-partition effect. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4"}}. - Latest full check remains/tmp/r2/check_rev4/check.json, PASS 1.0534, N0. - Gain breakdown: dense selective checkpointing +5.34%; fast unpadding +0.2% (not clearly resolvable); ZeRO-2 +5.7% over the accepted baseline but rejected by first-loss sanity. - Failed directions: full/sparse GC OOM; ZeRO-2 early-stage config changes initial forward loss by 0.585%; buckets/expandable segments do not fix that. - Next: keep stage-3 configuration during model construction, switch only the DeepSpeed engine to stage 2.
1.4 hRound 5 (late ZeRO-2 switch)
- Start (UTC): 2026-11-18T23:47:00Z. Reuses/tmp/r4/profile(no accepted change since that profile). - Late stage2 time PID: 44210 (retry after creating /tmp/r5); log: /tmp/r5/time_z2_late.log; output: /tmp/r5/time_z2_late -timelate stage2 (config switch atdeepspeed.initialize):/tmp/r5/time_z2_late; ERROR. CLIPpatch_embeddingconv weight remained a 0-D ZeRO-3 partition (weight should have at least three dimensions), provingzero.Initparameters must be materialized before a stage-2 engine. - Materialized stage2 sweep PID: 44921; log: /tmp/r5/sweep_z2_materialize.log; output: /tmp/r5/sweep_z2_materialize -sweepmaterialized late stage2:/tmp/r5/sweep_z2_materialize/sweep.json; reference mean 2748.7 ms/step, spread 0.0005. - Plain allocator: ok 2510.8 ms,speedup_vs_frozen_reference1.0984, window spread 0.0057, peak memory 118.26 GiB. - Expandable segments: ok 2505.0 ms,speedup_vs_frozen_reference1.101,speedup_vs_reference1.0973, window spread 0.0025, peak memory 118.26 GiB. - Both passed gate-1 loss sanity (first logged loss unchanged), so preserving stage-3 initialization fixes the prior rejection. - Round 5 end (UTC): 2026-11-18T23:59:27Z; best experimental switch:/tmp/r5/z2_materialize_exp.json. - Current summary: - Submission switch remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4"}}until a full check passes the stage-2 candidate. - Latest full check remains/tmp/r2/check_rev4/check.json, PASS 1.0534, N0. - Experimental gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 adds ~4.7% on top (1.101 total); unpadding cache ~0.2%. - Failed directions: full/sparse GC OOM; early stage2 changes first loss by 0.585%; late stage2 without parameter materialization leaves 0-D CLIP conv weights. - Next: quick + full check on expandable-segments materialized stage-2. - Quick + full check PID: 47183; log: /tmp/r5/check_materialize.log; outputs: /tmp/r5/quick_materialize, /tmp/r5/check_materialize -check --quickmaterialized stage2:/tmp/r5/quick_materialize/check.json; PASS exact items, N1/NOT_BITWISE, no exact failures, no dtype/precision changes. - Full check:/tmp/r5/check_materialize/check.json; status PASS, speedup 1.1036, measured tier N1; trajectory endpoints within 3σ (train -0.135σ, probe -0.211σ); bitwise 1912/4724; no exact failures. - Round 5 end (UTC): 2026-11-19T00:15:46Z; accepted change: materialized late ZeRO-2 with expandable segments, N1. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check:/tmp/r5/check_materialize/check.json, PASS, speedup 1.1036, N1. - Gain breakdown: dense selective checkpointing +5.34%; materialized late ZeRO-2 adds ~4.8% on top; fast unpadding is N0 and included (small/no independently resolvable gain). - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialization leaves 0-D CLIP conv weights; buckets alone did not fix first loss. - Next: profile the accepted stage-2 tree and tune the remaining recomputation/communication hotspot.
1.9 hRound 6 (profile accepted stage-2 tree)
- Start (UTC): 2026-11-19T00:16:30Z; profile first with promoted switch file. - Profile PID: 50910; log: /tmp/r6/profile.log; output: /tmp/r6/profile - Profile:/tmp/r6/profile/profile_tree.md; rank 0 GPU kernel time 2238 ms/step. - Top GPU: bf16 GEMMs across six cuBLAS kernels ~53.9%; NCCL bf16 AllReduce 4.1% and AllGather 1.0%; elementwise/copy kernels ~15%; flash attention forward/backward ~2.9%. - CPU inclusive:CheckpointFunctionBackward890 ms;aten::item346 ms (DeepSpeed loss-scale host sync);aten::mul/matmul/mm228/214/207 ms;CheckpointFunction166 ms; c10d allreduce CPU 27 ms. - Classification: recomputation remains the largest controllable CPU/backward stage after GEMMs; communication is a smaller secondary hotspot. Round 6 targets only denser selective checkpointing under the accepted stage-2 memory profile. - Screen:LLAVA_FAST_GC_PERIOD3 and 2 with the accepted late-ZeRO-2, fast-unpad and expandable-segments switches. - False start: the first sweep was killed immediately because the temporary config files were not created; no timing was produced. - Sweep PID: 51631; log: /tmp/r6/sweep_gc2.log; output: /tmp/r6/sweep_gc2. -sweepperiods 3/2:/tmp/r6/sweep_gc2/sweep.json; paired reference mean 2751.1 ms/step, spread 0.0066. - Period 3: ok 2454.1 ms/step,speedup_vs_frozen_reference1.1238,speedup_vs_reference1.121, window spread 0.0135, peak memory 135.66 GiB, no gate-1 problems. - Period 2: ERROR (CUDA OOM at 136.16 GiB allocated); no speedup. - Formaltime+check --quickon period 3 (submission switch remains period 4 until full check passes). - Time+quick PID: 53921; log: /tmp/r6/time_quick_gc3.log; outputs: /tmp/r6/time_gc3, /tmp/r6/quick_gc3. -timeperiod 3:/tmp/r6/time_gc3/time_tree.json; ok 2514.9 ms/step,speedup_vs_frozen_reference1.0967, beyond reference noise, peak memory 135.66 GiB. - Windows 26.200 s / 24.099 s;window_spread0.0644 > 0.06, reported as interference in ourtime(final check would reject a noisy run). Power/utilization was lower in window 0 (649/642 W, ~95% util) than window 1 (677/660 W, ~99% util); CPU busy was only 2.15 cores in the windows. -check --quickperiod 3:/tmp/r6/quick_gc3/check.json; PASS, measured tier N1, 2000/4724 bitwise, no exact failures, no dtype/precision changes. Partition still matches the reference; N1 comes from the accepted stage-2 change. - Round 6 end (UTC): 2026-11-19T00:39:00Z. Conclusion: denser period-3 checkpointing is ~1.8% faster than the accepted period-4 full check in the paired sweep and passes gate 2, but the standalonetimewindows were noisy; promote only if a full check confirms it. No source change (existing switch); commit not needed. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "4", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check remains/tmp/r5/check_materialize/check.json, PASS 1.1036, N1. - Experimental gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%; period-3 adds ~1.8% in the paired sweep (pending full check). - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM at 136.16 GiB; period-3 standalone timing had a 0.0644 window spread. - Next: full check period 3 with config/tmp/r6/gc3.json; then investigate stable-window allocator/communication tuning or padding reduction. - Full check period 3: output/tmp/r6/check_gc3; config/tmp/r6/gc3.json; keeping submission switch at accepted period 4 until the check passes. - Full check PID: 55976; log: /tmp/r6/check_gc3.log. - Full check period 3:/tmp/r6/check_gc3/check.json; status PASS, speedup 1.108, candidate 2489.1 ms/step, measured tier N1. Candidate windows 25.499 s / 24.283 s, spread 0.0297 (<0.06); both trajectory endpoints within 3σ (-0.116σ train, -0.044σ probe); no exact failures. - Accepted change: promoteLLAVA_FAST_GC_PERIOD=3in/submission/switches.json(switch-only, no source commit); N1. Gain over the previous accepted full check is +0.4% (1.108 vs 1.1036). - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check:/tmp/r6/check_gc3/check.json, PASS 1.108, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%; period-3 adds +0.4% over the period-4 accepted full check (paired sweep suggested ~1.8% but full check is the verdict). - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; period-3 standalonetimehad one noisy 0.0644 window spread (full check was stable). - Next: profile the accepted period-3 tree and target the remaining host-sync/communication or padding hotspot.
2.5 hRound 7 (profile accepted period-3 tree)
- Start (UTC): 2026-11-19T00:51:30Z; profile first with promoted period-3 switch file. - Profile PID: 58333; log: /tmp/r7/profile.log; output: /tmp/r7/profile. - Profile:/tmp/r7/profile/profile_tree.md; rank 0 GPU kernel time 2201 ms/step. - Top GPU: bf16 GEMMs ~54.3%; NCCL bf16 AllReduce 3.9% and AllGather 1.0%; elementwise/copy kernels ~15%; flash attention forward/backward ~2.9%. - CPU inclusive:CheckpointFunctionBackward801 ms;aten::item/_local_scalar_dense347 ms;aten::matmul/mm262/255 ms;CheckpointFunction147 ms; c10d allreduce CPU 29 ms. - Call-stack attribution: the 323 msaten::itemisdeepspeed.runtime.engine.DeepSpeedEngine.backward'sself.losses += loss.mean().item();self.lossesis only used by the disabled monitor and is reset instep(). Classification: launch/host sync; round 7 targets only this sync. - Change:LLAVA_FAST_SKIP_LOSS_ITEM=1rewrites the original decoratedDeepSpeedEngine.backwardclosure to skip the.item()when DeepSpeed monitoring is disabled, preserving the monitored path. Default off. CPU import test confirms the installed method has the conditional. - Failed implementation detail: rewriting source from the NVTX wrapper did not patch the inner function; fixed by sourcing the wrapper closure's originalbackward. - Formaltime+check --quickwith config/tmp/r7/skip_item.json; submission switch remains period 3 with the new code default-off until a full check passes. - Time+quick PID: 59171; log: /tmp/r7/time_quick_skip_item.log; outputs: /tmp/r7/time_skip_item, /tmp/r7/quick_skip_item. -timeskip-item:/tmp/r7/time_skip_item/time_tree.json; ok 2462.0 ms/step,speedup_vs_frozen_reference1.1202, beyond reference noise,window_spread0.0, windows 24.856 s / 24.384 s, peak memory 135.66 GiB, no problems. -check --quickskip-item:/tmp/r7/quick_skip_item/check.json; PASS, measured tier N1 (stage-2 baseline), 2008/4724 bitwise, no exact failures, no dtype/precision changes. The patch itself is N0 relative to the accepted tree. - Commit:Skip DeepSpeed loss item host sync (N0 relative to accepted tree; overall N1; time: 1.1202x). - Full check skip-item: output/tmp/r7/check_skip_item; config/tmp/r7/skip_item.json; submission switch remains period 3 with default-off code until the check passes. - Full check PID: 61199; log: /tmp/r7/check_skip_item.log. - Full check skip-item:/tmp/r7/check_skip_item/check.json; status PASS but speedup 1.0705 (candidate 2576.3 ms/step), windows 25.113 s / 26.411 s, spread 0.0695 (>0.06), trajectory endpoints within 3σ. This is slower and noisier than the accepted period-3 full check (1.108), so the switch is not promoted. - Round 7 end (UTC): 2026-11-19T01:21:00Z. Conclusion: skipping DeepSpeed's loss.item()removes the 323 ms host sync and passed a standalonetimeat 1.1202 with 0.0 window spread, but the full check did not reproduce the gain; rejected with the switch kept off. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check remains/tmp/r6/check_gc3/check.json, PASS 1.108, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%; skip-item full check 1.0705 rejected. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; period-3 standalonetimehad one noisy 0.0644 window spread; skip-item full check slower/noisy. - Next: padding reduction by within-step token-length regrouping.
3.0 hRound 8 (within-step token-length regrouping)
- Start (UTC): 2026-11-19T01:21:30Z; reuses/tmp/r7/profile/profile_tree.md(no accepted change since that profile). - Profile findings: GEMMs ~54.3%; LLM GEMM shapes[16, 1113, 4096]and flattened[17808, 4096], while the first 8 optimizer steps have only ~4–5k valid tokens per 16-row microbatch. Offline tokenization of the fixture gives expanded lengths with median 758 and 99th percentile 1610; sorting each 32-sample step by expanded token length and splitting into 16-long/16-short microbatches reduces padded tokens by 14.8–19.9% on the first 8 steps. - Classification: compute/padding GEMM waste. Round 8 targets only within-step assignment; upstream step composition, microbatch sizes and loss normalization stay unchanged. - Change:LLAVA_FAST_TOKEN_LENGTH_GROUP=1computes signed post-expansion token lengths from the tokenizer and preprocessing, wraps the upstreamLengthGroupedSampler, and sorts each 32-sample optimizer step by absolute token length before splitting it into two 16-row microbatches. Installed onllava_trainerimport (not justtrain_mem.py) so the CPU data probe, timing, bitwise and trajectory runs use the same path. Default off. - CPUbench/loader_probe.pywith the switch:/tmp/r8/loader_candidate.json; all 8 steps PASS for global sample multiset, token count, label count and 16/16 microbatch sizes; every step's microbatch digests changed as intended. -check --quick+timewith config/tmp/r8/token_group.json; submission switch remains the accepted period-3 config. - Quick+time PID: 64124; log: /tmp/r8/quick_time_token_group.log; outputs: /tmp/r8/quick_token_group, /tmp/r8/time_token_group. -check --quicktoken-group v1:/tmp/r8/quick_token_group/check.json; INCORRECT with 8 exact failures (rng_afterandbatch/step/samples/tokens/labels) in the gate-2 distributed cases. Cause: Accelerate setsgeneratoron the sampler object it receives; the wrapper copiedgenerator=Nonebefore sharding and its inner sampler kept using global RNG, so the case step composition changed. No numerical/dtype failure. -timetoken-group v1:/tmp/r8/time_token_group/time_tree.json; ERROR, no speedup (invalid candidate). - Fix: patchLengthGroupedSampler.__iter__directly and attach token lengths to the original sampler object, preserving Accelerate's distributed generator and class behavior. - CPU data probe v2:/tmp/r8/loader_candidate_v2.json; all 8 steps PASS again after preserving the original sampler class/generator. -check --quick+timev2 with config/tmp/r8/token_group.json; submission switch remains accepted period-3 config. - Quick+time v2 PID: 66427; log: /tmp/r8/quick_time_token_group_v2.log; outputs: /tmp/r8/quick_token_group_v2, /tmp/r8/time_token_group_v2. -check --quicktoken-group v2:/tmp/r8/quick_token_group_v2/check.json; PASS, measured tier N1, no exact failures, no dtype/precision changes; 32/4724 bitwise (repartitioned). -timetoken-group v2:/tmp/r8/time_token_group_v2/time_tree.json; ERROR (CUDA OOM at step 10 in cross entropy, 134.90 GiB allocated). Sorting all long samples into one microbatch raises that rank's activation peak under period-3 checkpointing. - Round 8 end (UTC): 2026-11-19T01:46:30Z. Conclusion: within-step token-length regrouping preserves all exact data invariants and passes gate 2, but OOMs with the accepted period-3 memory setting; rejected with switch off. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check remains/tmp/r6/check_gc3/check.json, PASS 1.108, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%; token-group and skip-item rejected. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group v1 wrapper broke distributed RNG; token-group v2 OOM with period-3 checkpointing. - Next: screen denser checkpointing (lower memory) or allocator settings with token-group regrouping.
3.4 hRound 9 (memory headroom for token-length regrouping)
- Start (UTC): 2026-11-19T01:47:00Z; reuses/tmp/r7/profile/profile_tree.md(no accepted change since that profile). - Round 9 targets the same padding/GEMM hotspot with memory headroom:LLAVA_FAST_GC_PERIOD4/5/6 and an allocator split-size variant, all with token-length regrouping enabled. - Sweep PID: 68478; log: /tmp/r9/sweep_token_gc.log; output: /tmp/r9/sweep_token_gc. - Round 9 end (UTC): 2026-11-19T02:01:30Z.sweeptoken-group with GC periods 4/5/6 and a split-size allocator:/tmp/r9/sweep_token_gc/sweep.json; paired reference 2748.2 ms/step, spread 0.0004. - Period 4: ok 2593.5 ms,speedup_vs_frozen_reference1.0634, window spread 0.005, peak 120.43 GiB. - Period 5: ok 2600.9 ms, 1.0604, window spread 0.0112, peak 114.36 GiB. - Period 6: ok 2615.1 ms, 1.0546, window spread 0.0172, peak 108.29 GiB. - Period 3 +max_split_size_mb:512: ERROR (expandable_segmentinternal assert). - Offline analysis: replacing sorted halves with token-balancedsplit_to_even_chunksgives 0.0% or -0.5% padded-token savings on the first 8 steps, so balanced regrouping cannot help. Conclusion: sorting long samples into one rank unbalances the 2-GPU step and is slower than the accepted 1.108 tree; abandon token-length regrouping. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check remains/tmp/r6/check_gc3/check.json, PASS 1.108, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%; skip-item and token-length regrouping rejected. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group v1 distributed RNG mismatch, v2 OOM, lower-GC variants slower;max_split_size_mbassert. - Next: communication bucket tuning or a fused cross-entropy/RMSNorm kernel.
3.7 hRound 10 (DeepSpeed communication buckets)
- Start (UTC): 2026-11-19T02:02:00Z; reuses/tmp/r7/profile/profile_tree.md(no accepted change since that profile). - Profile findings: NCCL bf16 AllReduce 3.9%, AllGather 1.0%, c10d allreduce CPU 29 ms; GEMMs remain ~54%. DeepSpeed's stage-2 defaults arereduce_bucket_size=5e8andallgather_bucket_size=5e9, while HF'sautofills reduce buckets to hidden_size² = 16.8e6. Round 10 targets only bucket sizing/communication overlap withLLAVA_FAST_ZERO_BUCKET. - Sweep PID: 71937; log: /tmp/r10/sweep_buckets.log; output: /tmp/r10/sweep_buckets; configs: bucket_0 (control), 50m, 100m, 200m, 500m, 1b. -sweepbucket sizes:/tmp/r10/sweep_buckets/sweep.json; paired reference 2745.9 ms/step, spread 0.0014. - Control bucket 0: ok 2481.2 ms, 1.1116, window spread 0.0384, peak 135.66 GiB. - 50m: 2476.1 ms, 1.1138, spread 0.0157, peak 135.66 GiB. - 100m: 2445.8 ms, 1.1277, spread 0.0200, peak 135.79 GiB. - 200m: 2484.5 ms, 1.1101, spread 0.0500, peak 136.17 GiB. - 500m: 2435.7 ms,speedup_vs_frozen_reference1.1323,speedup_vs_reference1.1274, spread 0.0110, peak 137.28 GiB. - 1b: ERROR (CUDA OOM at 135.40 GiB allocated). - Formaltime+check --quickon bucket 500m; submission switch remains the accepted period-3 config until a full check passes. - Time+quick PID: 76366; log: /tmp/r10/time_quick_bucket_500m.log; outputs: /tmp/r10/time_bucket_500m, /tmp/r10/quick_bucket_500m. -timebucket 500m:/tmp/r10/time_bucket_500m/time_tree.json; ok 2480.2 ms/step,speedup_vs_frozen_reference1.112, window spread 0.0221, peak 137.28 GiB. -check --quickbucket 500m:/tmp/r10/quick_bucket_500m/check.json; PASS, measured tier N1, no exact failures, no dtype/precision changes. - Formaltimeon lower-memory bucket 100m; no source change. - Time PID: 78395; log: /tmp/r10/time_bucket_100m.log; output: /tmp/r10/time_bucket_100m. -timebucket 100m:/tmp/r10/time_bucket_100m/time_tree.json; ok 2498.2 ms/step,speedup_vs_frozen_reference1.104, window spread 0.0672 (>0.06, interference), peak 135.79 GiB. Rejected against 500m. - Full check bucket 500m: output/tmp/r10/check_bucket_500m; config/tmp/r10/bucket_500m.json; submission switch remains accepted period-3 config until it passes. - Full check PID: 79008; log: /tmp/r10/check_bucket_500m.log. - Full check bucket 500m:/tmp/r10/check_bucket_500m/check.json; ERROR. Candidate timing 2470.8 ms/step (1.1162×), gate 2 N1/no exact failures, but gate 3 trajectory seed 0 OOMed at step 10 with 134.22 GiB allocated (traj_s0.log). Peak 137.28 GiB is too close to the 139.8 GiB limit for the prolonged trajectory. - Round 10 end (UTC): 2026-11-19T02:37:30Z. Conclusion: 500m bucket is faster in short timing but fails gate 3 OOM; 100m is slower/noisy; keep accepted period-3 no-bucket config. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check remains/tmp/r6/check_gc3/check.json, PASS 1.108, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%; skip-item, token-length regrouping and bucket 500m rejected. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM. - Next: screen smaller buckets plus period-4 memory headroom, then fused cross-entropy/RMSNorm kernels.
4.3 hRound 11 (gate-3-safe communication buckets)
- Start (UTC): 2026-11-19T02:38:00Z; reuses/tmp/r7/profile/profile_tree.md(no accepted change since that profile). - Classification: communication bucket sizing with memory headroom. Round 11 screens period-3 buckets 25m/50m/75m and period-4 buckets 100m/500m; all keep the accepted data/optimizer path. - Sweep PID: 81368; log: /tmp/r11/sweep_safe_buckets.log; output: /tmp/r11/sweep_safe_buckets. -sweepsafe buckets:/tmp/r11/sweep_safe_buckets/sweep.json; paired reference 2751.6 ms/step, spread 0.0024. - p3/25m: 2468.1 ms, 1.1175, spread 0.0192, peak 135.66 GiB. - p3/50m: 2456.6 ms,speedup_vs_frozen_reference1.1227, spread 0.0249, peak 135.66 GiB. - p3/75m: 2473.6 ms, 1.1150, spread 0.0068, peak 135.70 GiB. - p4/100m: 2486.8 ms, 1.1091, spread 0.0003, peak 118.39 GiB. - p4/500m: 2464.5 ms, 1.1191, spread 0.0058, peak 119.88 GiB. - Formaltime+check --quickon p3/50m; submission switch remains accepted period-3 no-bucket config until a full check passes. - Time+quick PID: 85257; log: /tmp/r11/time_quick_p3_b50.log; outputs: /tmp/r11/time_p3_b50, /tmp/r11/quick_p3_b50. -timep3/50m:/tmp/r11/time_p3_b50/time_tree.json; ok 2455.9 ms/step,speedup_vs_frozen_reference1.123, window spread 0.0226, peak 135.66 GiB, no problems. -check --quickp3/50m:/tmp/r11/quick_p3_b50/check.json; PASS, measured tier N1, no exact failures, no dtype/precision changes. - Full check p3/50m: output/tmp/r11/check_p3_b50; config/tmp/r11/p3_b50.json; submission switch remains accepted period-3 no-bucket config until it passes. - Full check PID: 87281; log: /tmp/r11/check_p3_b50.log. - Full check p3/50m:/tmp/r11/check_p3_b50/check.json; status PASS, speedup 1.1231, candidate 2455.7 ms/step, measured tier N1. Candidate windows 25.041 s / 24.074 s, spread 0.0203 (<0.06); trajectory endpoints within 3σ (-0.068σ train, -0.614σ probe); no exact failures. - Accepted change: promoteLLAVA_FAST_ZERO_BUCKET=50000000in/submission/switches.json(switch-only, no source commit); N1. Gain over the previous accepted full check is +1.36% (1.1231 vs 1.108). - Round 11 end (UTC): 2026-11-19T03:11:30Z. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "50000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest full check:/tmp/r11/check_p3_b50/check.json, PASS 1.1231, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%; skip-item, token-length regrouping and bucket 500m rejected. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m. - Next: profile the accepted bucket-50m tree and investigate fused cross-entropy/RMSNorm kernels.
4.8 hRound 12 (fused kernels)
- Start (UTC): 2026-11-19T03:12:00Z; profile first with the promoted bucket-50m switch file. - Profile PID: 89623; log: /tmp/r12/profile.log; output: /tmp/r12/profile. - Profile findings (/tmp/r12/profile/profile_tree.md): rank-0 GPU kernel time 2168 ms/step; bf16 GEMMs ~54% (412.7 + 330.6 + 182.3 + 141.5 + 104.3 ms), elementwise/copy ~15%, NCCL AllReduce 70.7 ms (3.3%), AllGather 25.9 ms (1.2%), flash fwd/bwd 24.5/42.3 ms. CPU-inclusive hotspots:CheckpointFunctionBackward783 ms,aten::matmul486 ms,aten::mm480 ms,aten::item350 ms,LinearFunctionForZeroStage3Backward354 ms,CheckpointFunction147 ms, thenpow/mul/copy_chains. - Chosen bottleneck class: memory-bound elementwise/norm kernels; one fused-kernel class this round, RMSNorm. Fused/chunked cross-entropy is deferred. -flash_attn.ops.rms_normcannot be imported:ModuleNotFoundError: No module named 'dropout_layer_norm'.flash_attn.ops.triton.layer_normhas its own Triton RMSNorm but Liger's Llama-compatible fused forward/backward is a cleaner substitution. - Liger wheel inspection:liger-kernel==0.5.10and0.8.5downloaded separately to/tmp/r12/liger-0510and/tmp/r12/liger-085. Both declaretorch>=2.1.2,triton>=2.3.1; the 0.5.10 wheel is 163 KiB and containsops/rms_norm.py,ops/fused_linear_cross_entropy.pyandtransformers/rms_norm.py. The priorResolutionImpossiblecame from requesting two versions in one command. The earlierunzipinspection also failed becauseunzipis absent; Pythonzipfileworks. - Runtime compatibility check: environment has torch 2.1.2+cu121, triton 2.1.0, transformers 4.37.2;triton.language.math.rsqrtexists in 2.1.0, so a--no-depsinstall of Liger 0.5.10 can be used without upgrading Triton. - Implemented default-offLLAVA_FAST_RMSNORMinllava/train/fast_rmsnorm.py, wired fromtrain_mem.py; patchesLlamaRMSNorm.forwardto Liger 0.5.10LigerRMSNormFunctionwithcasting_mode='llama'.LLAVA_FAST_RMSNORM_INPLACEselects backward mode. Installed Liger 0.5.10 in/opt/candidate-envwith--no-deps. - GPU correctness probe/tmp/r12/test_rmsnorm.log: forward bitwise equal at rows=2048, max abs diff 0.015625 at rows=32768; weight gradients bitwise equal; input-gradient max abs diff < 4e-9. Expected N1. - Sweep start (UTC): 2026-11-19T03:28:28Z; configs/tmp/r12/control.json,/tmp/r12/rms_inplace.json,/tmp/r12/rms_outplace.json; output/tmp/r12/sweep_rmsnorm. - Sweep PID: 90583; log: /tmp/r12/sweep_rmsnorm.log. - Sweep result/tmp/r12/sweep_rmsnorm/sweep.json: paired reference 2772.2 ms/step (spread 0.0025); control 2512.7 ms (1.0976× frozen, window spread 0.0588, peak 135.66 GiB), RMSNorm in-place 2347.6 ms (1.1748× frozen, 1.1809× paired reference, spread 0.0133, peak 113.52 GiB), RMSNorm out-of-place 2360.0 ms (1.1687×, spread 0.0145, peak 113.52 GiB). In-place is fastest; both fused variants cut peak memory by 22.14 GiB. - Formal time + quick start (UTC): 2026-11-19T03:39:28Z; config/tmp/r12/rms_inplace.json; outputs/tmp/r12/time_rms_inplace,/tmp/r12/quick_rms_inplace. - Time+quick PID: 94071; log: /tmp/r12/time_quick_rms_inplace.log. - Formal time \/tmp/r12/time_rms_inplace/time_tree.json\: ok, 2349.1 ms/step,speedup_vs_frozen_reference1.1741, windows 23.879/23.103 s, spread 0.0139, peak 113.52 GiB, no problems, beyond frozen reference noise. -check --quick\/tmp/r12/quick_rms_inplace/check.json\: PASS, measured tier N1,NOT_BITWISE, no exact failures, no dtype or precision-mode changes, 1957 diagnostic tolerance violations, 32/4724 tensors bitwise identical. - Round 12 conclusion: fused Liger RMSNorm is a strong N1 gain (+4.54% over accepted 1.1231 formal-check time) and cuts peak memory by 22.14 GiB; in-place backward is 0.5% faster than out-of-place. Keep submission switches at the accepted 1.1231 config until a full check passes. - Round 12 end (UTC): 2026-11-19T03:46:30Z. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "50000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}}. - Latest accepted full check remains/tmp/r11/check_p3_b50/check.json, PASS 1.1231, N1. - Latest candidate full check pending:/tmp/r12/check_rms_inplace, config/tmp/r12/rms_inplace.json; formal time 1.1741, quick PASS N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.54% (pending gate 3). - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m. - Next: full check for RMSNorm; if PASS promote its two switches. With 22 GiB memory headroom, next hotspot is lower gradient-checkpoint period or fused/chunked cross-entropy. - Full-check start (UTC): 2026-11-19T03:47:26Z; config/tmp/r12/rms_inplace.json; output/tmp/r12/check_rms_inplace. - Full-check PID: 96537; log: /tmp/r12/check_rms_inplace.log. - Full check \/tmp/r12/check_rms_inplace/check.json\: PASS, speedup 1.175, candidate 2347.3 ms/step, N1. Candidate windows 23.862/23.085 s; peak 113.52 GiB; no exact failures; gate-3 endpoints within 3σ (train +0.448σ, probe -1.357σ). This is the new accepted full check. - Accepted change: promoteLLAVA_FAST_RMSNORM=1andLLAVA_FAST_RMSNORM_INPLACE=1in/submission/switches.json(switch-only, no source commit); N1. Gain over prior accepted full check is +4.62% (1.175 vs 1.1231). - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "50000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1"}}. - Latest accepted full check:/tmp/r12/check_rms_inplace/check.json, PASS 1.175, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM; skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m. - Next: profile promoted tree; with 22 GiB memory headroom, screen a lower gradient-checkpoint period before fused/chunked cross-entropy.
5.6 hRound 13 (checkpoint period with RMSNorm memory headroom)
- Start (UTC): 2026-11-19T04:00:02Z; profile first with promoted RMSNorm switch file. - Profile output:/tmp/r13/profile; classification: gradient-checkpoint recomputation. - Profile PID: 99951; log: /tmp/r13/profile.log. - Profile findings (/tmp/r13/profile/profile_tree.md): rank-0 GPU kernel time 1937 ms/step (down from 2168 ms before RMSNorm). bf16 GEMMs ~60.7% (416.7 + 331.5 + 181.6 + 140.3 + 105.1 ms), elementwise/copy ~15%, NCCL AllReduce 61.7 ms (3.2%), AllGather 25.5 ms (1.3%), flash fwd/bwd 24.8/41.4 ms. Liger RMSNorm kernels are only 22.5 ms total. CPU-inclusive:CheckpointFunctionBackward622 ms,aten::item413.8 ms,LigerRMSNormFunctionBackward320.1 ms,LinearFunctionForZeroStage3Backward267.7 ms,CheckpointFunction69.6 ms. - Chosen bottleneck class: gradient-checkpoint recomputation. Peak memory is 113.52 GiB on 139.8 GiB Hopper, leaving 26.3 GiB headroom; period 2 (half checkpointed) and period 0 (no checkpointing) are now worth screening where period 2 previously OOMed without RMSNorm. - Period sweep start (UTC): 2026-11-19T04:03:10Z; configs/tmp/r13/p3_control.json,/tmp/r13/p2.json,/tmp/r13/p0.json; output/tmp/r13/sweep_periods. - Period sweep PID: 100535; log: /tmp/r13/sweep_periods.log. - Period sweep \/tmp/r13/sweep_periods/sweep.json\: paired reference 2744.95 ms/step (spread 0.0023); p3 control 2355.2 ms (1.171× frozen, spread 0.0134, peak 113.52 GiB), p2 2321.5 ms (1.188×, spread 0.0718, peak 132.91 GiB), p0 ERROR OOM (tried 2.14 GiB with 2.13 GiB free). p2's window spread exceeds the final interference threshold 0.06 and its memory is close to the 139.8 GiB limit; formal time and exactness check required before any full check. - p2 formal time + quick start (UTC): 2026-11-19T04:13:26Z; config/tmp/r13/p2.json; outputs/tmp/r13/time_p2,/tmp/r13/quick_p2. - p2 time+quick PID: 104047; log: /tmp/r13/time_quick_p2.log. - p2 formal time \/tmp/r13/time_p2/time_tree.json\: ok, 2280.2 ms/step,speedup_vs_frozen_reference1.2096, window spread 0.028 (<0.06), peak 132.91 GiB, no problems. This is 2.94% faster than the accepted 1.175 full-check candidate. - p2check --quick\/tmp/r13/quick_p2/check.json\: PASS, N1,NOT_BITWISE, no exact failures, no precision changes. - Full-check start: output \/tmp/r13/check_p2\, config \/tmp/r13/p2.json\; submission switch remains accepted period-3 RMSNorm config until it passes. - p2 full-check start (UTC): 2026-11-19T04:20:47Z; output/tmp/r13/check_p2. - p2 full-check PID: 106505; log: /tmp/r13/check_p2.log. - p2 full check \/tmp/r13/check_p2/check.json\: PASS, speedup 1.1803, N1, trajectory equivalent (train +0.657σ, probe -0.517σ), peak 132.91 GiB, no gate-3 OOM. However candidate windows were 24.606/22.128 s, spread 0.087 (> final interference threshold 0.06); formal time had spread 0.028 and sweep had 0.0718. Timing is too unstable to promote despite correctness. - Round 13 end (UTC): 2026-11-19T04:31:00Z. Conclusion: p2 is correct and ~0.45% faster in the full check, but rejected for timing instability; p0 OOMs. Keep accepted period-3 RMSNorm config. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "3", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "50000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1"}}. - Latest accepted full check remains/tmp/r12/check_rms_inplace/check.json, PASS 1.175, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm, then PASS but timing-unstable with RMSNorm; skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m. - Next: round 14 reuses/tmp/r13/profile(no accepted change since) and screens smaller ZeRO buckets with period 2 to reduce memory pressure and window spread.
6.2 hRound 14 (stabilize period-2 checkpointing)
- Start (UTC): 2026-11-19T04:32:50Z; reuse/tmp/r13/profile/profile_tree.md(no accepted change since that profile). - Classification: memory/allocator pressure from period-2 checkpointing; screen smaller ZeRO-2 reduce/allgather buckets. - Bucket sweep start (UTC): 2026-11-19T04:32:50Z; configs/tmp/r14/p3_control.json,/tmp/r14/p2_b10.json,/tmp/r14/p2_b25.json,/tmp/r14/p2_b50.json; output/tmp/r14/sweep_p2_buckets. - Bucket sweep PID: 109921; log: /tmp/r14/sweep_p2_buckets.log. - Bucket sweep \/tmp/r14/sweep_p2_buckets/sweep.json\: paired reference 2740.95 ms/step (spread 0.0027); p3 control 2355.1 ms (1.1711× frozen, spread 0.0169, peak 113.52 GiB); p2/bucket 10m 2276.5 ms (1.2115×, spread 0.0320, peak 132.77 GiB); p2/bucket 25m 2288.7 ms (1.2051×, spread 0.0358, peak 132.82 GiB); p2/bucket 50m 2281.4 ms (1.2089×, spread 0.0314, peak 132.91 GiB). All p2 windows are now below 0.06; 10m is fastest and has the lowest peak. - p2/b10 formal time + quick start (UTC): 2026-11-19T04:44:15Z; config/tmp/r14/p2_b10.json; outputs/tmp/r14/time_p2_b10,/tmp/r14/quick_p2_b10. - p2/b10 time+quick PID: 114639; log: /tmp/r14/time_quick_p2_b10.log. - p2/b10 formal time \/tmp/r14/time_p2_b10/time_tree.json\: ok, 2275.9 ms/step,speedup_vs_frozen_reference1.2118, window spread 0.0305, peak 132.77 GiB, no problems. - p2/b10check --quick\/tmp/r14/quick_p2_b10/check.json\: PASS, N1,NOT_BITWISE, no exact failures, no precision changes. - p2/b10 full-check start: output \/tmp/r14/check_p2_b10\, config \/tmp/r14/p2_b10.json\; submission switch remains accepted period-3 RMSNorm config until it passes with stable windows. - p2/b10 full-check start (UTC): 2026-11-19T04:51:39Z; output/tmp/r14/check_p2_b10. - p2/b10 full-check PID: 117102; log: /tmp/r14/check_p2_b10.log. - p2/b10 full check \/tmp/r14/check_p2_b10/check.json\: PASS, speedup 1.2117, candidate 2276.2 ms/step, N1. Candidate windows 23.343/22.180 s, spread 0.032 (<0.06); peak 132.77 GiB; no exact failures; gate-3 trajectory equivalent with endpoints +0.083σ train and +0.047σ probe. - Accepted change: promoteLLAVA_FAST_GC_PERIOD=2andLLAVA_FAST_ZERO_BUCKET=10000000in/submission/switches.json(switch-only, no source commit); N1. Gain over prior accepted full check is +3.12% (1.2117 vs 1.175). - Round 14 end (UTC): 2026-11-19T05:01:45Z. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "10000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1"}}. - Latest accepted full check:/tmp/r14/check_p2_b10/check.json, PASS 1.2117, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); skip-item full check slower/noisy; token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m. - Next: profile promoted p2/RMSNorm tree; likely next hotspots areaten::itemhost sync and fused/chunked cross-entropy.
6.7 hRound 15 (post-checkpoint profile and next hotspot)
- Start (UTC): 2026-11-19T05:02:44Z; profile first with promoted p2/b10/RMSNorm switch file. - Profile PID: 120506; log: /tmp/r15/profile.log; output/tmp/r15/profile. - Profile findings (/tmp/r15/profile/profile_tree.md): rank-0 GPU kernel time 1956 ms/step. bf16 GEMMs ~58.9% (378.8 + 358.3 + 183.6 + 136.7 + 94.8 ms), NCCL AllReduce 107.5 ms (5.5%), AllGather 27.4 ms (1.4%), elementwise/copy ~15%, flash fwd/bwd 22.2/40.9 ms. CPU-inclusive top:aten::item413.6 ms,CheckpointFunctionBackward410.6 ms,LigerRMSNormFunctionBackward296.5 ms,LinearFunctionForZeroStage3Backward136.9 ms,CheckpointFunction59.2 ms. - Chosen bottleneck class: host synchronization/launch from DeepSpeed's per-steploss.mean().item(); re-screen existing default-offLLAVA_FAST_SKIP_LOSS_ITEM=1on the new p2/b10/RMSNorm baseline. Prior full check with the old config was PASS but slower/noisy (1.0705, spread 0.0695). - Skip-item sweep start (UTC): 2026-11-19T05:04:54Z; configs/tmp/r15/control.json,/tmp/r15/skip_item.json; output/tmp/r15/sweep_skip_item. - Skip-item sweep PID: 121105; log: /tmp/r15/sweep_skip_item.log. - Skip-item sweep \/tmp/r15/sweep_skip_item/sweep.json\: paired reference 2744.6 ms/step (spread 0.0029); control 2277.7 ms (1.2109× frozen, spread 0.0337, peak 132.77 GiB), skip-item 2136.0 ms (1.2912× frozen, 1.2849× paired reference, spread 0.0234, peak 132.77 GiB). This is a 6.22% gain over the accepted full-check candidate and resolves the earlier noisy rejection. - Skip-item formal time + quick start (UTC): 2026-11-19T05:12:42Z; config/tmp/r15/skip_item.json; outputs/tmp/r15/time_skip_item,/tmp/r15/quick_skip_item. - Skip-item time+quick PID: 124038; log: /tmp/r15/time_quick_skip_item.log. - Skip-item formal time \/tmp/r15/time_skip_item/time_tree.json\: ok, 2130.2 ms/step,speedup_vs_frozen_reference1.2947, window spread 0.0205, peak 132.77 GiB, no problems. - Skip-itemcheck --quick\/tmp/r15/quick_skip_item/check.json\: PASS, N1,NOT_BITWISE, no exact failures, no precision changes. The change itself is N0 relative to the accepted tree (removes an unused host sync). - Skip-item full-check start: output \/tmp/r15/check_skip_item\, config \/tmp/r15/skip_item.json\; submission switch remains accepted p2/b10/RMSNorm config until it passes. - Skip-item full-check start (UTC): 2026-11-19T05:20:26Z; output/tmp/r15/check_skip_item. - Skip-item full-check PID: 126498; log: /tmp/r15/check_skip_item.log. - Skip-item full check \/tmp/r15/check_skip_item/check.json\: PASS, speedup 1.292, candidate 2134.7 ms/step, N1. Candidate windows 21.780/20.914 s, spread 0.0214 (<0.06); peak 132.77 GiB; no exact failures; gate-3 trajectory equivalent with endpoints +0.026σ train and +0.150σ probe. - Accepted change: promoteLLAVA_FAST_SKIP_LOSS_ITEM=1in/submission/switches.json(switch-only, no source commit); N0 relative to accepted tree, overall N1. Gain over prior accepted full check is +6.63% (1.292 vs 1.2117). - Round 15 end (UTC): 2026-11-19T05:30:20Z. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "10000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check:/tmp/r15/check_skip_item/check.json, PASS 1.292, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; earlier skip-item full check slower/noisy on old config, now superseded. - Next: profile promoted skip-item tree; screen communication buckets and/or fused/chunked cross-entropy.
7.2 hRound 16 (post-host-sync profile and next hotspot)
- Start (UTC): 2026-11-19T05:31:08Z; profile first with promoted skip-item switch file. - Profile PID: 129904; log: /tmp/r16/profile.log; output/tmp/r16/profile. - Profile findings (/tmp/r16/profile/profile_tree.md): rank-0 GPU kernel time 1937 ms/step. bf16 GEMMs ~59.8% (379.5 + 361.1 + 185.7 + 137.4 + 95.5 ms), NCCL AllReduce 85.2 ms (4.4%), AllGather 23.8 ms (1.2%), elementwise/copy ~15%, flash fwd/bwd 22.3/40.2 ms. CPU-inclusive top:LigerRMSNormFunctionBackward455.1 ms,CheckpointFunctionBackward429.3 ms,aten::matmul220.9 ms,LinearFunctionForZeroStage3Backward151.0 ms,aten::itemnow only 26.3 ms. - Chosen bottleneck class: ZeRO-2 communication bucket sizing. The 10m bucket was needed to stabilize p2, but larger buckets may now reduce NCCL overhead after the host sync is gone; screen 10m/25m/50m/100m with skip-item enabled. - Bucket+skip sweep start (UTC): 2026-11-19T05:33:06Z; configs/tmp/r16/b10_control.json,/tmp/r16/b25.json,/tmp/r16/b50.json,/tmp/r16/b100.json; output/tmp/r16/sweep_buckets_skip. - Bucket+skip sweep PID: 130487; log: /tmp/r16/sweep_buckets_skip.log. - Bucket+skip sweep \/tmp/r16/sweep_buckets_skip/sweep.json\: paired reference 2738.45 ms/step (spread 0.0010); b10 control 2146.9 ms (1.2846× frozen, spread 0.0226, peak 132.77 GiB), b25 2157.9 ms (1.2781×, spread 0.0400, peak 132.82 GiB), b50 2132.8 ms (1.2931×, spread 0.0232, peak 132.91 GiB), b100 2123.9 ms (1.2986×, spread 0.0280, peak 133.10 GiB). Larger buckets gain ~1.1% over b10 with stable windows. - Large-bucket sweep start (UTC): 2026-11-19T05:44:33Z; configs/tmp/r16/b100.json,/tmp/r16/b200.json,/tmp/r16/b500.json; output/tmp/r16/sweep_large_buckets. - Large-bucket sweep PID: 135209; log: /tmp/r16/sweep_large_buckets.log. - Large-bucket sweep \/tmp/r16/sweep_large_buckets/sweep.json\: paired reference 2744.8 ms/step (spread 0.0025); b100 2119.4 ms (1.3013× frozen, spread 0.0240, peak 133.10 GiB), b200 2135.8 ms (1.2913×, spread 0.0105, peak 133.47 GiB), b500 2195.6 ms (1.2562×, spread 0.0712, peak 134.59 GiB). b100 is best; b500 is slower/noisy. - b100 formal time + quick start (UTC): 2026-11-19T05:54:18Z; config/tmp/r16/b100.json; outputs/tmp/r16/time_b100,/tmp/r16/quick_b100. - b100 time+quick PID: 139041; log: /tmp/r16/time_quick_b100.log. - b100 formal time \/tmp/r16/time_b100/time_tree.json\: ok, 2119.1 ms/step,speedup_vs_frozen_reference1.3015, window spread 0.0224, peak 133.10 GiB, no problems. - b100check --quick\/tmp/r16/quick_b100/check.json\: PASS, N1,NOT_BITWISE, no exact failures, no precision changes. - b100 full-check start: output \/tmp/r16/check_b100\, config \/tmp/r16/b100.json\; submission switch remains accepted b10/skip-item config until it passes. - b100 full-check start (UTC): 2026-11-19T06:01:31Z; output/tmp/r16/check_b100. - b100 full-check PID: 141501; log: /tmp/r16/check_b100.log. - b100 full check \/tmp/r16/check_b100/check.json\: PASS, speedup 1.298, candidate 2124.7 ms/step, N1. Candidate windows 21.682/20.813 s, spread 0.0218 (<0.06); peak 133.10 GiB; no exact failures; gate-3 trajectory equivalent with endpoints -0.383σ train and -0.639σ probe. - Accepted change: promoteLLAVA_FAST_ZERO_BUCKET=100000000in/submission/switches.json(switch-only, no source commit); N0 relative to accepted tree, overall N1. Gain over prior accepted full check is +0.46% (1.298 vs 1.292). - Round 16 end (UTC): 2026-11-19T06:11:25Z. - Current summary: - Switch file:/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check:/tmp/r16/check_b100/check.json, PASS 1.298, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; b200/b500 on p2+skip are slower (b500 spread 0.0712); earlier skip-item full check slower/noisy on old config, now superseded. - Next: profile promoted b100 tree; investigate fused/chunked linear cross-entropy to remove logits materialization and CE elementwise work.
7.8 hRound 17 (post-bucket profile and fused cross-entropy)
- Start (UTC): 2026-11-19T06:12:09Z; profile first with promoted b100 switch file. - Profile PID: 144911; log: /tmp/r17/profile.log; output/tmp/r17/profile. - Profile findings (/tmp/r17/profile/profile_tree.md): rank-0 GPU kernel time 1866 ms/step. bf16 GEMMs ~61.0% (382.8 + 325.5 + 189.8 + 142.9 + 96.4 ms), NCCL AllReduce 53.3 ms (2.9%), AllGather 22.6 ms (1.2%), elementwise/copy ~15%, flash fwd/bwd 22.5/42.5 ms. CPU-inclusive top:CheckpointFunctionBackward480.4 ms,LigerRMSNormFunctionBackward437.6 ms,aten::matmul216.2 ms,LinearFunctionForZeroStage3Backward212.3 ms,aten::item24.0 ms. - Chosen bottleneck class: finallm_headlogits materialization and cross-entropy elementwise work; fused/chunked linear cross-entropy with Liger 0.5.10, behind default-offLLAVA_FAST_FUSED_CE. - Compatibility:liger_kernel.transformers.__init__cannot be imported with Triton 2.1 becausedyt.pyuses a Triton 3 libdevice path; directliger_kernel.ops.fused_linear_cross_entropyimports fine. Liger's CE kernel uses.cast(), missing in Triton 2.1, so install aliasestriton.language.tensor.castto.to()when absent. No Triton upgrade needed. - GPU micro-test/tmp/r17/test_fused_ce.log: loss bitwise identical to upstream fp32-logits CE at rows 128 and 2048; input-gradient relative L2 < 2e-5, weight-gradient relative L2 < 0.23%; no-grad canonical path returns fp32 loss withrequires_grad=False. Expected N1. - Implemented default-offLLAVA_FAST_FUSED_CEinllava/train/fast_fused_ce.py, wired fromtrain_mem.py; patchesLlamaForCausalLM.forwardto avoid logits when labels are present and compute shifted mean CE throughLigerFusedLinearCrossEntropyFunction. Falls back to original forward for generation/eval-style arguments. - Fused-CE sweep start (UTC): 2026-11-19T06:22:31Z; configs/tmp/r17/control.json,/tmp/r17/fused_ce.json; output/tmp/r17/sweep_fused_ce. - Fused-CE sweep PID: 145924; log: /tmp/r17/sweep_fused_ce.log. - Fused-CE sweep \/tmp/r17/sweep_fused_ce/sweep.json\: paired reference 2746.4 ms/step (spread 0.0013); control 2131.4 ms (1.2940× frozen, spread 0.0190, peak 133.10 GiB), fused CE 2260.0 ms (1.2204× frozen, spread 0.0229, peak 129.46 GiB). Fused CE is 6.03% slower despite saving 3.64 GiB; not promoted alone. - Fused-CE formal time + quick start (UTC): 2026-11-19T06:30:53Z; config/tmp/r17/fused_ce.json; outputs/tmp/r17/time_fused_ce,/tmp/r17/quick_fused_ce. - Fused-CE time+quick PID: 148898; log: /tmp/r17/time_quick_fused_ce.log. - Fused-CE formal time \/tmp/r17/time_fused_ce/time_tree.json\: ok, 2258.7 ms/step,speedup_vs_frozen_reference1.2211, window spread 0.0159, peak 129.46 GiB, no problems. - Fused-CEcheck --quick\/tmp/r17/quick_fused_ce/check.json\: PASS, N1,NOT_BITWISE, no exact failures, no precision changes. - Round 17 end (UTC): 2026-11-19T06:38:05Z. Conclusion: fused CE is correct and saves 3.64 GiB but is 5.7% slower than the accepted 1.298 candidate; keep it default-off. Next round tests period-0 checkpointing enabled by that memory headroom. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check remains/tmp/r16/check_b100/check.json, PASS 1.298, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; b200/b500 on p2+skip are slower; fused linear cross-entropy is slower (1.2211) though memory-saving; earlier skip-item full check slower/noisy on old config, now superseded. - Next: round 18 reuses/tmp/r17/profileand screens period 0 with fused CE and smaller/larger ZeRO buckets.
8.3 hRound 18 (period-0 checkpointing with fused-CE memory headroom)
- Start (UTC): 2026-11-19T06:38:58Z; reuse/tmp/r17/profile/profile_tree.md(no accepted change since that profile). - Classification: gradient-checkpoint recomputation removal; fused CE saves 3.64 GiB and period 0 previously OOMed at 137.66 GiB. - p0 sweep start (UTC): 2026-11-19T06:38:58Z; configs/tmp/r18_p0_fused_b10.json,/tmp/r18_p0_fused_b100.json,/tmp/r18_p0_plain_b100.json; output/tmp/r18/sweep_p0_fused. - p0 sweep PID: 151450; log: /tmp/r18/sweep_p0_fused.log. - p0 sweep \/tmp/r18/sweep_p0_fused/sweep.json\: paired reference 2741.5 ms/step (spread 0.0010). All three period-0 configs OOM: fused CE + bucket 10m tried 6.32 GiB with 1.50 GiB free (138.29 GiB in use), fused CE + bucket 100m tried 6.32 GiB with 1.06 GiB free (138.73 GiB in use), plain bucket 100m tried 2.14 GiB with 1.83 GiB free (137.96 GiB in use). Fused CE's 3.64 GiB saving is insufficient. - Round 18 end (UTC): 2026-11-19T06:45:41Z. Conclusion: period 0 remains infeasible; keep accepted period-2 config. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check remains/tmp/r16/check_b100/check.json, PASS 1.298, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; b200/b500 on p2+skip are slower; fused linear cross-entropy slower (1.2211) but memory-saving; period 0 OOMs even with fused CE. - Next: last period-0 attempt with very small ZeRO buckets; if that fails, move to fused CE chunk tuning or another kernel class.
8.4 hRound 19 (period-0 with very small ZeRO buckets)
- Start (UTC): 2026-11-19T06:46:38Z; reuse/tmp/r17/profile/profile_tree.md(no accepted change since that profile). - Classification: allocator/communication buffers for period-0 checkpointing; screen buckets 1m/5m/10m with fused CE. - p0 small-bucket sweep start (UTC): 2026-11-19T06:46:38Z; configs/tmp/r19_p0_fused_b1.json,/tmp/r19_p0_fused_b5.json,/tmp/r19_p0_fused_b10.json; output/tmp/r19/sweep_p0_small_buckets. - p0 small-bucket sweep PID: 154408; log: /tmp/r19/sweep_p0_small_buckets.log. - p0 small-bucket sweep \/tmp/r19/sweep_p0_small_buckets/sweep.json\: paired reference 2762.1 ms/step (spread 0.0140). All three period-0 fused-CE configs OOM with the same 6.32 GiB activation allocation; bucket 1m/5m/10m leave only 1.46–1.52 GiB free and 138.27–138.33 GiB in use. Very small buckets do not change the dominant activation memory. - Round 19 end (UTC): 2026-11-19T06:53:21Z. Conclusion: abandon period-0 checkpointing; keep accepted period-2 config. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check remains/tmp/r16/check_b100/check.json, PASS 1.298, N1. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; b200/b500 on p2+skip are slower; fused linear cross-entropy slower (1.2211) but memory-saving; period 0 OOMs with fused CE and 1m/5m/10m buckets. - Next: fused-CE chunk-size tuning; profile the fused-CE candidate first.
8.5 hRound 20 (fused-CE chunk-size tuning)
- Start (UTC): 2026-11-19T06:54:13Z; profile fused-CE candidate first. - Fused-CE profile PID: 157413; log: /tmp/r20/profile_fused.log; output/tmp/r20/profile_fused. - Fused-CE profile findings (/tmp/r20/profile_fused/profile_tree.md): GPU kernel time 1827 ms/step, actually 39 ms lower than accepted, but CPU-inclusiveaten::itemis 401.2 ms andLigerFusedLinearCrossEntropyFunctionis 376.3 ms. The regression is Liger'starget_mask.sum().item()host sync, not GPU compute. - Chosen bottleneck class: fused-CE host synchronization. Added default-offLLAVA_FAST_FUSED_CE_NO_ITEM, which rewrites Liger's CE kernel/forward to load the valid-token count from a CUDA scalar instead of.item().triton.jitrequires a real source file, so the patched kernel is imported from a temporary module file; no Triton upgrade. - GPU micro-test/tmp/r20/test_no_item.log: loss bitwise identical to upstream at rows 128/2048, input-gradient relative L2 < 2e-5, weight-gradient relative L2 < 0.23%, no-grad path works. Expected N1. - No-item sweep start (UTC): 2026-11-19T07:00:21Z; configs/tmp/r20/control.json,/tmp/r20/fused_ce.json,/tmp/r20/fused_ce_no_item.json; output/tmp/r20/sweep_no_item. - No-item sweep PID: 158615; log: /tmp/r20/sweep_no_item.log. - No-item sweep/tmp/r20/sweep_no_item/sweep.json: paired reference 2744.4 ms/step (spread 0.0036). control 2125.3 ms (1.2977x frozen, spread 0.0246, peak 133.10 GiB), fused_ce 2250.8 ms (1.2253x frozen, spread 0.0224, peak 129.46 GiB), fused_ce_no_item 2258.7 ms (1.2211x frozen, spread 0.0216, peak 129.46 GiB). Removing the.item()host sync did not help: no-item (2258.7) is within noise of plain fused CE (2250.8) and still 6.3% slower than control. The host sync was hidden/overlapped; fused CE's real regression is elsewhere (kernel launch/gradient path), not the sync. - Round 20 end (UTC): 2026-11-19T07:09:30Z. Conclusion: fused-CE host-sync removal is a dead end; no benefit. Reverted the uncommitted default-offLLAVA_FAST_FUSED_CE_NO_ITEMsource change so the tree stays clean. Keep accepted control switches unchanged; do not promote. - Current summary: - Switch file remains/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CU_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1"}}. - Latest accepted full check remains/tmp/r16/check_b100/check.json, PASS 1.298, N1, candidate 2124.7 ms/step, windows 21.682/20.813 s, peak 133.10 GiB. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialized parameters leaves 0-D CLIP weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower than p3/50m; b200/b500 on p2+skip slower; fused linear cross-entropy slower (1.2211) though memory-saving; period 0 OOMs even with fused CE; fused-CE.item()host-sync removal gives no gain (1.2211). - Next: profile the accepted control and pick a new hotspot class (e.g. gradient-checkpoint recomputation or GEMM/attention).
8.9 hRound 21 (newer cuBLAS library override)
- Start (UTC): 2026-11-19T07:14:00Z; reuse/tmp/r17/profile/profile_tree.md(accepted tree unchanged). Top hotspots: bf16 cuBLAS GEMMs ~61% of 1866 ms GPU kernel time; elementwise/copy ~15%; NCCL ~4%; checkpoint recomputeCheckpointFunctionBackward480 ms CPU-inclusive. - Chosen bottleneck class: cuBLAS GEMM library (single library lever). Torch 2.1.2+cu121 bundleslibcublas.so.12/libcublasLt.so.12intorch/libwith RUNPATH$ORIGIN;LD_LIBRARY_PATHtakes precedence, so a newer cuBLAS can be loaded only for candidate processes. Driver 580.126.09 supports newer CUDA. - Extractednvidia-cublas-cu12<ip> to/opt/candidate-env/cublas124and <ip> to/opt/candidate-env/cublas128(libs only, no pip deps). Verified via/proc/self/mapsthat torch loads the overridden cublas/cublasLt and a 4096³ bf16 GEMM succeeds for both. Expected N1 (GEMM heuristics/accumulation may differ). - cuBLAS sweep start (UTC): 2026-11-19T07:18:00Z; configs/tmp/r21/control.json,/tmp/r21/cublas124.json,/tmp/r21/cublas128.json; output/tmp/r21/sweep_cublas. - cuBLAS sweep start (UTC): 2026-11-19T07:18:14Z. - cuBLAS sweep PID: 162959; log: /tmp/r21/sweep_cublas.log. - cuBLAS sweep/tmp/r21/sweep_cublas/sweep.json: paired reference 2751.75 ms/step (spread 0.0029). control 2120.8 ms (1.3005x frozen, spread 0.0303, peak 133.10 GiB), cublas124 2098.2 ms (1.3145x, spread 0.0326), cublas128 2067.4 ms (1.334x, spread 0.0025, peak 133.10 GiB). All ok, no problems. cuBLAS <ip> is 2.5% faster than control with the most stable windows. - Promoted/submission/switches.jsonto the cuBLAS <ip> config (LD_LIBRARY_PATH prepends/opt/candidate-env/cublas128); also saved as/tmp/r21/cublas128_final.json. - Formal time + quick start (UTC): 2026-11-19T07:28:00Z; config/tmp/r21/cublas128_final.json; outputs/tmp/r21/time_cublas128,/tmp/r21/quick_cublas128. - time+quick PID: 166802; log: /tmp/r21/time_quick_cublas128.log. - Formaltime/tmp/r21/time_cublas128/time_tree.json: ok, 2091.2 ms/step,speedup_vs_frozen_reference1.3189, beyond reference noise, window spread 0.0315, peak 133.10 GiB, no problems; first-step logged loss rel diff 7e-05, max rel diff 0.0178. -check --quick/tmp/r21/quick_cublas128/check.json: PASS, N1, NOT_BITWISE, 0 exact failures, 0 dtype changes,precision_changed: false, 32/4724 bitwise. cuBLAS 12.8 preserves all exact items. - Full check start (UTC): 2026-11-19T07:36:00Z; config/tmp/r21/cublas128_final.json; output/tmp/r21/check_cublas128. - Full check PID: 169318; log: /tmp/r21/check_cublas128.log. - Full check/tmp/r21/check_cublas128/check.json: status PASS, speedup 1.3369, N1, candidate 2063.0 ms/step, windows 20.838/20.423 s (spread 0.001), peak 133.10 GiB, no problems. Gate 2: 0 errors, 0 exact failures, 0 dtype/precision changes, NOT_BITWISE (32/4724 identical). Gate 3 verdictequivalent:train_loss_last20_canonical-0.233σ,probe_loss_last20-0.794σ, both within 3σ. First-step logged loss rel diff 7e-05. - No git commit: this round is an environment/library-only change (/submission/switches.jsonplus cuBLAS libs under/opt/candidate-env), with no tree edit; the tree stays atd5e06a4, identical to the accepted r16 tree. - Round 21 end (UTC): 2026-11-19T07:46:00Z. Conclusion: cuBLAS <ip> override is a validated +3.0% over the accepted 1.298 candidate (1.3369 vs 1.298), N1, extremely stable windows. Promoted. - Current summary: - Switch file/submission/switches.json = {"environment": {"LLAVA_FAST_GC_PERIOD": "2", "LLAVA_FAST_UNPAD": "1", "LLAVA_FAST_ZERO_STAGE": "2", "LLAVA_FAST_ZERO_LATE": "1", "LLAVA_FAST_ZERO_BUCKET": "100000000", "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True", "LLAVA_FAST_RMSNORM": "1", "LLAVA_FAST_RMSNORM_INPLACE": "1", "LLAVA_FAST_SKIP_LOSS_ITEM": "1", "LD_LIBRARY_PATH": "/opt/candidate-env/cublas128:/usr/local/nvidia/lib:/usr/local/nvidia/lib64"}}. - Latest accepted full check:/tmp/r21/check_cublas128/check.json, PASS 1.3369, N1, 2063.0 ms/step, window spread 0.001. - cuBLAS libs:/opt/candidate-env/cublas124,cublas126,cublas128,cublas129(<ip> / <ip> / <ip> / <ip>); all import cleanly with torch 2.1.2+cu121. Driver 580.126.09. - Gain breakdown: dense selective checkpointing +5.34%, materialized late ZeRO-2 +4.8%, fast unpadding ~0.2%, period-3 +0.4%, bucket 50m +1.36%, Liger RMSNorm +4.62%, period-2 plus bucket-10m +3.12%, DeepSpeed host-sync removal +6.63%, bucket 100m +0.46%, cuBLAS <ip> +3.0%. - Failed directions: full/sparse no-GC OOM; early stage2 first-loss failure; late stage2 without materialization leaves 0-D CLIP conv weights; period-2 checkpointing OOM without RMSNorm; p2/bucket-50m full check timing-unstable (spread 0.087); token-group unbalanced ranks/OOM/slower;max_split_size_mbassert; bucket 500m trajectory OOM, 100m slower/noisy, 1b timing OOM; period-4 bucket variants slower; b200/b500 on p2+skip slower; fused linear CE slower (1.2211) though memory-saving; period 0 OOMs even with fused CE; fused-CE.item()host-sync removal no gain (1.2211). cuBLAS <ip> is slower than <ip> (1.3145 vs 1.334). - Next: round 22 screens cuBLAS <ip> / <ip> / <ip> with paired references; then a profile of the new best to pick the next hotspot (e.g. Liger fused SwiGLU / MLP activation fusion).
9.4 hRound 22 (cuBLAS version refinement)
- Start (UTC): 2026-11-19T07:46:30Z; hotspot class from round 21 (cuBLAS GEMM library), reuse/tmp/r17/profile/profile_tree.mdfor kernel accounting (GEMMs ~61%). - Extracted cuBLAS <ip> to/opt/candidate-env/cublas126and <ip> to/opt/candidate-env/cublas129; all three (126/128/129) passimport torch. Configs/tmp/r22/cublas126.json,/tmp/r22/cublas128.json,/tmp/r22/cublas129.json. - Version sweep start (UTC): 2026-11-19T07:47:00Z; output/tmp/r22/sweep_versions. - Version sweep start (UTC): 2026-11-19T07:46:52Z. - Version sweep PID: 172884; log: /tmp/r22/sweep_versions.log. - Version sweep/tmp/r22/sweep_versions/sweep.json: paired reference 2737.05 ms/step (spread 0.0010). cublas126 2062.5 ms (1.3372x frozen, spread 0.0055, peak 133.10 GiB), cublas128 2086.2 ms (1.3220x, spread 0.0243), cublas129 2073.4 ms (1.3302x, spread 0.0167). All ok, no problems. - Round 22 end (UTC): 2026-11-19T07:56:30Z. Conclusion: the three cuBLAS versions differ by <=1.1%, inside run-to-run noise (cublas128 itself measured 1.322 in this sweep but 1.3369 in its PASS full check). No distinguishable gain from switching; keep the fully validated <ip> config. No tree or switch change. - Current summary: unchanged from round 21 (switch file cuBLAS <ip>; latest accepted full check/tmp/r21/check_cublas128/check.json, PASS 1.3369, N1). Next: round 23 fuses the MLP SiLU-gate multiply (Liger SwiGLU) as a default-off switch, after profiling the current best.
9.7 hRound 23 (Liger fused SwiGLU MLP)
- Start (UTC): 2026-11-19T07:58:00Z; profile first with the promoted cuBLAS-12.8 switch file (/tmp/r23/profile_cublas128/profile_tree.md). - Profile findings: rank-0 GPU kernel time 1860 ms/step. cuBLAS 12.8 replacessm90_xmma_gemm_*withnvjet_tst_*cuBLASLt kernels (427.4 + 316.2 + 211.1 + 101.3 ms = 56.7%); NCCL AllReduce 126.6 ms (6.8%), AllGather 21.3 ms; elementwise/copy ~15% (silu_kernel14.8,MulFunctor32.5,add_48.0+37.2,neg15.1, copies ~80, scatter/gather ~43). CPU-inclusiveCheckpointFunctionBackward458 ms,LigerRMSNormFunctionBackward420 ms,aten::copy_124 ms. - Chosen bottleneck class: MLP activation elementwise kernels. Added default-offLLAVA_FAST_SWIGLUinllava/train/fast_swiglu.py, wired fromtrain_mem.py; replacesLlamaMLP.forwardwithLigerSiLUMulFunction.apply(gate, up)(keeps gate/up/down Linear modules so parameter names are unchanged). Expected N1: Liger computes silu in fp32 without the intermediate bf16 round that upstreamF.siluapplies. - GPU micro-test/tmp/r23/micro_test.py: Triton 2.1 compiles the kernel; fused output max abs 0.00195 (rel 0.36%), parameter grads rel ~0.5%, input grad rel ~0.49%. Works under bf16 with gradients. - SwiGLU sweep start (UTC): 2026-11-19T08:00:00Z; configs/tmp/r23/control.json,/tmp/r23/swiglu.json; output/tmp/r23/sweep_swiglu. - SwiGLU sweep start (UTC): 2026-11-19T08:00:34Z. - SwiGLU sweep PID: 177503; log: /tmp/r23/sweep_swiglu.log. - SwiGLU sweep/tmp/r23/sweep_swiglu/sweep.json: paired reference 2737.9 ms/step (spread 0.0). control 2068.2 ms (1.3335x frozen, spread 0.0030, peak 133.10 GiB), swiglu 2011.7 ms (1.3710x frozen, spread 0.0187, peak 122.78 GiB). Both ok, no problems (gate-1 logged-loss sanity passes for swiglu). Fused SwiGLU is 2.7% faster and frees 10.32 GiB. - Formal time + quick start (UTC): 2026-11-19T08:08:00Z; config/tmp/r23/swiglu.json; outputs/tmp/r23/time_swiglu,/tmp/r23/quick_swiglu. Submission switches stay at the validated cuBLAS-12.8 config until a full check passes. - time+quick PID: 180480; log: /tmp/r23/time_quick_swiglu.log. - Formaltime/tmp/r23/time_swiglu/time_tree.json: ok, 2007.8 ms/step,speedup_vs_frozen_reference1.3736, beyond reference noise, window spread 0.024, peak 122.78 GiB, no problems; first-step logged loss rel diff 7e-05, max rel diff 0.0191 (well inside 0.5%/25% bands). -check --quick/tmp/r23/quick_swiglu/check.json: PASS, N1, NOT_BITWISE, 0 exact failures, 0 dtype changes,precision_changed: false. - Full check start (UTC): 2026-11-19T08:15:30Z; config/tmp/r23/swiglu.json; output/tmp/r23/check_swiglu. - Full check PID: 183045; log: /tmp/r23/check_swiglu.log.