TL;DR
Standard Transformers allocate the same width (hidden dimension) to every layer, but different layers have vastly different computational needs. This paper introduces the ><former (pronounced "hourglass-former"), an architecture that narrows the middle layers while keeping early and late layers wide. This simple geometric reallocation consistently outperforms uniform baselines, delivering a 22% reduction in FLOPs and a 15% reduction in KV cache size for the same language modeling performance.
What Problem Does This Paper Address?
When scaling up Large Language Models (LLMs), researchers typically increase depth (number of layers) and width (hidden dimension size). However, almost all modern architectures assume a uniform width across all layers. This means every single layer gets the exact same parameter and compute budget, regardless of whether it's processing raw token embeddings, doing complex semantic reasoning, or preparing the final token predictions.
Prior interpretability work has shown that different layers play distinct roles and that middle layers often suffer from "representation collapse" or "compression valleys," where the model underutilizes its capacity. The authors challenge the uniform-width assumption, asking a fundamental question: under a fixed parameter budget, should all layers have the same width, or can we achieve better efficiency by distributing capacity nonuniformly across network depth?
Methods
The authors explore several non-uniform shapes across network depth: growing ($\lor$-shaped), narrowing ($\land$-shaped), diamond ($\diamondsuit$-shaped), and hourglass ($\times$-shaped). They find that the $\times$-shaped architecture—wide at the ends, narrow in the middle—performs best, which they name the ><former.
To implement variable width without introducing expensive projection layers or bottlenecks in the skip connections, they use a parameter-free residual resizing mechanism:
- Global Residual Stream: They maintain a fixed global residual dimension equal to the widest layer.
- Layer Slicing: Each narrow layer reads from and writes to only a layer-specific slice of this global stream.
- Carry-Forward (Copying): When a layer is narrower than the preceding one, the extra dimensions simply bypass the block. When expanding back out, the model restores the truncated dimensions by copying them forward from the most recent layer that actively processed them.
The exact width schedule is parameterized geometrically using a bottleneck layer index ($\ell^*$) and a bottleneck dimension ($d_{\ell^*}$). By default, they place the bottleneck at 75% of the network depth and shrink the width to 30% of the base dimension.
Datasets
- Pre-training: Models were trained on the DCLM dataset, following a 2.5$\times$ Chinchilla-optimal schedule (up to 100B tokens for the 2B model).
- Evaluation: The models were evaluated on standard downstream language modeling and NLP benchmarks via the
lm-evaluation-harness, including: - Common-sense reasoning & QA: OpenBookQA, PIQA, SciQ, ARC-Easy, ARC-Challenge, BoolQ, COPA, HellaSwag, WinoGrande, RACE.
- Language Modeling / Perplexity: WikiText-2, LAMBADA.
Key Insights and Ideas
- Mitigating Representation Collapse: Why does the $\times$-shape win? Standard uniform transformers naturally develop "compression valleys" where middle layers collapse in representational capacity (low entropy). The
><formerphysically constrains the middle layers, acting as a structural regularizer that forces the network to maintain a high-entropy manifold and use its available space more efficiently. - Better Load Balancing: By analyzing MLP activation frequencies, the authors found that the
><formerutilizes its intermediate dimensions much more evenly than a standard transformer, avoiding the common issue of "dead" or underutilized dimensions. - The Quadratic Parameter Bonus: Because a layer's parameter count scales quadratically with width ($d^2$) while attention FLOPs and KV cache size scale linearly ($d$), matching the total parameter count of a uniform baseline forces the average layer width of a
><formerto be strictly smaller. This mathematical property guarantees a smaller KV cache and fewer attention FLOPs out of the box.
Key Results
- Consistent Performance Gains: Across dense models from 200M to 2B parameters, and a 3B Mixture-of-Experts (MoE) model, the
><formerconsistently achieved lower language modeling loss than parameter-matched uniform baselines.
- Resource Reductions:
- FLOPs: Achieved a 22% reduction in overall training FLOPs under fitted loss-matched scaling curves.
- Memory & I/O: Reduced KV cache memory and I/O costs by 15% (with a ~10-11% average layer size reduction directly).
- Downstream Tasks: The 2B
><formeroutperformed the baseline on most zero-shot natural language understanding (NLU) tasks and significantly improved perplexity on WikiText and LAMBADA.
Limitations and Future Work
- Hardware & Implementation Complexity: The primary limitation is that current deep learning hardware and software infrastructure (like Triton or CUDA kernels) are heavily optimized for uniform matrix multiplications. Implementing heterogeneous per-layer widths introduces extra kernel launches and slicing/padding overhead, which currently offsets the theoretical FLOP savings in actual wall-clock time.
- Parallelism Tension: Variable widths are in tension with standard tensor and pipeline parallelism techniques, making distributed training more challenging to implement efficiently.
- Future Directions: The authors emphasize that these are implementation bottlenecks rather than algorithmic flaws. Future work will involve developing purpose-built fused kernels to realize the theoretical speedups in practice.
Summary updated