ConceptioArchivearXiv (OAI Expanded)
arXiv (OAI Expanded)open access

FlashNorm: Fast Normalization for Transformers

Graef, Nils et al. · arxiv_oai_expanded
arXiv (OAI Expanded) · Papers · License: Open Access
Open Source ↗Direct PDF ↓
machine learning

[2407.09577] FlashNorm: Fast Normalization for Transformers Skip to main content Search Submit Donate Log in Search arXiv Press Enter to search · Advanced search Computer Science > Machine Learning arXiv:2407.09577 (cs) [Submitted on 12 Jul 2024 ( v1 ), last revised 24 Apr 2026 (this version, v5)] Title: FlashNorm: Fast Normalization for Transformers Authors: Nils Graef , Filip Makraduli , Andrew Wasielewski , Matthew Clapp View a PDF of the paper titled FlashNorm: Fast Normalization for Transformers, by Nils Graef and 3 other authors View PDF HTML (experimental) Abstract: Normalization layers are ubiquitous in large language models (LLMs) yet represent a compute bottleneck: on hardware with distinct vector and matrix execution units, the RMS calculation blocks the subsequent matrix multiplication, preventing parallel execution. We present FlashNorm, an exact reformulation of RMSNorm followed by a linear layer that (i) eliminates the normalization weights by folding them into the subsequent linear layer, and (ii) defers the scalar RMS normalization to the output of the matrix multiplication, enabling the two operations to execute in parallel. Additionally, by the scale invariance of RMS, an RMSNorm followed by a linear layer followed by another RMSNorm allows the first RMSNorm to be eliminated entirely -- a mathematically identical simplification that removes the pre-attention RMSNorm in models using QKV-normalization (e.g., Gemma~4) and in MLA-models with latent normalization (e.g., DeepSeek-V2, Mistral Small 4, and OpenMythos). The same techniques extend to LayerNorm, Dynamic Tanh (DyT), feed-forward networks with GLU variants, and RoPE-based attention. On an NVIDIA T4 GPU, FlashNorm achieves 33 - 35% lower latency on the norm-then-project operation in the compute-bound (prefill) regime at SmolLM2-135M scale, and 12 - 14% at Llama-7B scale. We verify zero-loss weight folding on three models. Beyond inference speed, FlashNorm simplifies model implementations by reducing parameter tensor count. Watch our explainer video this https URL and see this https URL for code. Subjects: Machine Learning (cs.LG) Cite as: arXiv:2407.09577 [cs.LG] (or arXiv:2407.09577v5 [cs.LG] for this version) https://doi.org/10.48550/arXiv.2407.09577 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Nils Graef [ view email ] [v1] Fri, 12 Jul 2024 00:37:55 UTC (440 KB) [v2] Tue, 1 Apr 2025 23:19:22 UTC (449 KB) [v3] Sun, 1 Jun 2025 22:12:10 UTC (584 KB) [v4] Wed, 22 Apr 2026 03:03:18 UTC (597 KB) [v5] Fri, 24 Apr 2026 18:51:15 UTC (598 KB) Full-text links: Access Paper: View a PDF of the paper titled FlashNorm: Fast Normalization for Transformers, by Nils Graef and 3 other authors View PDF HTML (experimental) TeX Source view license Current browse context: cs.LG < prev | next > new | recent | 2024-07 Change to browse by: cs References & Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Loading... BibTeX formatted citation × loading... Data provided by: Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) IArxiv recommender toggle IArxiv Recommender ( What is IArxiv? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? ) We gratefully acknowledge support from our major funders , member institutions , , and all contributors. About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab) Major funding support from

Related documents

Record · ID 173462 · SHA-256 ab7fa802977a32b3
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.