Record: Phrase Cache + N-gram Backoff + EMA-GPU (val_bpb=0.2722)#810
Open
Idan3011 wants to merge 5 commits intoopenai:mainfrom
Open
Record: Phrase Cache + N-gram Backoff + EMA-GPU (val_bpb=0.2722)#810Idan3011 wants to merge 5 commits intoopenai:mainfrom
Idan3011 wants to merge 5 commits intoopenai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phrase Cache + N-gram Backoff + EMA-GPU + Pre-Enrichment + XSA
val_bpb: 0.2722 (phrase cache + multi-order n-gram backoff 2-11, per-order adaptive alpha + PE confidence)
| 1.1478 (sliding window) | 14.94 MB | 8xH100 SXM, 600s
Progress
Key Contributions
Long Phrase Cache (eval-only, -0.027 BPP)
Variable-length suffix matching at lengths [48, 36, 28, 20, 16] catches verbatim repetition (boilerplate,
menus, legal text) that fixed-order n-grams miss. Cascaded ON TOP of n-gram mixing.
Improvement: 0.2995 → 0.2722 = -0.027 BPP
Two-Phase Shared N-gram Cache (-0.64 BPP)
Phase 1 (parallel): each GPU scores its share of sliding windows.
Phase 2 (global): all scored data gathered, sorted by position, single global n-gram cache built sequentially.
EMA on GPU (37% faster training)
Step time: 64.7ms (vs 101ms before). 9,268 steps in 600s.
GELU Pre-Enrichment (512→768→512)
Wider nonlinear transformation before transformer blocks.
XSA (Exclusive Self Attention) on Last 4 Layers
Removes self-value bias via orthogonal projection (arXiv:2603.09078, GQA-aware PR #265 @unnir).
Additional Techniques
Architecture: 10L, 512d, 8H/4KV GQA, MLP 3x, tied embeddings, U-Net skip connections. Training: Muon+AdamW,
WD=0.04, matrix_lr=0.025, warmdown=3500, batch=524K, seq=2048.
What Didn't Work
Compliance
Reproduction
All defaults baked in. No env vars needed.
8xH100 SXM, 600s training + ~211s eval.
Key Metrics
Credits
entropy-adaptive PR Record: First Legal Sub-1.0 BPB — Multi-order N-gram Backoff + Entropy-Adaptive Alpha (val_bpb=0.9674, 3-seed) #727 (@Asukabot0)
Update Log