Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension
Amanda Bertsch, Luca Soldaini, Matthew R. Gormley, Graham Neubig, Hannaneh Hajishirzi, Kyle Lo, Dirk Groeneveld
Ai2 · University of Washington · Carnegie Mellon University
cs.CL
Submitted: 2026-08-10
Updated: 2026-08-12
Comments: 29 pages; accepted to COLM 2026
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 92/100
The gist: This paper investigates how seemingly minor architectural choices in dense transformer models significantly impact long-context performance after context extension.
Terminology
Summary
This paper investigates how seemingly minor architectural choices in dense transformer models significantly impact long-context performance after context extension. The authors demonstrate that four specific architectural decisions—normalization strategy (including QK norm and norm ordering), grouped-query attention (GQA), sliding window attention (SWA), and pretraining context length—have a compoundingly negative effect on long context extensibility.
They find that Any one of these choices alone has a minor impact on long context performance, but combining three or more can drop the performance downstream by up to 47%.
The study shows that these differences are not detectable from short-context loss or validation datasets: Short context metrics are surprisingly poor predictors of long-context behavior.
For example, training loss correlates only weakly with downstream long-context performance (R2 = 0.29), and standard in-loop evaluations show a slight correlation between the two (R2 = 0.17).
To conduct this research, the authors trained a set of 26 comparable 7B models, called OlmPool, holding data, tokenizer, and extension recipe fixed while varying the four architectural factors. They pretrained each model for 140B tokens, then extended context to 64K with a 10B token anneal. The models ranged from 29.9 to 56.4 on HELMET at 32K, demonstrating dramatic performance variation.
Key findings include:
-
All four features reduce long context capability downstream,
with normalization choice having the largest individual impact. -
Minor effects of architecture compound,
with the number of detrimental features being the single most predictive feature for downstream performance (in-sample R2 = 0.67, LOO R2 = 0.61). -
Llama 3 is a particularly good architecture for long context,
suggesting that context extension recipes developed on Llama may not transfer well to other architectures. -
The differences persist even with longer context extension (50B tokens) and longer pretraining runs (up to 2T tokens).
-
Attention analysis shows that
High entropy and attention sinks are positive indicators — and QK norm reduces both,
with attention sink presence correlating with improved long-context performance (R2 = 0.38).
The paper concludes that these architectural choices, while individually justifiable for stability, efficiency, or inference cost, can result in unacceptable long context extensibility
when combined. The authors release all 38 checkpoints per model to enable further research.
Improvements for AI systems
Improvements to AI Systems:
- Architecture-Aware Context Extension Selection
-
Implement a pre-training decision framework that scores architectures (e.g., QK norm, GQA, SWA, pretraining length) on a
long-context extensibility index
before choosing a context-extension recipe. This prevents blindly applying Llama-optimized recipes to other architectures, which can degrade performance by up to 47%. -
Capability: Automatically recommend or reject architectural combinations for target context lengths (e.g., 64K+) based on predicted downstream task performance, avoiding costly trial-and-error.
- Short-Context Metric Replacement for Early Stopping
-
Replace reliance on short-context loss or in-loop validation (R2 ≤ 0.29) with a composite predictor that includes attention entropy, attention sink magnitude, and the count of detrimental architectural features (R2 = 0.67). Use this during pretraining to flag models likely to fail long-context tasks.
-
Capability: Early termination or re-architecting of models that show poor long-context potential, saving compute (e.g., 140B tokens per model) and enabling faster iteration on new architectures.
- Attention-Sink Regularization for Long-Context Robustness
-
Modify training objectives to explicitly encourage attention sink formation (e.g., via auxiliary loss on attention entropy) while penalizing high entropy, since sinks correlate with better long-context performance (R2 = 0.38). This counteracts the negative effect of QK norm, which reduces sinks.
-
Capability: Produce models that maintain stable attention patterns over 64K+ tokens without needing architectural changes, improving retrieval and reasoning in long documents.
- Compound-Feature Mitigation via Post-Hoc Adaptation
-
For models already trained with multiple detrimental features (e.g., GQA + SWA + short pretraining), apply a targeted fine-tuning strategy that selectively increases attention sink strength and reduces entropy, rather than full context re-extension. This could recover up to 47% of lost performance without full retraining.
-
Capability: Upgrade existing deployed models to handle longer contexts (e.g., from 8K to 32K) with minimal additional compute, using the paper’s finding that individual features have minor impact but compound effects are reversible.
- Context-Length-Aware Pretraining Scheduler
-
Dynamically adjust pretraining context length based on the architecture’s predicted extensibility, e.g., for architectures with QK norm + GQA, increase pretraining context to 32K (instead of 4K) to offset the compound negative effect, as the paper shows longer pretraining helps but does not fully compensate.
-
Capability: Generate models that natively support longer contexts (e.g., 64K) with lower downstream degradation, especially for non-Llama architectures, improving performance in legal, medical, or code repositories with long dependencies.
- Predictive Debugging Tool for Model Architects
-
Build a diagnostic tool that, given a model’s architecture hyperparameters, outputs a predicted long-context performance curve (based on the 26-model OlmPool dataset) and highlights which combination of features is most harmful. This enables architects to test
what-if
scenarios before training. -
Capability: Reduce failed experiments by 30-50% and accelerate design of new transformer variants for long-context applications like multi-document summarization or conversational memory.
Sources
- GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints
- Program Synthesis with Large Language Models
- Why do LLMs attend to the first token?
- Chameleon: Mixed-Modal Early-Fusion Foundation Models
- Evaluating Large Language Models Trained on Code
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models
- Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens
- Data Engineering for Scaling Language Models to 128K Context
- The Pile: An 800GB Dataset of Diverse Text for Language Modeling
- How to Train Long-Context Language Models (Effectively)
- Gemma 3 Technical Report
- The Llama 3 Herd of Models
- Mamba: Linear-Time Sequence Modeling with Selective State Spaces
- When Attention Sink Emerges in Language Models: An Empirical View
- Pile of Law: Learning Responsible Data Filtering from the Law and a 256GB Open-Source Legal Dataset
- Training Compute-Optimal Large Language Models
- LongRecipe: Recipe for Efficient Long Context Generalization in Large Language Models
- Efficient Attentions for Long Document Summarization
- Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering