Repository navigation
Conversation
First competitive non-transformer architecture. 7-layer hybrid model running attention and Mamba SSM in parallel within each block. Mean val_bpb: 1.1828 ± 0.0036 (3 seeds, 8xH100) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… Golf First functional SSM architecture in Parameter Golf with zero throughput penalty. Previous SSM attempts (Hymba, PR openai#599) used Mamba's selective scan which requires custom CUDA kernels, resulting in 3.4x throughput penalty. S4D-Lin replaces this with standard F.conv1d — pure PyTorch, fully torch.compile compatible. Results: 1.1682 bpb post-GPTQ-int5 (vs 1.1194 SOTA). The throughput problem is solved (116ms/step, matching baseline) but attention quality > SSM quality in lower layers at this scale. Detailed analysis of why, plus lessons for future SSM work. Checks off "State-space models" from Requests for PRs.
Community Review — [Non-Record] Hymba: Hybrid Attention + Mamba SSM (val_bpb 1.1828)BPB: 1.1828 | 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.06s, dim=512, layers=7, vocab=1024, code=65326 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.06s, dim=512, layers=7, vocab=1024, code=65326 B, SMOKE_TEST_PASS. Classification via deterministic AST-based |
Hymba: Hybrid Attention + Mamba SSM
First competitive non-transformer architecture in the competition.
A 7-layer hybrid model that runs attention and Mamba SSM in parallel within each block, achieving val_bpb ~1.18 (3 seeds) on 8×H100 in 10 minutes, beating the naive transformer baseline (1.2244).
Architecture
Each block runs two branches in parallel on the same input:
mamba-ssm) with causal conv1d, gated projectionOutputs are merged with a learned weighted average:
sigmoid(α) · attn + (1 - sigmoid(α)) · mamba, then projected through a shared output layer.Key design: the input projection for K, V, and Mamba (x, gate) is fused into a single matmul for GPU efficiency. Q is projected separately to allow for future factorization.
Key Findings
Shallow models win at this compute budget. The SSM branch makes each layer more powerful (attention for local precision, Mamba for long-range state), reducing the need for depth. Fewer layers = faster steps = more training in 10 minutes. The optimal depth (7L) is significantly shallower than the transformer baseline (9-11L).
Training stability determines quantization quality. With standard LR (0.04), the int6 quantization gap was 0.02-0.06 BPB. Reducing to LR=0.02 with aggressive cosine warmdown (3000 steps) produced smoother, more quantization-friendly weights — shrinking the gap to 0.02 without QAT. The warmdown phase alone accounts for ~0.06 BPB improvement as EMA weights converge.
The Mamba branch adds minimal overhead on multi-GPU. At 7 layers with MLP 4×, Hymba runs at ~85ms/step on 8×H100 (~7,000 steps in 10 min). The selective scan is O(T) and the per-layer Mamba params are small, so gradient sync overhead is negligible.