Gemini 4 Hydrogen 1.22×

Harness: Antigravity · switches: NANOCHAT_OPT_DATALOADER=1 NANOCHAT_OPT_FP8_KRNL=1 NANOCHAT_OPT_FP8_WCACHE=1 NANOCHAT_OPT_QKV_SHARE=1 NANOCHAT_OPT_QKV_SUM3=1 NANOCHAT_OPT_MLP_FUSE=1 NANOCHAT_OPT_OPTIM=1 NANOCHAT_OPT_OPTIM_CUDA=1 NANOCHAT_OPT_ROPE_NORM=1 NANOCHAT_OPT_ROPE_V2=1 NANOCHAT_OPT_SOFTCAP_CE=1 NANOCHAT_OPT_MICRO_BS=32 NANOCHAT_OPT_ASYNC_LOG=1 NANOCHAT_OPT_NORM_FUSE=1 NANOCHAT_OPT_VE_FUSE=1 NANOCHAT_OPT_AMAX_FUSE=1 NANOCHAT_OPT_FP8_WGRAD_FP32=1 NANOCHAT_OPT_OPTIM_V2=1 NANOCHAT_OPT_QKV_LT=1 NANOCHAT_OPT_SOFTCAP_CE_V2=1 NANOCHAT_OPT_NORM_BWD_1BAR=1 NANOCHAT_OPT_SCALED_MM_LT=1 NANOCHAT_OPT_OPTIM_PE_FUSE=1 NANOCHAT_OPT_OPTIM_BMM_LT=1 NANOCHAT_OPT_OPTIM_VE_COALESCE=1 NANOCHAT_OPT_OPTIM_TAIL_SPLIT=1 NANOCHAT_OPT_SOFTCAP_CE_V3=1 NANOCHAT_OPT_ROPE_V3=1 NANOCHAT_OPT_QUANT_V2=1

API stalls passed the 6 h pause allowance, so the lost time was run as a continuation of the same conversation on the saved submission (142 min); the judged result is the continuation's. The time axis leaves out the held time of both segments.

Judged
1.22×
Tier
N1
Self-best
1.22×
Rounds
10
Hours
10.0
API cost
$95.1
Input tokens · 93.3% cached
363 M
Output tokens
4.4 M
Requests
2,278
Micro-batch regrouping 4×16 → 2×32
✓ NANOCHAT_OPT_MICRO_BS=32, round 6B on top of earlier changes 0.9086 → 0.8909 s/step (1.0981× → 1.1199×), peak 56.19 → 93.17 GiB
Scope of hand-written kernels replacing Inductor glue
✓ whole block plus softcap + CE, all as the precompiled CUDA extension fp8_fast: round 3 dual-layout quantization + 64×64 transpose, shared QKV input, relu² fused with quantization fwd/bwd (with the weight cache 1.0044× → 1.0617×); round 5A RoPE + QKNorm (saves only rstd, −4.5 GiB), softcap + CE + backward quantization (→ 1.0981×); round 7A norm + residual (first version in round 5B at 2.36σ, fp32 recompute brings it to 0.419σ, → 1.1469×); round 7B value embedding; round 8 amax folded into upstream kernels; round 9A profile shows only 2.01 ms/step left in Inductor kernels
Per-shape cuBLASLt algorithm selection
✓ continuation round 10A NANOCHAT_OPT_SCALED_MM_LT: fixed per-shape cuBLASLt algorithms for forward, DX and DW (picked by head-to-head timing at M=65536; lm_head DX keeps the first heuristic), unit-test output diff 0, −9.3 ms/step (1.1959× → 1.2084×), GEMM 440.55 → 432.39 ms/step; round 10B also tunes the Muon BF16 BMMs; round 10C profile notes DX 1536→6144 still has no override (52.5 ms/step)
FP8 weights quantized once per step
✓ NANOCHAT_OPT_FP8_WCACHE: round 2 Python custom_op version 1.0045× (round 1 was 1.0044×, no gain), reverted; round 3 C++ cache checked by pointer + version counter (1.0617× together with the quantization kernels, shared QKV and MLP fusion, no separate number)
Fast accum on backward GEMMs
tried, not kept: round 5B NANOCHAT_OPT_FP8_FAST_ACCUM_BWD=1 passed the statistical gate at max −2.66σ, close to 3σ; a microbenchmark at M=65536 then showed the backward kernel without fast accum is faster, off from round 6B on
Other main levers
round 1 data fetch: fixed the always-false device == "cuda" check, background thread + pinned ring buffers (1.0044×, N0); round 4 optimizer issues Muon reduce_scatter first and stacks straight into comm buffers (−4.9 ms); round 8 weight grads emitted directly in fp32 (on top of round 7B 1.1558× → 1.1605×); round 9A AdamW and Muon pre/post-processing in CUDA (−2.9 ms); round 9B QKV backward accumulates the three dx in cuBLASLt via beta; continuation round 10B Polar Express axpby fusion, coalesced AdamW collectives, last Muon group split 16 + 8 to overlap its all_gather (with the BMM tuning −2.5 ms, optimizer span 36.38 → 33.88 ms)
Raw work log16 sections
-8.3 hRound 1 (Baseline Profile + Data/Host-Sync Optimization)
- Started: 2026-11-20T01:17:29Z
- Baseline Profile: bench/bench.py profile --tree /submission/nanochat --config /submission/switches.json --out /tmp/prof-ref --from 12 --iters 2 (completed 2026-11-20T01:20:05Z)
  - Trace span (2 steps, updates 12–13): 1967.61 ms (983.81 ms/update), GPU busy 97.5%, total GPU kernel launches in step 0: 11,741 (971.76 ms kernel sum, 978.97 ms wall).
  - Step 0 Accounting (1 update = ~979 ms):
    - Model: GEMM (_scaled_mm / linear): 409.67 ms (42.2%), 1800 calls
    - Model: FP8 quant / amax / transpose: 242.58 ms (25.0%), 3656 calls — [Kind 1 & 2/3] (weight quant+col_major repeated 4x per update; uncoalesced Inductor t().contiguous() taking up to 635 us/call; double-pass _to_fp8; triplicate QKV input quant)
    - Model: FA3 (fwd + bwd): 103.65 ms (10.7%), 384 calls
    - Model: Triton fwd/bwd (RoPE / norm / act / resid / ve): 76.79 ms (7.9%), 2900 calls — [Kind 1 & 3]
    - Model: RMSNorm (fwd + bwd): 39.47 ms (4.1%), 344 calls — [Kind 1 & 3]
    - Model: Softcap + CrossEntropy (+ lm_head quant): 26.20 ms (2.7%), 224 calls — [Kind 3] (materializes 4.29 GB fp32 logits + tanh tensors per microstep)
    - Optimizer (Muon BMM + NCCL + Muon/AdamW kernels & copies): ~41.7 ms wall (23.04 ms NCCL + 20.65 ms Muon BMM + 15.14 ms kernels/copies across streams) — [Kind 1 & 2] (double copy of grads before reduce_scatter, double copy of owned params, 12 separate value_embeds NCCL ops, RING_LL protocol)
    - Grad Accum (AccumulateGrad add_): 9.77 ms (1.0%), 525 calls + 1401 memsets — [Kind 2] (grad_accum_steps=4)
    - Host Sync / DataLoader: [Kind 2 — Bug] dataloader.py checks use_cuda = device == "cuda", which evaluates to False for torch.device("cuda", local_rank). This disables pin_memory and non_blocking=True, forcing a blocking cudaStreamSynchronize (52–84 ms) inside aten::copy_ on every microstep, plus ~8–10 ms synchronous Python bestfit / tokenization on the training thread, preventing CPU lookahead and causing GPU idle gaps before every microstep and optimizer step.
- Hotspot Chosen for Round 1: Data & Host Sync (nanochat/dataloader.py) under switch NANOCHAT_OPT_DATALOADER=1 (N0).
  1. Fix use_cuda check via torch.device(device).type == "cuda" (use_cuda was previously always False when given torch.device("cuda", rank)).
  2. Replace O(buffer_size) linear scan + list.pop + per-doc torch.tensor() allocation in bestfit with an exact O(1) bitmask + FIFO deque bucket structure + long_heap (producing exact tie-breaking).
  3. Ring-buffer cpu_buffer (8 pinned slots, event-guarded) and gpu_buffer (6 slots) with a background producer thread and dedicated copy_stream so parquet I/O, tokenization, best-fit packing, and H2D DMA overlap asynchronously with GPU execution.
- Round 1 Measurements & Verdict:
  - bench/bench.py time (/tmp/time-r1): 0.9933 s/update (windows [0.9873, 0.9941, 0.9983]), 1.0044x vs frozen reference (0.9977 s/update), 263,924 tok/s, peak memory 55.94 GiB. Eliminates blocking cudaStreamSynchronize + synchronous best-fit on CPU ahead of Rounds 2–5 where GPU time drops significantly.
  - bench/bench.py check --quick (/tmp/qcheck-r1): PASS (N0, bitwise identical) across 10 updates, 175 parameters, 640 token rows/rank (wall_s: 123.9s).
- Committed: /submission/nanochat commit on branch opt, /submission/switches.json updated (NANOCHAT_OPT_DATALOADER=1).

---
-7.8 hRound 2 (Python `custom_op` FP8 Weight Cache — Abandoned/Superseded)
- Tried: Caching Float8Linear weight (w_fp8, w_inv, w_col) across the 4 microsteps in pure Python via @torch.library.custom_op + weakref (NANOCHAT_OPT_FP8_WCACHE=1).
- Timing (bench/bench.py time, /tmp/time-r2): 0.9932 s/update (windows [0.9872, 0.9961, 0.9964]), 1.0045x vs frozen ref (57.33 GiB peak mem). Virtually identical to Round 1 (0.9933 s/update) because Python custom_op + weakref overhead (580 calls/upd) plus eager 7-kernel ATen _to_fp8+_to_col_major on microstep-0 misses offset the ~15 ms saved GPU work.
- Decision: Reverted Python cache (git checkout -- nanochat/fp8.py) and replaced with a pre-built C++/CUDA extension (fp8_fast) in Round 3.

---
-7.8 hRound 3 (CUDA `fp8_fast` Dual Quant + C++ Weight Cache + QKV Share + Fused MLP)
- Started: 2026-11-20T01:41Z | Committed: 954cb69
- Root Causes Attacked:
  1. Model: FP8 quant / amax / transpose (242.58 ms/upd in baseline): replaced Inductor double-pass _to_fp8 and uncoalesced t().contiguous() (up to 648 us) with a single pre-built C++/CUDA extension ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu)) providing quant_dual (vectorized uint4 amax + IEEE double scalar scale/inv_scale + 64x64 warp 4x4 __shfl_xor_sync+__byte_perm transpose with conflict-free swizzled SMEM + coalesced uint4 column-major stores). Saves only (in_inv, in_col, w_inv, w_col) in backward ctx (no redundant in_fp8).
  2. Weight FP8 re-quantization 4x per update: C++ unordered_map cache (get_cached_weight_fp8) keyed on (ptr, M, N, dtype, device) verified via weak_intrusive_ptr<TensorImpl> + version_counter.
  3. Triplicate attention QKV input quantization (c_q, c_k, c_v): _Float8QKVMatmulFast quantizes input_2d once and shares (in_fp8, in_inv, in_col) across all 3 projections.
  4. Intermediate MLP relu(h)^2 HBM materialization & 96x uncoalesced go_T: _Float8ReluSqMLPFast fuses relu_sq_quant_dual (fwd) and relu_sq_bwd_quant_dual (bwd) directly into FP8 dual-layout stores.
- Unit Parity & Microbenchmark (fp8_fast):
  - Bitwise 0 byte differences on quant_dual, relu_sq_quant_dual, and relu_sq_bwd_quant_dual vs eager _to_fp8 + _to_col_major.
  - Eager 2-layer GPT parity check: 0.0 loss diff, 0/21 non-bitwise params.
- Round 3 Measurements & Verdict (NANOCHAT_OPT_FP8_KRNL=1, NANOCHAT_OPT_FP8_WCACHE=1, NANOCHAT_OPT_QKV_SHARE=1, NANOCHAT_OPT_MLP_FUSE=1):
  - bench/bench.py time (/tmp/time-r3): 0.9397 s/update (windows [0.9354, 0.9404, 0.9433]), 1.0617x vs frozen reference (0.9977 s/update), 278,960 tok/s, startup+compile 75.6s (down from ~115s), peak memory 60.69 GiB.
  - bench/bench.py check --quick (/tmp/qcheck-r3): exact_items_ok=true, NOT_BITWISE (due to Inductor vs custom CUDA graph rounding on torch.compile).
  - bench/bench.py check --n1 (/tmp/n1-r3): PASS (N1, verdict=equivalent) — max endpoint deviation 0.31 sigma vs 3.0 sigma bound ([0.116, 0.178, 0.310, 0.140, 0.162, 0.125] sigma).
