paper-with-me

홈 › Papers

Mitigating Quantization Errors Due to Activation Spikes in GLU-Based LLMs

2024-05-23 · Jaewoo Yang, Hayun Kim, Younghoon Kim

Modern large language models (LLMs) have established state-of-the-art performance through architectural improvements, but still require significant computational cost for inference. In an effort to reduce the inference cost, post-training quantization (PTQ) has become a popular approach, quantizing weights and activations to lower precision, such as INT8. In this paper, we reveal the challenges of activation quantization in GLU variants, which are widely used in feed-forward network (FFN) of modern LLMs, such as LLaMA family. The problem is that severe local quantization errors, caused by excessive magnitudes of activation in GLU variants, significantly degrade the performance of the quantized LLM. We denote these activations as activation spikes. Our further observations provide a systematic pattern of activation spikes: 1) The activation spikes occur in the FFN of specific layers, particularly in the early and late layers, 2) The activation spikes are dedicated to a couple of tokens, rather than being shared across a sequence. Based on our observations, we propose two empirical methods, Quantization-free Module (QFeM) and Quantization-free Prefix (QFeP), to isolate the activation spikes during quantization. Our extensive experiments validate the effectiveness of the proposed methods for the activation quantization, especially with coarse-grained scheme, of latest LLMs with GLU variants, including LLaMA-2/3, Mistral, Mixtral, SOLAR, and Gemma. In particular, our methods enhance the current alleviation techniques (e.g., SmoothQuant) that fail to control the activation spikes. Code is available at https://github.com/onnoo/activation-spikes.

📄 PDF Abstract BibTeX arXiv:2405.14428

Code (1)

onnoo/activation-spikes 공식 구현 pytorch

Tasks

Quantization

Methods 이 논문이 사용한 방법론

LLaMA LLaMA is a collection of foundation language models ranging from 7B to 65B parameters. It is based on the transformer architecture with various improvements that were…

Similar Papers 제목 키워드 기반

Massive Spikes in LLMs are Bias Vectors: Mechanistic Uncovering and Spike-Free Quantization

2026-06-01 · Yung-Chin Chen, Chung Peng Lee, Ze-Wei Liou, Naveen Verma arxiv

Massive activation spikes in Large Language Models (LLMs) severely degrade quantization by stretching dynamic ranges. While prior hypotheses characterize these as high-level scalar biases, we argue that they are merely t…

Precision Where It Matters: A Novel Spike Aware Mixed-Precision Quantization Strategy for LLaMA-based Language Models

2025-04-30 · Lucas Maisonnave, Cyril Moineau, Olivier Bichler, Fabrice Rastello

Large Language Models (LLMs) have demonstrated remarkable capabilities in various natural language processing tasks. However, their size presents significant challenges for deployment and inference. This paper investigat…

Quantization

SERQ: Saliency-Aware Low-Rank Error Reconstruction for LLM Quantization

2026-03-09 · Yeonsik Park, Hyeonseong Kim, Seungkyu Choi arxiv

Post-training quantization (PTQ) has emerged as a prevailing technique for deploying large language models (LLMs) efficiently in terms of both memory and computation, across edge devices and server platforms. Existing PT…

Achieving binary weight and activation for LLMs using Post-Training Quantization

2025-04-07 · Siqing Song, Chuang Wang, Ruiqi Wang, Yi Yang 외

Quantizing large language models (LLMs) to 1-bit precision significantly reduces computational costs, but existing quantization techniques suffer from noticeable performance degradation when using weight and activation p…

Quantization

FreeAct: Freeing Activations for LLM Quantization

2026-03-02 · Xiaohao Liu, Xiaobo Xia, Manyi Zhang, Ji-Fu Li 외 arxiv

Quantization is pivotal for mitigating the significant memory and computational overhead of Large Language Models (LLMs). While emerging transformation-based methods have successfully enhanced quantization by projecting …