Flash Multi-Head Feed-Forward Network
Not on the map. Why?
Abstract (arXiv)
We explore Multi-Head FFN (MH-FFN) as a replacement of FFN in the Transformer architecture, motivated by the structural similarity between single-head attention and FFN. While multi-head mechanisms enhance expressivity in attention, naively applying them to FFNs faces two challenges: memory consumption scaling with the head count, and an imbalanced ratio between the growing intermediate size and the fixed head dimension as models scale, which degrades scalability and expressive power. To address these challenges, we propose Flash Multi-Head FFN (FlashMHF), with two key innovations: an I/O-aware fused kernel computing outputs online in SRAM akin to FlashAttention, and a design using dynamically weighted parallel sub-networks to maintain a balanced ratio between intermediate and head dimensions. Validated on models from 128M to 1.3B parameters, FlashMHF consistently improves perplexity and downstream task accuracy over SwiGLU FFNs, while reducing peak memory usage by 3-5x and accelerating inference by up to 1.08x. Our work establishes the multi-head design as a superior architectural principle for FFNs, presenting FlashMHF as a powerful, efficient, and scalable alternative to FFNs in Transformers.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 22 of its 24 references that are in the map. First posted on arXiv 7 Dec 2025.
Builds on
22 of 24 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,446
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
10 more
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2019WinoGrande: An Adversarial Winograd Schema Challenge at Scalecited by 204
- 2022DaViT: Dual Attention Vision Transformerscited by 175
- 2025Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinkingcited by 57
- 2024Multi-Head Mixture-of-Expertscited by 31
- 2024TokenFormer: Rethinking Transformer Scaling with Tokenized Model Parameterscited by 9
- 2025Attention Is Not All You Need: The Importance of Feedforward Networks in Transformer Modelscited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Mixture of Layers with Hybrid Attentioncited by 0
- 2026Mixture of Layers with Hybrid Attention10 May 2026