- Committed: /submission/nanochat commit 954cb69, /submission/switches.json updated.

---
-7.6 hRound 4 (MuonAdamW Zero-Copy Stacking + Reordered Overlap)
- Started: 2026-11-20T02:02Z
- Root Causes Attacked (Optimizer ~47–51 ms/upd in prof-r3, 4.19 ms Cat/Memcpy + 22.8–33.8 ms NCCL):
  1. Redundant CatArray + Memcpy DtoD (torch.stack(...) + .copy_() on stacked_grads before reduce_scatter and on updated_params before all_gather): replaced with torch.stack(..., out=...) directly into communication buffers inside [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py) (_reduce_muon_sub, _compute_muon_sub, _step_optimized under NANOCHAT_OPT_OPTIM=1). Also releases grad_chunk early before launching all_gather.
  2. Group schedule stalls: upstream waits on 14 serial AdamW reduce_scatters (lm_head, wte, 12x value_embeds, scalars) before starting the first Muon compute kernel, then leaves AdamW all_gathers bunched. _step_optimized launches Muon reduce_scatters first (tiny -> mid), computes first Muon batch immediately, runs AdamW compute+all_gather overlapped with remaining Muon compute, and waits on early gathers (starting _foreach_copy_ on compute stream) overlapped with the last Muon all_gather.
- What Did Not Work:
  - NCCL_PROTO=Simple (20.71 ms vs 3.93 ms default, 5x slower) and NCCL_PROTO=LL128 (4.37 ms) on 2x Hopper NV18 (scratch/bench_nccl.py), and NCCL_ALGO=NVLS (ncclInvalidUsage for fp32 reduce_scatter on 2 GPUs). Kept default NCCL.
  - Splitting Muon batch groups (NANOCHAT_OPT_OPTIM_SPLIT=1, 0.9361 s/update): caused 2 minor BF16 ULP flips from cuBLAS Polar Express batch-size sensitivity and added extra Inductor compilations; unsplit mode (NANOCHAT_OPT_OPTIM_SPLIT=0) is both faster and 100% bitwise identical.
- Unit Parity (2x Hopper test_optim_dist.py): 0/52 diffs (max_err = 0.0) vs baseline MuonAdamW.step.
- Round 4 Measurements & Verdict:
  - bench/bench.py time (/tmp/time-r4-unsplit, combined OPTIM=1 + R1/R3): 0.9348 s/update (windows [0.9311, 0.9359, 0.9375]), 1.0673x vs frozen reference (0.9977 s/update), 280,414 tok/s, peak memory 60.69 GiB (-4.9 ms/update over Round 3).
  - bench/bench.py check --quick (/tmp/qcheck-r4-only, DATALOADER=1 + OPTIM=1): PASS (N0, bitwise identical) across 10 updates, 175 parameters, 640 rows/rank. Combined R1+R3+R4 inherits R3's N1 tier (verified max 0.31 sigma, re-verified after Round 5).
- Committed: 9edc81b.

---
-7.4 hRound 5A (Fused RoPE+QKNorm+Scale & Fused Softcap+CrossEntropy+Dual-E5M2 Quant)
- Root Causes Attacked:
  1. Model: Triton RoPE + RMSNorm(q, k) + scale 1.2 (~30 ms/upd, saving full q_rot, k_rot [B, T, H, 128] per layer for backward): replaced in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py) (NANOCHAT_OPT_ROPE_NORM=1) with _RoPEQKNormScaleFast (rope_qknorm_fwd / rope_qknorm_bwd, D=128, BF16). Saves ONLY rstd_q, rstd_k [B, T, H] fp32 instead of q_rot, k_rot (4.5 GiB peak memory saved!), reconstructs x_rot from q_out / (alpha * rstd) in backward, uses zero-copy normalize_rotary_2d, and matches PyTorch FP32 RMSNorm eps (1.1920928955078125e-7f).
  2. Model: Softcap + CrossEntropy + lm_head bwd quant (26.20 ms/upd in baseline + 4.29 GiB FP32 logits per microstep): replaced in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) (NANOCHAT_OPT_SOFTCAP_CE=1) with _Float8LmHeadSoftcapCE (softcap_ce_fwd / softcap_ce_bwd_quant_dual), skipping full BF16->FP32 logits and tanh materialization by streaming directly from BF16 raw_logits using PTX tanh.approx.f32, single-pass BOUNDED_EXP reduction for softcap <= 40, and direct 64x64 warp-swizzled E5M2 dual-layout quantization (32x32 fallback for unaligned shapes).
- Unit Parity:
  - scratch/test_rope_softcap.py: rope_qknorm fp32_diff <= 0.0312; softcap_ce (32768, 1536, 32768, 32768, 'mean'): loss_diff=0.0, gx_max=3.73e-9, gw_max=5.96e-8 (fwd 677 us, bwd 2560 us); sum, none, and 32x32 fallback verified.
  - scratch/test_r5a_gpt.py: 2-layer GPT parity passed eager (loss_diff=0.0, none_diff=4.77e-7) and compiled (loss_diff=4.77e-7, none_diff=4.77e-7).
- Round 5A Measurements & Verdict (cumulative R1+R3+R4+R5A):
  - bench/bench.py time (/tmp/time-r5a): 0.9086 s/update (windows [0.9047, 0.9096, 0.9114]), 1.0981x vs frozen reference (0.9977 s/update), 288,512 tok/s (-26.2 ms/update over Round 4), peak_memory_allocated_gib: 56.19 GiB (-4.50 GiB vs R4), startup+compile 59.5s, zero warnings.
  - bench/bench.py check --skip-timing (/tmp/scheck-r5a): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation 0.176 sigma vs 3.0 sigma bound ([0.107, 0.173, 0.157, 0.176, 0.113, 0.079] sigma).

---
-7.4 hRound 5B (`NANOCHAT_OPT_NORM_FUSE=1` Fused RMSNorm / AddRMSNorm / ResidX0Norm / SubScaleRMSNorm)
- Root Causes Attacked:
  - Replaced Inductor Triton RMSNorm, x + attn_out residual add, resid_lambdas * x + x0_lambdas * x0, and backout_lambda subtraction kernels with 1-warp-per-row (C=1536, 6 uint4s/lane) + fallback CUDA kernels in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) and [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py).
- Round 5B Measurements & Decision:
  - bench/bench.py time (/tmp/time-r5b): 0.9005 s/update (windows [0.8972, 0.9012, 0.9031], 1.1079x vs frozen ref), peak memory 57.31 GiB, startup 42.0s.
  - bench/bench.py check --skip-timing (/tmp/scheck-r5b): PASS (N1), max endpoint deviation 2.3638 sigma ([2.3638, -1.0732, -0.6601, -0.7627, -0.7750, -0.9157]).
  - Also tested NANOCHAT_OPT_FP8_FAST_ACCUM_BWD=1 (/tmp/n1-r5b-fix): PASS (N1, -2.6596 sigma max), dangerously close to the 3.0 sigma statistical bound, and later trace/microbench at M=65536 showed fa=False backward (nvjet_qrtst 144x128 coopA) is actually faster than fa=True (192x192).
  - Decision: Kept NANOCHAT_OPT_NORM_FUSE=0 and NANOCHAT_OPT_FP8_FAST_ACCUM_BWD=0 by default cleanly in Round 6B, leaving the implementation gated in csrc/fp8_fast.cu + nanochat/gpt.py.

---
-6.2 hRound 6B (`NANOCHAT_OPT_MICRO_BS=32`, Commit `e647e71`)
- Committed: e647e71 (csrc/fp8_fast.cu, nanochat/gpt.py, scripts/base_train.py).
- Root Causes Attacked:
  - Upstream used device_batch_size=16 (M=32768 per microstep, grad_accum_steps=4), leaving 80 GiB+ of HBM unused on 141 GiB Hopper and doubling kernel launch, weight-read, grad-accumulation, and optimizer overhead vs micro_batch_size=32 (M=65536 per microstep, grad_accum_steps=2) while preserving exact total_batch_size=262,144 tokens/update (NANOCHAT_OPT_MICRO_BS=32).
- Round 6B Measurements & Verdict:
  - bench/bench.py time (/tmp/time-r6b): 0.8909 s/update (windows [0.8876, 0.8925, 0.8927]), 1.1199x vs frozen reference (0.9977 s/update), 294,231 tok/s, peak memory 93.17 GiB allocated (95.88 GiB reserved), startup 59.1s, zero warnings.
  - bench/bench.py check --skip-timing (/tmp/scheck-r6b): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation dropped back down to 0.2046 sigma vs 3.0 sigma bound ([0.0650, 0.1333, 0.2046, 0.1509, 0.1362, 0.0762] sigma).
  - Profile (/tmp/prof-r6b, from=12, iters=2, 889.93 ms/upd GPU sum): Identified top non-GEMM bottlenecks (fp8_amax_part1 51.2 ms/upd, fp8_quant_dual_64x64 87.5 ms/upd, rope_qknorm_fwd/bwd 35.6 ms/upd, triton_red_fused__fused_rms_norm_backward* ~40+ ms/upd, softcap_ce 14.0 ms/upd, MuonAdamW CatArray+foreach_copy 3.7 ms/upd, plus ~2.1 ms/upd host sync / zero_grad gap).

---
-6.2 hRound 6C + 6D (RoPE V2 + `sum3_bf16` + `OPTIM_CUDA` + `ASYNC_LOG`)
- Root Causes Attacked:
  1. ASYNC_LOG (NANOCHAT_OPT_ASYNC_LOG=1 in [scripts/base_train.py](file:///submission/nanochat/scripts/base_train.py)): replaces model.zero_grad(set_to_none=True) with flat param loop _p.grad = None and defers per-step CUDA sync / .item() / console logging to step <= 1 or every 100 steps (N0 verified).
  2. ROPE_V2 (NANOCHAT_OPT_ROPE_V2=1 in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py)): barrier-free 8-threads/head uint4 RoPE + QKNorm fwd/bwd (rope_qknorm_fwd_d128_v2 / bwd_d128_v2).
  3. QKV_SUM3 (NANOCHAT_OPT_QKV_SUM3=1 in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py)): vectorized uint4 3-way sum3_bf16 matching exact (a + b) + c BF16 rounding (581.2 -> 392.8 us, 0-byte diff).
  4. OPTIM_CUDA (NANOCHAT_OPT_OPTIM_CUDA=1 in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py)): batched 2D-grid CUDA stack_tensors / unstack_tensors (with bump_version() on unstack_tensors so FP8 weight cache version checks remain exact) replacing torch.stack(..., out=...) CatArray + _foreach_copy_, overlapped with NCCL reduce_scatter (0/52 diffs in 2-GPU distributed parity).
- Round 6C + 6D Measurements & Verdict:
  - bench/bench.py check --quick (DATALOADER=1, OPTIM=1, OPTIM_CUDA=1, ASYNC_LOG=1, /tmp/qcheck-r6d-n0): PASS (N0, bitwise identical) across 10 updates, 175 parameters, 640 rows/rank (wall_s: ~125s).
  - bench/bench.py time --paired (/tmp/time-r6d, all R6D switches): 0.8789 s/update (windows [0.8752, 0.8811, 0.8803], 298,271 tok/s, startup 56.5s, peak 93.16 GiB) vs paired reference 0.9941 s/update ([0.9885, 0.9955, 0.9984], startup 142.0s) — 1.1352x vs frozen ref (0.9977), 1.1295x vs paired ref (-12.0 ms/update over R6B).
  - bench/bench.py check --skip-timing (/tmp/scheck-r6d): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation 0.2502 sigma <= 3.0 sigma ([0.0401, 0.1258, 0.2502, 0.1412, 0.0637, 0.0739] sigma).

