SLaNC: Static LayerNorm Calibration
Not on the map. Why?
Abstract (arXiv)
The ever increasing sizes of Large Language Models (LLMs) beyond hundreds of billions of parameters have generated enormous pressure on the manufacturers of dedicated hardware accelerators and made the innovative design of the latter one of the most rapidly expanding fields of the AI industry. Various approaches have been explored to enable efficient and accurate processing of LLMs on the available accelerators given their computational and storage limitations. Among these, various quantization techniques have become the main focus of the community as a means of reducing the compute, communication and storage requirements. Quantization to lower precision formats naturally poses a number of challenges caused by the limited range of the available value representations. When it comes to processing the popular Transformer models on hardware, one of the main issues becomes calculation of the LayerNorm simply because accumulation of the variance requires a much wider dynamic range than the hardware enables. In this article, we address this matter and propose a computationally-efficient scaling technique that can be easily applied to Transformer models during inference. Our method suggests a straightforward way of scaling the LayerNorm inputs based on the static weights of the immediately preceding linear layers. The scaling factors are computed offline, based solely on the linear layer weights, hence no latency or computational overhead is added during inference. Most importantly, our technique ensures that no numerical issues such as overflow or underflow could happen during the compute. This approach offers smooth, accurate and resource-effective inference across a wide range of hardware architectures. The article provides theoretical justification as well as supporting numerical simulations.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 32 of its 35 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
32 of 35 references.
References · 32
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 7,005
- 2016Layer Normalizationcited by 5,669
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2020Rethinking Attention with Performerscited by 1,601
- 2018Group Normalizationcited by 1,524
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
20 more
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,386
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2017Mixed Precision Trainingcited by 1,156
- 2023SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shotcited by 1,121
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2021A Survey of Quantization Methods for Efficient Neural Network Inferencecited by 815
- 2024KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantizationcited by 591
- 2022ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformerscited by 526
- 2021A White Paper on Neural Network Quantizationcited by 472
- 2022cosFormer: Rethinking Softmax in Attentioncited by 213
- 2023Microscaling Data Formats for Deep Learningcited by 152
- 2021Understanding and Overcoming the Challenges of Efficient Transformer Quantizationcited by 141
- 2018NVIDIA Tensor Core Programmability, Performance & Precisioncited by 79
- 2021Software-Hardware Co-design for Fast and Scalable Training of Deep Learning Recommendation Modelscited by 78
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Modelscited by 76
- 2023With Shared Microexponents, A Little Shifting Goes a Long Waycited by 50
- 2023On the Expressivity Role of LayerNorm in Transformers' Attentioncited by 33
- 2024SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalizationcited by 17
- 2024Accurate Block Quantization in LLMs with Outlierscited by 4
- 2022Block Format Error Bounds and Optimal Block Size Selectioncited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025LLM Inference Acceleration via Efficient Operation Fusion
- 2026KITE: KV-Invariant Transformer Expansion for Efficient Agentic LLM Scaling
- 2023Efficient LLM Inference on CPUs
- 2024MixPE: Quantization and Hardware Co-design for Efficient LLM Inference
- 2024Highly Optimized Kernels and Fine-Grained Codebooks for LLM Inference on Arm CPUs
- 2024A Comprehensive Study on Quantization Techniques for Large Language Models
- 2024LLMEasyQuant: Scalable Quantization for Parallel and Distributed LLM Inference
- 2024FlattenQuant: Breaking Through the Inference Compute-bound for Large Language Models with Per-tensor Quantization