Table of Contents
Fetching ...

Interpreting the Effects of Quantization on LLMs

Manpreet Singh, Hassan Sajjad

TL;DR

The paper investigates how 4-bit and 8-bit quantization affects internal representations of multiple open-source LLMs. It combines confidence and calibration analyses with neuron-attribution, activation, and correlation measures to assess reliability under compression. Key findings show calibration remains largely stable, dead-neuron counts are relatively unchanged, and salience and redundancy patterns vary by model and task, with no drastic degradation that would deter quantization. The work highlights the need for dataset- and model-specific interpretation when deploying quantized LLMs, and supports quantization as a feasible compression technique under context-aware evaluation.

Abstract

Quantization offers a practical solution to deploy LLMs in resource-constraint environments. However, its impact on internal representations remains understudied, raising questions about the reliability of quantized models. In this study, we employ a range of interpretability techniques to investigate how quantization affects model and neuron behavior. We analyze multiple LLMs under 4-bit and 8-bit quantization. Our findings reveal that the impact of quantization on model calibration is generally minor. Analysis of neuron activations indicates that the number of dead neurons, i.e., those with activation values close to 0 across the dataset, remains consistent regardless of quantization. In terms of neuron contribution to predictions, we observe that smaller full precision models exhibit fewer salient neurons, whereas larger models tend to have more, with the exception of Llama-2-7B. The effect of quantization on neuron redundancy varies across models. Overall, our findings suggest that effect of quantization may vary by model and tasks, however, we did not observe any drastic change which may discourage the use of quantization as a reliable model compression technique.

Interpreting the Effects of Quantization on LLMs

TL;DR

The paper investigates how 4-bit and 8-bit quantization affects internal representations of multiple open-source LLMs. It combines confidence and calibration analyses with neuron-attribution, activation, and correlation measures to assess reliability under compression. Key findings show calibration remains largely stable, dead-neuron counts are relatively unchanged, and salience and redundancy patterns vary by model and task, with no drastic degradation that would deter quantization. The work highlights the need for dataset- and model-specific interpretation when deploying quantized LLMs, and supports quantization as a feasible compression technique under context-aware evaluation.

Abstract

Quantization offers a practical solution to deploy LLMs in resource-constraint environments. However, its impact on internal representations remains understudied, raising questions about the reliability of quantized models. In this study, we employ a range of interpretability techniques to investigate how quantization affects model and neuron behavior. We analyze multiple LLMs under 4-bit and 8-bit quantization. Our findings reveal that the impact of quantization on model calibration is generally minor. Analysis of neuron activations indicates that the number of dead neurons, i.e., those with activation values close to 0 across the dataset, remains consistent regardless of quantization. In terms of neuron contribution to predictions, we observe that smaller full precision models exhibit fewer salient neurons, whereas larger models tend to have more, with the exception of Llama-2-7B. The effect of quantization on neuron redundancy varies across models. Overall, our findings suggest that effect of quantization may vary by model and tasks, however, we did not observe any drastic change which may discourage the use of quantization as a reliable model compression technique.

Paper Structure

This paper contains 28 sections, 13 equations, 4 figures, 10 tables.

Figures (4)

  • Figure 1: Accuracy of subject models within different quantizations.
  • Figure 2: Average confidence of subject models under different quantizations.
  • Figure 3: Adaptive Calibration Error (ACE) for subject models within different quantizations (lower is better).
  • Figure 4: Neurons pair count based on correlation for Phi-2 and Llama-2-7B.