---
4.2 hRound 7A (Fixed `NANOCHAT_OPT_NORM_FUSE=1`: Eliminated BF16 `x_mid` Re-read & Inductor Fallback Bottleneck)
- Started: 2026-11-20T13:15Z | Committed: ff2cd85
- Root Causes Fixed:
  1. dcr / dcx orthogonality drift (~1–5% error in unit test, 2.36 sigma in Round 5B): forward saved BF16 x_mid, which backward re-read to reconstruct u = x_mid * rstd. Over 10^8 elements, BF16 quantization error (x_mid_f32 - x_mid_bf16) failed to cancel in sum d_c * x_mid where dcr cancels strongly. Rewrote resid_x0_norm_bwd and add_resid_x0_norm_bwd (192-thread C=1536 + generic) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py) to omit x_mid from save_for_backward and recompute u = (cr * x + cx * x0) * rstd in FP32 directly from (x, x0) / (a, b, x0) already loaded at the top of each row. Also fixed add_sub_scale_rmsnorm_fwd_gen_kernel to compute rstd in FP32 and verified zero register spills (0B stack/spill, 40 regs/thread on 192-thread backward kernels).
  2. Added _register_fp8_fast_inductor_fallbacks() in [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) to prevent exponential operator_str() overhead during Inductor compilation of deep residual DAGs.
- Unit Parity (scratch/test_r7a_norm_unit.py vs FP64):
  - Passed across (65536, 1536), (17, 1536), (64, 256), (33, 1535) and all optional None grad combinations: dcr_rel <= 0.00000, dcx_rel <= 0.00002, da/dx/dx0_rel <= 0.00234.
- Round 7A Measurements & Verdict (R6D + NANOCHAT_OPT_NORM_FUSE=1):
  - bench/bench.py check --skip-timing (/tmp/scheck-r7a2): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation dropped from 2.36 sigma -> 0.419 sigma ([0.047, 0.301, 0.419, 0.364, 0.327, 0.248] sigma vs 3.0 sigma), 93.54 GiB peak alloc, record wall 55.1s.
  - bench/bench.py time --paired (/tmp/time-r7a2): 0.8699 s/update (windows [0.8657, 0.8709, 0.8732], 301,342 tok/s, startup+compile 38.9s vs 56.5s R6D / 132.1s ref, peak 93.54 GiB) vs paired reference 0.9972 s/update ([0.9919, 0.9998, 1.0000]) — 1.1469x vs frozen reference (0.9977), 1.1452x vs paired reference (-9.0 ms/update absolute / ~12.5 ms ref-adjusted over R6D).

---
4.2 hRound 7B (`NANOCHAT_OPT_VE_FUSE=1`: Fused Value Embedding + VE Gate Forward In-Place & Deterministic Atomic-Free Backward)
- Root Causes Attacked:
  - In [prof-r7a](/tmp/prof-r7a/timing_profile.trace.json), Value Embeddings (12 layers × 2 microsteps = 24 fwd+bwd calls/update) launched triton_*_embedding_dense_backward_* (6.02 ms/u), triton_*_add_embedding_* (3.91 ms/u), slice_backward_view_7 (2.30 ms/u), embedding_dense_backward_3 (1.16 ms/u), and 72 tiny cutlass_32x32 ve_gate GEMMs (0.88 ms/u), materializing ~4.5 GiB of ve and x[..., :12] intermediate buffers.
  - Added prepare_ve_meta (1x per forward via cub::DeviceRadixSort::SortPairs on int32 token+row, ~3.1 us/layer amortized), ve_mix_fwd_inplace (mutates QKV _scaled_mm v output directly in-place with Inductor zero-clone), ve_mix_bwd (token-sorted atomic-free bitwise-deterministic ve_bwd_tiles_192_kernel + ve_bwd_merge_partials_192_kernel + ve_bwd_reduce_dw_kernel, 0 bytes stack/spill), and sum3_add_col_bf16 (fusing d_x12 into sum3_bf16) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py), and [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py).
- Unit & Parity (scratch/test_r7b_ve.py):
  - Verified exact bitwise determinism across repeated runs on all fast C=1536 paths, multi-tile boundary merges (>3 tiles), sum3_add_col_bf16, compiled _Float8QKVWithVELinearFast, and compiled 2-layer mini_gpt parity (loss 0.000 diff, grads l2_rel <= 3.59e-3).
- Round 7B Measurements & Verdict (R7A + NANOCHAT_OPT_VE_FUSE=1):
  - bench/bench.py time --paired (/tmp/time-r7b): 0.8632 s/update (windows [0.8595, 0.8636, 0.8664], 303,693 tok/s, startup+compile 35.3s vs 133.9s paired ref, peak_memory_allocated_gib: 89.06 GiB -4.48 GiB vs R7A) vs paired reference 0.9967 s/update ([0.9918, 0.9983, 1.0001]) — 1.1558x vs frozen reference (0.9977), 1.1539x vs paired reference (-6.7 ms/update over R7A).
  - bench/bench.py check --skip-timing (/tmp/scheck-r7b): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation 0.447 sigma ([0.013, 0.290, 0.447, 0.341, 0.302, 0.240] sigma vs 3.0 sigma), 89.05 GiB peak alloc, record wall 50.9s.

---
5.6 hRound 8 (`NANOCHAT_OPT_AMAX_FUSE=1` + `NANOCHAT_OPT_FP8_WGRAD_FP32=1`: Fused Inline Amax Collection + Direct FP32 Weight Gradients)
- Root Causes Attacked:
  1. Standalone dual quantization passes in quant_dual had to scan large (B*T, C) activation/gradient tensors twice (pass 1 global max reduction + pass 2 quantize+transpose), duplicating memory traffic across QKV/proj/MLP/norm/RoPE/VE boundaries.
  2. Linear weight gradients (dy_fp8.t() @ x_fp8) wrote BF16 outputs followed by Inductor BF16->FP32 cast/copy wrapper kernels for FP32 parameter .grad buffers (Float8Linear weights).
- Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py), [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py)):
  1. Added quant_dual_from_amax and *_amax variants (rmsnorm_fwd_amax, add_rmsnorm_fwd_amax, rmsnorm_add_bwd_amax, resid_x0_norm_fwd_amax, add_resid_x0_norm_fwd_amax, add_resid_x0_norm_bwd_amax, sub_scale_rmsnorm_fwd_amax, add_sub_scale_rmsnorm_fwd_amax, sub_scale_rmsnorm_bwd_amax, rope_qknorm_fwd_v2_amax, ve_mix_fwd_amax, ve_mix_bwd_amax, relu_sq_quant_dual_amax, relu_sq_bwd_quant_dual_amax), computing row/block absmax inline during upstream producer/consumer kernels and threading amax tags to quant_dual_from_amax (NANOCHAT_OPT_AMAX_FUSE=1). Verified nvcc -Xptxas -v 0B stack/spill across checked sm_90 kernels and added explicit emit_tag + ctx.mark_non_differentiable(tag) / want_pair guards so AOTAutograd never materializes full([1], 0) into quant_dual_from_amax when a tail tag is unused.
  2. Added NANOCHAT_OPT_FP8_WGRAD_FP32=1 emitting _scaled_mm(..., out_dtype=torch.float32) directly when weight .dtype == torch.float32, eliminating BF16->FP32 cast kernels (confirmed via TORCH_LOGS="output_code").
- Unit, Graph & Ablation Verification:
  - scratch/test_r8_amax.py + TORCH_LOGS="aot_graphs,output_code": verified [1/5] _scaled_mm FP32 (fa=False/True), [2/5] quant_dual_from_amax vs quant_dual, [3/5] all 12 *_amax CUDA+Meta ops, [4/5] GPT eager/compiled parity + 2-step MuonAdamW + fallback toggles + non-FP8, [5/5] exact 4-layer dispatch counts (quant_dual_from_amax: 27, quant_dual: 6).
  - bench/bench.py time ablations:
    - R7B + FP8_WGRAD_FP32=1: 0.8597 s/upd (1.1605x, 304,939 tok/s, peak 89.06 GiB, windows [0.8554, 0.8611, 0.8626])
    - R7B + AMAX_FUSE=1: 0.8469 s/upd (1.1781x, 309,549 tok/s, peak 89.06 GiB, windows [0.8436, 0.8467, 0.8503])
    - R7B + AMAX_FUSE=1 + FP8_WGRAD_FP32=1: 0.8462 s/upd (1.1790x, 309,805 tok/s, peak 89.05 GiB, windows [0.8429, 0.8473, 0.8483])
- Round 8 Measurements & Verdict (R7B + NANOCHAT_OPT_AMAX_FUSE=1 + NANOCHAT_OPT_FP8_WGRAD_FP32=1):
  - bench/bench.py time --paired (/tmp/time-r8): 0.8452 s/update (windows [0.8427, 0.8465, 0.8464], 310,152 tok/s, startup+compile 35.3s, wall 66.1s, peak_memory_allocated_gib: 89.05 GiB) vs paired reference 0.9977 s/update ([0.9931, 1.0006, 0.9994], 262,753 tok/s, startup 132.4s) — 1.1804x vs frozen reference (0.9977), 1.1785x vs paired reference (-18.0 ms/update vs R7B).
  - bench/bench.py check --skip-timing (/tmp/scheck-r8): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation 0.3100 sigma ([0.0198, 0.2663, 0.2700, 0.3100, 0.2517, 0.2399] sigma <= 3.0 sigma), 89.05 GiB peak alloc, record wall 49.2s.

---
6.3 hRound 9A (`NANOCHAT_OPT_OPTIM_V2=1` + Parallel VE/CE Reductions + Tail `x0` Elimination)
- Root Causes Attacked:
  1. Inductor-compiled adamw_step_fused and muon_step_fused pre/post-polar elementwise/norm kernels + cat/torch.compile warmup overhead in optimizer step (nanochat/optim.py): replaced with pure-CUDA adamw_step_cuda (adamw_vec8_kernel + scalar fallback) and muon_update_v2_cuda (muon_pre_pass1a/1b/scale, BF16 in-place bmm_out + pe_axpby_inplace Polar Express, muon_post_row_sq / col_sq / norm / update) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py) under NANOCHAT_OPT_OPTIM_V2=1.
  2. softcap_ce_fwd and ve_mix_bwd single-block reductions + zeroing allocations: replaced with 2-stage parallel reductions (softcap_ce_reduce_part1_kernel / part2_kernel, ve_bwd_reduce_dw_kernel with cudaMemsetAsync).
  3. Final transformer layer (i == n_layer - 1) x0_next unnecessary autograd tracking: gated emit_x0=(i < n_layer - 1) with ctx.set_materialize_grads(False) and ctx.mark_non_differentiable in [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py).
- Round 9A Measurements & Verdict (R8 + NANOCHAT_OPT_OPTIM_V2=1):
  - bench/bench.py time --paired (/tmp/time-r9a-paired): 0.8423 s/update (windows [0.8396, 0.8429, 0.8444], 311,220 tok/s, startup+compile 24.2s, wall 54.7s, peak_memory_allocated_gib: 89.06 GiB) vs paired reference 0.9970 s/update ([0.9922, 0.9979, 1.0007], 262,942 tok/s, startup 132.6s) — 1.1845x vs frozen reference (0.9977), 1.1818x vs paired reference (-2.9 ms/update over R8, -11.1s compile startup).
  - bench/bench.py check --skip-timing (/tmp/scheck-r9a): PASS (N1, exact_items_ok=true, verdict=equivalent) — max endpoint deviation 0.2518 sigma ([-0.0896, 0.1791, 0.2245, 0.2518, 0.2090, 0.2409] sigma <= 3.0 sigma), 89.05 GiB peak alloc, record wall 38.8s.
  - Profile (/tmp/prof-r9a, from=12, iters=2, 842.06 ms/upd GPU kernel sum): GEMM 456.25 ms/u (54.2%), Custom/FP8/Fused 228.42 ms/u (27.1%) (fp8_quant_dual_64x64 88.58 ms/u, fp8_amax_part1 30.94 ms/u, add_resid_x0_norm_bwd_192 18.08 ms/u), FA3 111.11 ms/u (13.2%), NCCL 32.02 ms/u (3.8%), ATen/Other 12.25 ms/u (1.5%) (pe_axpby_inplace 4.18 ms/u), Inductor Triton 2.01 ms/u (0.2%).

---
6.3 hRound 9B (`288922b`: `NANOCHAT_OPT_QKV_LT=1` + `SOFTCAP_CE_V2=1` + `NORM_BWD_1BAR=1`)
- Started: ~2026-11-20T16:10Z | Committed: 288922b
- Profile Baseline (/tmp/prof-r9a, from=12, iters=2, 842.06 ms/upd):
  - qkv backward dx summed 3 separate _scaled_mm outputs (q_dx, k_dx, v_dx) via sum3_bf16 / sum3_add_col_bf16.
  - softcap_ce_fwd, softcap_ce_bwd_amax, softcap_ce_bwd_quant_dual had room for fast math (fast_ex2f/fast_tanhf), deferred global scale, and 128x64 vector tiling.
  - add_resid_x0_norm_bwd_192, resid_x0_norm_bwd_192, sub_scale_rmsnorm_bwd_192 used 2 block barriers per row.
- Changes ([csrc/setup.py](file:///submission/nanochat/csrc/setup.py), [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py)):
  1. NANOCHAT_OPT_QKV_LT=1: Cached thread-safe cuBLASLt FP8 QKV backward accumulation (v -> k -> q with beta = 0.0f, 1.0f, 1.0f, up to 32 MiB workspace) + add_col12_inplace_kernel, eliminating 3 intermediate dx buffers and sum3_* kernels (96 calls/upd).
  2. NANOCHAT_OPT_SOFTCAP_CE_V2=1: softcap_ce_fwd_rows_v2_kernel<128>, softcap_ce_bwd_amax_v2_kernel<256, 6, true>, softcap_ce_bwd_quant_dual_128x64_fast_kernel<6>.
  3. NANOCHAT_OPT_NORM_BWD_1BAR=1: Race-free 1-barrier s_w[2][6] ping-pong in resid_x0_norm_bwd_192, add_resid_x0_norm_bwd_192, sub_scale_rmsnorm_bwd_192 and *_amax variants.
- Round 9B Measurements & Verdict (/submission/switches.json 21 flags active):
  - bench/bench.py time --paired (/tmp/time-r9b): 0.8343 s/update (windows [0.8314, 0.8344, 0.8370], 314,215 tok/s, startup 23.3s, wall 53.4s) vs paired reference 0.9975 s/update ([0.9916, 1.0008, 1.0001]) — 1.1959x vs frozen ref, 1.1927x vs paired ref.
  - bench/bench.py profile (/tmp/prof-r9b): sum3_* eliminated; add_resid_x0_norm_bwd_192 36.155ms -> 34.704ms (2 updates); softcap_ce_bwd_quant_dual 18.456ms -> 17.032ms (2 updates).
  - Full bench/bench.py check (/tmp/check-r9b/check.json): PASS (N1), speedup: 1.1987x (candidate_mean_s_per_update: 0.8323 vs 0.9977 frozen ref, windows [0.8285, 0.8329, 0.8356], 314,943 tok/s, peak_memory_allocated_gib: 89.06), exact_items_ok=true, verdict=equivalent, max endpoint deviation 0.2581 sigma ([-0.0438, +0.1841, +0.1596, +0.1980, +0.2581, +0.1986] <= 3.0 sigma).

---
8.1 hRound 10A (`NANOCHAT_OPT_SCALED_MM_LT=1`: Hopper `cublasLt` FP8 GEMM Tile/Cluster Tuning) · continuation
- Root Causes Attacked:
  - Model: GEMM (nvjet) (440.55 ms/u, 53.7% of step time in /tmp/prof-r9b) used torch._scaled_mm default cublasLt heuristic algorithms (many falling back to 192x192 or default clusters without shape-specific Hopper CGA cluster/tile/swizzle tuning).
- Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py), /submission/switches.json):
  1. Generalized LtPlanKey/LtImmPlan/run_lt_fp8_gemm/get_or_create_lt_plan_ext in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) with cached workspace (get_lt_workspace) and Hopper SM90 algorithm overrides (lookup_hopper_lt_override) across all D24 FP8 GEMM shapes (tuned via heuristic + symmetric forward/reverse interleaved H2H verification at M=65536: FWD {66,201,36,1,1,2,5} for 1536x1536 and lm_head, {66,201,36,1,0,0,5} for 1536->6144, {66,29,36,1,0,3,3} for 6144->1536; DX {66,29,36,1,0,7,3}/{66,29,36,1,0,5,2} for 1536x1536 b0/b1, {66,29,36,1,0,5,5} for 6144->1536, heur0 for lm_head DX; DW {66,184,36,1,0,6,2}, {66,184,36,1,0,4,5}, {66,165,36,1,0,4,2}).
  2. Added scaled_mm_lt (fp8_fast::scaled_mm_lt CUDA + Meta + Autograd fallthrough) and gated dispatch via _fast_scaled_mm in [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) under NANOCHAT_OPT_SCALED_MM_LT=1 (calling torch.ops.fp8_fast.scaled_mm_lt for AOTAutograd FakeTensor safety). Rebuilt & installed fp8_fast into /opt/candidate-env.
- Verification, Profiling & Verdict (/submission/switches.json 22 flags active):
  - Unit parity (/tmp/test_r10a_lt.py, deleted after run): max_diff=0.000e+00, qkv_bwd_gx rel_diff=0.000e+00.
  - bench/bench.py check --quick: exact_items_ok=true, NOT_BITWISE (wall_s: 39.6s, peak_memory_allocated_gib: 89.08).
  - bench/bench.py time --paired: 0.8250 s/update (windows [0.8220, 0.8260, 0.8271], 317,734 tok/s, startup 23.9s, peak_memory_allocated_gib: 89.09 GiB) vs paired reference 0.9963 s/update ([0.9913, 0.9975, 1.0002]) — 1.2084x vs frozen ref, 1.2060x vs paired ref (-9.3 ms/update over R9B paired timing).
  - bench/bench.py check --n1: PASS (N1, verdict=equivalent) — max endpoint deviation +0.2849 sigma ([-0.0259, +0.1742, +0.2849, +0.2107, +0.1786, +0.1266] sigma <= 3.0 sigma).
  - bench/bench.py profile (/tmp/prof-r10a): Model GEMM (nvjet) dropped 440.55 -> 432.39 ms/u (-8.16 ms/u).

---
8.1 hRound 10B (`NANOCHAT_OPT_OPTIM_PE_FUSE=1` + `OPTIM_BMM_LT=1` + `OPTIM_VE_COALESCE=1` + `OPTIM_TAIL_SPLIT=1`) · continuation
- Profile Baseline (/tmp/prof-r10a):
  - Optimizer.step critical path: serial Polar Express pe_axpby (4.24 ms/u) + bmm_out, 12x uncoalesced value_embeds (32768, 1536) bf16 reduce_scatter / all_gather, and unsplit mproj (24, 6144, 1536) exposing a full 2.41 ms all_gather + 0.46 ms unstack tail after the final Muon BMM.
- Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py), /submission/switches.json):
  1. NANOCHAT_OPT_OPTIM_PE_FUSE=1: Added pe_axpby_diag_vec_kernel + BF16 Hopper cublasLt BMM path in muon_update_v2_cuda (fp8_fast.cu), fusing b*X + c*XX^T into a single pass across Polar Express iterations.
  2. NANOCHAT_OPT_OPTIM_BMM_LT=1: Tuned BF16 strided batched cublasLt overrides (lookup_hopper_lt_bmm_override) across Muon m1536 (B=48), mfc (B=12), and mproj (B=12/8/4).
  3. NANOCHAT_OPT_OPTIM_VE_COALESCE=1: Coalesced large AdamW reduce_scatter and all_gather launches via dist._coalescing_manager in _reduce_adamw / _compute_adamw (use_ag_cm = coalesce and n_large >= 2).
  4. NANOCHAT_OPT_OPTIM_TAIL_SPLIT=1: Split final mproj group (24 matrices -> [16] + [8]) so the 16-matrix all_gather overlaps with the remaining 8-matrix Polar Express compute without affecting early tiny/mid schedules.
- Verification, Profiling & Verdict (/submission/switches.json 26 flags active):
  - Distributed 2-GPU parity (/tmp/test_optim_dist_r10b.py, deleted after run): PASS (AdamW max_diff=0.00e+00, Muon rel <= 8.35e-4).
  - bench/bench.py check --quick: exact_items_ok=true, NOT_BITWISE (wall_s: 39.7s, peak_memory_allocated_gib: 89.08).
  - bench/bench.py time --paired: 0.8225 s/update (windows [0.8202, 0.8226, 0.8246], 318,728 tok/s, startup 25.2s, peak_memory_allocated_gib: 89.09 GiB) vs paired reference 0.9982 s/update ([0.9941, 1.0003, 1.0002]) — 1.212x vs frozen ref, 1.212x vs paired ref (-2.5 ms/update over R10A).
  - bench/bench.py check --n1: PASS (N1, verdict=equivalent) — max endpoint deviation 0.6411 sigma ([0.1132, 0.5503, 0.6411, 0.4852, 0.3774, 0.3207] sigma <= 3.0 sigma).
  - bench/bench.py profile (/tmp/prof-r10b): Opt cluster span dropped 36.38ms -> 33.88ms (pe_axpby 4.241 -> 1.408 ms/u, AllGather_RING_LL 36x -> 16x, ReduceScatter_bf16 26x -> 4x).

---
8.1 hRound 10C (`NANOCHAT_OPT_SOFTCAP_CE_V3=1` + `ROPE_V3=1` + `QUANT_V2=1`, Commit `f4a2fc8`) · continuation
- Root Causes Attacked:
  1. softcap_ce backward recomputed amax in a separate full read over raw_logits ([65536, 32768]) before dual quant: NANOCHAT_OPT_SOFTCAP_CE_V3=1 computes unscaled amax_u inline during softcap_ce_fwd_rows_v3b_kernel + softcap_ce_reduce_v3_part1/2 (reconstructed via scalar factor in backward) and widens backward dual quant to softcap_ce_bwd_128x128_v3b_kernel<256, 6>, eliminating the extra 4 GiB backward amax scan.
  2. rope_qknorm_bwd: replaced rope_qknorm_bwd_d128_v2_kernel (~20.2 ms/u) with rope_qknorm_bwd_d128_tok192_h12_kernel under NANOCHAT_OPT_ROPE_V3=1 (14.92 ms/u).
  3. quant_dual / quant_dual_from_amax / relu_sq_quant_dual (64x64 tiles with uint2 row writes): added 512-thread 128x128 vectorized uint4 dual-quant kernel (fp8_qd_128x128_vec16_kernel, swizzled SMEM transpose + grid swizzle for OP_MODE=1) under NANOCHAT_OPT_QUANT_V2=1.
- Verification & Profiling (/submission/switches.json 29 flags active):
  - cuobjdump --dump-resource-usage: verified STACK:0 LOCAL:0 on fp8_qd_128x128_vec16_kernel (32–35 regs), rope_qknorm_bwd_d128_tok192_h12_kernel (59–64 regs), softcap_ce_fwd_rows_v3b_kernel (54 regs), and softcap_ce_bwd_128x128_v3b_kernel (40 regs).
  - bench/bench.py time --paired (/tmp/time-r10c): 0.8171 s/update (windows [0.8148, 0.8174, 0.8190], 320,838 tok/s, startup+compile 25.2s, peak_memory_allocated_gib: 89.09 GiB) vs paired reference 0.9969 s/update ([0.9915, 0.9990, 1.0002]) — 1.2200x vs frozen ref, 1.2169x vs paired ref (-5.4 ms/update over Round 10B).
  - bench/bench.py check --n1 (/tmp/n1-r10c/check.json): PASS (N1, verdict=equivalent) — max endpoint deviation 0.5994 sigma ([0.2045, 0.5994, 0.5772, 0.4549, 0.3801, 0.3453] sigma <= 3.0 sigma).
  - bench/bench.py profile (/tmp/prof-r10c, from=12, iters=2, 806.46 ms/u GPU span = 798.75 ms active + 7.71 ms idle gaps):
    - GEMM/BMM 452.52 ms/u (55.0%) (including DX 1536->6144 missing override 1093.2 us/c = 52.5 ms/u vs DX 6144->1536 925.4 us/c & FWD 849.0 us/c, plus lm_head DX/DW heuristic ~4.56 ms/c)
    - FP8_quant 119.57 ms/u (14.5%) (led by relu_sq_bwd_quant_dual still on 64x64: 16.99 + 27.71 = 44.85 ms/u, relu_sq_quant_dual 28.75 ms/u, 145 serial per-update weight misses 2.95 ms/u)
    - FA3 114.60 ms/u (13.9%), RMSNorm 50.39 ms/u, NCCL 27.78 ms/u, RoPE_QKNorm 24.56 ms/u, VE_or_Sort 9.23 ms/u, Softcap_CE 7.70 ms/u, Opt_CUDA 6.01 ms/u, AccumulateGrad add_ 3.28 ms/u, Memset 1.61 ms/u (954x/u), inter-kernel GPU idle gaps 7.71 ms/u.

---
↑ NanoChat