Repository navigation
11L FullGPTQ + XSA-all + BigramHash 3072×112 — val_bpb 1.11564 (1-seed) - #1473
AVINASH0052 wants to merge 10 commits into
Conversation
Architecture: 10 layers, 512 dim, GQA 8h/4kv, MLP 3x (1536), LeakyReLU(0.5)^2 Training: Muon WD=0.04, EMA(0.997), Int6 STE QAT at 80%, LZMA preset=9 Eval: Sliding window stride=256 on EMA weights post int6 roundtrip Estimated BPB: ~1.15-1.16 (pending GPU run)
…IP), L05_NORM_PCT still world-novel, flagged L11_DYN_LYAPUNOV vs PR openai#1471 SDClip Re-audit findings: - OPT_RIEMANNIAN_GRAM_QKV → comp-novel (Tilde Gram-Space Manifold Muon + arXiv:2603.09697 Mousse, just shipped 14 min before demotion) - L06_ASYMMETRIC_SKIP_INIT → comp-novel (Nick Ryan May 2024 blog explicitly tests 0.5 half-init schedule, 2-yr prior art) - L05_NORM_PCT_DROPOUT → STILL world-novel (0 hits on norm-percentile feature dropout) Comp PR audit (last 3h, openai#1467-openai#1473): PR openai#1471 introduces SDClip — flagged for L11 DYN_LYAPUNOV adjacency review next C180. Verified world-novels now 4 (down from claimed 8): L05 NORM_PCT_DROPOUT (validated), L09 NGR_LOG_FREQ_INV (shipped), L09 CTX_PARTITIONED_TAB (shipped), L10 CMP_QUANT_VALUE_DEDUP (shipped). Spend: ~$13.60 / $25 soft cap NORMAL. Win likelihood: 25% (down from 30%). LESSON: 3rd time this session conflated 'novel sublayer slice' with 'world-novel'. New rule: pre-ship audit must demand 0 hits on UNDERLYING technique, not just the slice.
There was a problem hiding this comment.
Pull request overview
This PR adds two new track_10min_16mb record folders containing self-contained training/quantization pipelines plus accompanying submission.json, READMEs, and run scripts to document and reproduce experimental techniques (including a non-record 11-layer Full GPTQ run and a 10-layer Int6-QAT variant).
Changes:
- Add an 11-layer training script implementing parameter banking + Parallel Muon, XSA-all, BigramHash, AR self-generated calibration, and full-Hessian GPTQ int6 export with sliding-window eval.
- Add a 10-layer training script implementing EMA + late Int6 STE-QAT with packed int6 serialization and sliding-window eval.
- Add per-record
submission.json, README, and smoke/leaderboard run scripts for reproducibility.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072/train_gpt.py | Adds full training + GPTQ quantization + eval pipeline for the 11L non-record submission. |
| records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072/submission.json | Records metrics/metadata for the 11L run. |
| records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072/run_smoke_1gpu.sh | Adds a reduced 1-GPU smoke test runner. |
| records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072/run_leaderboard_8xh100.sh | Adds the full 8×H100 leaderboard runner. |
| records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072/README.md | Documents architecture/training/quantization/eval and run commands for the 11L record. |
| records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/train_gpt.py | Adds training + EMA + Int6 STE-QAT + packed int6 serialization + sliding eval for a 10L variant. |
| records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/submission.json | Adds submission metadata for the 10L variant (currently placeholder metrics). |
| records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/run_smoke_1gpu.sh | Adds 1-GPU smoke test runner for the 10L variant. |
| records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/run_leaderboard_8xh100.sh | Adds full leaderboard runner for the 10L variant. |
| records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/README.md | Documents architecture/training/serialization/eval for the 10L variant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Model shape – 10 layers, 3x MLP, GQA | ||
| vocab_size = int(os.environ.get("VOCAB_SIZE", 1024)) | ||
| num_layers = int(os.environ.get("NUM_LAYERS", 9)) | ||
| num_kv_heads = int(os.environ.get("NUM_KV_HEADS", 4)) | ||
| model_dim = int(os.environ.get("MODEL_DIM", 512)) | ||
| num_heads = int(os.environ.get("NUM_HEADS", 8)) | ||
| mlp_mult = int(os.environ.get("MLP_MULT", 3)) |
There was a problem hiding this comment.
Hyperparameters.num_layers defaults to 9, but this record/script is labeled as a 10-layer model (file/README/run scripts). Running without NUM_LAYERS set will silently train a 9-layer model, hurting reproducibility. Update the default to 10 (and keep run_smoke_1gpu.sh / run_leaderboard_8xh100.sh consistent).
| # Compression: lzma (default, stdlib), zstd, or zlib | ||
| compress_method = os.environ.get("COMPRESS_METHOD", "lzma") |
There was a problem hiding this comment.
The compress_method comment says "lzma, zstd, or zlib", but compress_bytes/decompress_bytes treat any non-lzma method as zlib and the extension mapping has no zstd case. This makes COMPRESS_METHOD=zstd misleading and can cause unexpected artifacts. Either implement zstandard support (matching the comment) or restrict/validate allowed values and update the comment accordingly.
| # Compression: lzma (default, stdlib), zstd, or zlib | |
| compress_method = os.environ.get("COMPRESS_METHOD", "lzma") | |
| # Compression: lzma (default, stdlib) or zlib | |
| compress_method = os.environ.get("COMPRESS_METHOD", "lzma").strip().lower() | |
| if compress_method not in ("lzma", "zlib"): | |
| raise ValueError( | |
| f"Unsupported COMPRESS_METHOD={compress_method!r}; expected 'lzma' or 'zlib'." | |
| ) |
| if not t.is_floating_point() or t.numel() <= INT8_KEEP_FLOAT_MAX_NUMEL: | ||
| result[name] = t.to(torch.float16) if t.is_floating_point() else t | ||
| meta[name] = "passthrough" | ||
| continue | ||
| if any(p in name for p in CONTROL_TENSOR_NAME_PATTERNS): | ||
| result[name] = t.float() | ||
| meta[name] = "passthrough_ctrl" | ||
| continue |
There was a problem hiding this comment.
In mixed_quantize_int6, the early passthrough branch runs before the CONTROL_TENSOR_NAME_PATTERNS check. That means small control/scalar tensors (e.g. attn_scale, mlp_scale, resid_mix, q_gain, etc.) will be cast to fp16 instead of being kept in fp32 as intended by the "control tensor" mechanism. Reorder the checks so control tensors are handled first (or exempt them from the size-based fp16 cast).
| if not t.is_floating_point() or t.numel() <= INT8_KEEP_FLOAT_MAX_NUMEL: | |
| result[name] = t.to(torch.float16) if t.is_floating_point() else t | |
| meta[name] = "passthrough" | |
| continue | |
| if any(p in name for p in CONTROL_TENSOR_NAME_PATTERNS): | |
| result[name] = t.float() | |
| meta[name] = "passthrough_ctrl" | |
| continue | |
| if any(p in name for p in CONTROL_TENSOR_NAME_PATTERNS): | |
| result[name] = t.float() | |
| meta[name] = "passthrough_ctrl" | |
| continue | |
| if not t.is_floating_point() or t.numel() <= INT8_KEEP_FLOAT_MAX_NUMEL: | |
| result[name] = t.to(torch.float16) if t.is_floating_point() else t | |
| meta[name] = "passthrough" | |
| continue |
| vocab_size=1024, temperature=0.8, batch_size=8, seed=42): | ||
| model.eval() | ||
| rng = torch.Generator(device=device) | ||
| rng.manual_seed(seed) | ||
| all_tokens = [] | ||
| with torch.inference_mode(), torch.autocast(device_type="cuda", dtype=torch.bfloat16): | ||
| for batch_start in range(0, num_seqs, batch_size): | ||
| bs = min(batch_size, num_seqs - batch_start) | ||
| tokens = torch.randint(0, vocab_size, (bs, 1), device=device, generator=rng) | ||
| for _ in range(seq_len - 1): | ||
| logits = model.forward_logits(tokens) | ||
| next_logit = logits[:, -1, :] | ||
| probs = torch.softmax(next_logit / temperature, dim=-1) | ||
| next_tok = torch.multinomial(probs, 1, generator=rng) | ||
| tokens = torch.cat([tokens, next_tok], dim=1) |
There was a problem hiding this comment.
generate_autoregressive_calib re-runs model.forward_logits(tokens) for the entire growing prefix at every generation step. For seq_len=2048 this is extremely expensive (quadratic+ re-computation) and can dominate runtime after training. Consider adding KV-cache incremental decoding (or generating calibration sequences with a fixed prompt length / fewer steps) to keep post-training GPTQ within a reasonable time budget.
| vocab_size=1024, temperature=0.8, batch_size=8, seed=42): | |
| model.eval() | |
| rng = torch.Generator(device=device) | |
| rng.manual_seed(seed) | |
| all_tokens = [] | |
| with torch.inference_mode(), torch.autocast(device_type="cuda", dtype=torch.bfloat16): | |
| for batch_start in range(0, num_seqs, batch_size): | |
| bs = min(batch_size, num_seqs - batch_start) | |
| tokens = torch.randint(0, vocab_size, (bs, 1), device=device, generator=rng) | |
| for _ in range(seq_len - 1): | |
| logits = model.forward_logits(tokens) | |
| next_logit = logits[:, -1, :] | |
| probs = torch.softmax(next_logit / temperature, dim=-1) | |
| next_tok = torch.multinomial(probs, 1, generator=rng) | |
| tokens = torch.cat([tokens, next_tok], dim=1) | |
| vocab_size=1024, temperature=0.8, batch_size=8, seed=42, | |
| context_window=256): | |
| model.eval() | |
| rng = torch.Generator(device=device) | |
| rng.manual_seed(seed) | |
| all_tokens = [] | |
| if context_window is None or context_window <= 0: | |
| context_window = seq_len | |
| context_window = min(context_window, seq_len) | |
| with torch.inference_mode(), torch.autocast(device_type="cuda", dtype=torch.bfloat16): | |
| for batch_start in range(0, num_seqs, batch_size): | |
| bs = min(batch_size, num_seqs - batch_start) | |
| tokens = torch.empty((bs, seq_len), dtype=torch.long, device=device) | |
| tokens[:, 0] = torch.randint(0, vocab_size, (bs,), device=device, generator=rng) | |
| for pos in range(1, seq_len): | |
| ctx_start = max(0, pos - context_window) | |
| logits = model.forward_logits(tokens[:, ctx_start:pos]) | |
| next_logit = logits[:, -1, :] | |
| probs = torch.softmax(next_logit / temperature, dim=-1) | |
| next_tok = torch.multinomial(probs, 1, generator=rng).squeeze(1) | |
| tokens[:, pos] = next_tok |
| cols = module.weight.shape[1] | ||
| hessians[param_name] = torch.zeros(cols, cols, dtype=torch.float32, device='cpu') | ||
| def make_hook(pname): | ||
| def hook_fn(module, input, output): | ||
| x = input[0].detach().float() | ||
| if x.ndim == 3: | ||
| x = x.reshape(-1, x.shape[-1]) | ||
| hessians[pname] += (x.T @ x).cpu() | ||
| return hook_fn |
There was a problem hiding this comment.
Hessian collection does a GPU→CPU copy inside the forward hook ((x.T @ x).cpu()), which introduces a synchronization point for every linear layer call and can make calibration dramatically slower. If possible, accumulate the Hessian stats on GPU (or stage async copies outside the hook) and move to CPU only after the forward pass/batch.
| }, | ||
| "hardware": "8xH100 80GB SXM", | ||
| "pytorch_version": "2.6.0", | ||
| "cuda_version": "12.4", | ||
| "technique_summary": "Full Hessian GPTQ int6 + AR self-gen calibration + XSA-all + BigramHash 3072x112 + Parallel Muon + Parameter Banking + LZMA9", | ||
| "train_command": "SEED=1337 torchrun --standalone --nproc_per_node=8 train_gpt.py" |
There was a problem hiding this comment.
submission.json reports pytorch_version 2.6.0 and CUDA 12.4, but the PR description’s reproduction steps install FlashAttention3 wheels from a cu128_torch291 index (implying CUDA 12.8 / PyTorch 2.9.1). Please align the recorded versions with the reproduction instructions (or update the instructions) to avoid confusion when rerunning this record.
| "val_loss": null, | ||
| "val_bpb": null, | ||
| "val_loss_std": null, | ||
| "val_bpb_std": null, | ||
| "seeds": [1337], | ||
| "seed_results": { | ||
| "1337": { | ||
| "val_loss": null, | ||
| "val_bpb": null, | ||
| "artifact_bytes": null, | ||
| "steps": null, | ||
| "step_avg_ms": null | ||
| } | ||
| }, |
There was a problem hiding this comment.
submission.json contains null for val_loss, val_bpb, and per-seed metrics. Other records in this repo appear to provide numeric values, and null values may break aggregation/validation tooling. Consider either populating these fields from an actual run, or omitting this record directory until results are available.
| "val_loss": null, | |
| "val_bpb": null, | |
| "val_loss_std": null, | |
| "val_bpb_std": null, | |
| "seeds": [1337], | |
| "seed_results": { | |
| "1337": { | |
| "val_loss": null, | |
| "val_bpb": null, | |
| "artifact_bytes": null, | |
| "steps": null, | |
| "step_avg_ms": null | |
| } | |
| }, | |
| "seeds": [1337], |
Community Review — Non-record: 11L FullGPTQ + XSA-all + BigramHash 3072×112 — val_bpb 1.11564 (1-seed)BPB: 1.11564 | Compliance: LOOKS CLEAN — pure-neural submission, no TTT/SLOT/n-gram-cache What I found in the code (head SHA Static code review found no TTT adaptation function, no SLOT optimization loop, no n-gram-cache class, and no pre-quant val-token fine-tune. The eval path uses the standard sliding-window stride-64 pattern. The submission is a pure-neural architecture iteration on the standard SP1024/SP4096/SP8192 baseline. CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.09s, dim=512, layers=9, vocab=1024, code=47545 B, SMOKE_TEST_PASS Verdict: LOOKS CLEAN. Recommendation to @cocohearts @valerio-oai @0hq @yuzhougu-oai @notapplica: MERGE pending the usual record-track checks (3-seed validation, under-16MB artifact cap, ≤600s train + ≤600s eval on 8×H100 SXM). No compliance flags from the classification pass — this looks like a clean pure-neural iteration on the standard baseline. Auto-classification caveat: this review was drafted by the AST-based classifier. If there's a non-standard eval mechanism (logit postprocessing, hedge mixing, etc.) that I missed because it's factored into a helper file or a non-standard function name, please flag it and I'll re-run the audit manually. Reviewed by @MatoTeziTanka — The Agora. CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.09s, dim=512, layers=9, vocab=1024, code=47545 B, SMOKE_TEST_PASS. Classification via deterministic AST-based |
… — actual submission is 11L)
|
Hi @MatoTeziTanka — thanks for the review! One correction: the file audited appears to be train_gpt.py (an earlier experiment that was accidentally included in this PR). The smoke test showing layers=9, code=47545B confirms this — that's the old 10L file with a NUM_LAYERS default bug. The actual submission for this PR is: Also: this is a non-record submission (val_bpb 1.11564 does not beat merged SOTA 1.1147), so the 3-seed validation requirement should not apply here. |
Summary
Single-seed result: val_bpb 1.11564047 | 15,832,508 bytes | 8×H100 SXM | seed 1337
This submission does not beat the current merged SOTA (1.1147). Submitted as a non-record for technique documentation and reproducibility.
Results
Post-EMA (before GPTQ): val_bpb 1.1350
After int6 GPTQ + sliding-window exact eval (stride=64): val_bpb 1.11564047
Key Techniques
Reproduction
pip install flash_attn_3 --no-deps --find-links \ https://windreamer.github.io/flash-attention3-wheels/cu128_torch291/ cd records/track_10min_16mb/2026-04-08_11L_FullGPTQ_XSA11_BigramHash3072 SEED=1337 bash run_leaderboard_8xh100.sh