Skip to content

11L FullGPTQ + XSA-all + BigramHash 3072×112 — val_bpb 1.11564 (1-seed) - #1473

Open
AVINASH0052 wants to merge 10 commits into
openai:mainfrom
AVINASH0052:non-record/11l-fullgptq-xsa-bigramhash
Open

AVINASH0052 wants to merge 10 commits into
openai:mainfrom
AVINASH0052:non-record/11l-fullgptq-xsa-bigramhash

Conversation

@AVINASH0052

Copy link
Copy Markdown

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

Seed val_bpb val_loss artifact_bytes
1337 1.11564047 1.88370722 15,832,508

Post-EMA (before GPTQ): val_bpb 1.1350
After int6 GPTQ + sliding-window exact eval (stride=64): val_bpb 1.11564047


Key Techniques

Technique Detail
Architecture 11L, 512d, GQA 8H/4KV
MLP 3× width, LeakyReLU(0.5)²
Parameter Banking Shared weight scales across layers
Optimizer Parallel Muon (8-GPU)
Attention XSA on all 11 layers
Hash Embedding BigramHash 3072×112
Pos Encoding Partial RoPE (16 of 64 dims)
LN Scaling 1/√(L+1) per layer
Skip Connections U-Net style (layer 0↔10, 1↔9, 2↔8)
Volume Embed VE128 on layers 9, 10
SmearGate Input smearing gate on embedding
EMA α=0.997, tight SWA start at step 6150
QAT Late QAT enabled at step 6299, scale=0.1498
Quantization Full Hessian GPTQ int6, AR self-gen calibration (64 seqs × 2048 tokens)
Pruning Selective ±1 pruning (already fits, no pruning needed)
Compression LZMA-9
Eval Sliding window stride=64
Training 6891 steps, avg 87.08ms/step, FA3=True

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

@AVINASH0052
AVINASH0052 marked this pull request as ready for review April 8, 2026 11:43
Copilot AI review requested due to automatic review settings April 8, 2026 11:43
taka6745 pushed a commit to taka6745/parameter-golf that referenced this pull request Apr 8, 2026
…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +65 to +71
# 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))

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +106
# Compression: lzma (default, stdlib), zstd, or zlib
compress_method = os.environ.get("COMPRESS_METHOD", "lzma")

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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'."
)

Copilot uses AI. Check for mistakes.
Comment on lines +1258 to +1265
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

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +870 to +884
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)

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +1215 to +1223
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

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +29
},
"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"

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +21
"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
}
},

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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],

Copilot uses AI. Check for mistakes.
@MatoTeziTanka

Copy link
Copy Markdown

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 68596decbe06, file records/track_10min_16mb/2026-04-08_10L_LeakyReLU2_MLP3x_EMA_Int6QAT/train_gpt.py):

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 classify_prs.py (pattern bank derived from ~65 manually-reviewed PRs earlier in the 2026-04-11 sweep). This review was auto-drafted from a template and spot-checked before posting — if the template misread your code, please call it out so I can iterate the classifier.

@AVINASH0052

Copy link
Copy Markdown
Author

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:
train_gpt.py
— 11 layers, 512d, GQA 8H/4KV, full Hessian GPTQ int6, XSA-all, BigramHash 3072×112.
Real leaderboard run: layers=11, val_bpb=1.11564047, 15,832,508 bytes PASS.

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.

@AVINASH0052 AVINASH0052 changed the title Non-record: 11L FullGPTQ + XSA-all + BigramHash 3072×112 — val_bpb 1.11564 (1-seed) 11L FullGPTQ + XSA-all + BigramHash 3072×112 — val_bpb 1.11564 (1-seed) Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants