Scalable-Softmax multiplies logits by log n to fix attention flattening in long context
RobertTLange · x · 2026-11-26
Robert Lange highlights another way long context breaks transformers: as the number of keys grows, softmax flattens and the maximum attention weight shrinks, making it harder for the model to prioritize key information.
The arXiv paper "Scalable-Softmax Is Superior for Attention" proposes SSMax, which multiplies logits by a factor growing with log n (context length) and can seamlessly replace softmax in existing Transformer architectures. Experiments show faster loss reduction in pretraining, significantly better long-context and key information retrieval performance, and attention that stays focused even in long contexts. Models trained with SSMax from scratch get the best length generalization, but swapping softmax for SSMax mid- or post-pretraining still recovers some of the benefit.
He also links QK-Norm as another fix for the same problem: normalize q/k to unit length, learn a scale, and drop the 1/√dk — which previously kept attention logits from blowing up at scale in ViT-22B.
Related event: Thread Explains Why Attention Divides by √d_k and Its Alternatives(4 posts)→
More from Models
- Uncensored multimodal Inkling-2-Mini-Unbound GGUF quant trends on Hugging Face — nokeepai · 2026-11-27
- OpenAI claims solutions to poly Hirsch conjecture and strongly polynomial LP — JFPuget · 2026-11-27
- Claude Duet wows in testing but API costs bite: a dozen emails neared $100 — AiBreakfast · 2026-11-27
- 'Coding is solved,' sure: screenshot shows AI model apologizing for its own wrong claim — Franc0Fernand0 · 2026-11-27
- Ex-Bing chief Mikhail Parakhin on model choice: pricier because smarter, less benchmaxxed — MParakhin · 2026-11-27
- a16z's Gavin Baker: Grok Bot Turns Hours of Claude Code Work into Seconds — a16z · 2026-11-27