Revisiting Block-based Quantisation: What is Important for Sub-8-bit LLM Inference?

Cheng Zhang, Jianyi Cheng, Ilia Shumailov, George A. Constantinides, Yiren Zhao

Large Language Models (LLMs) with hundreds of billions of parameters face significant deployment challenges due to the "memory wall" and high computational costs. While 8-bit quantisation is standard, pushing precision below this threshold typically leads to a sharp decline in accuracy. This research explores block-based quantisation as a robust solution for sub-8-bit inference, achieving nearly lossless 6-bit performance and significant efficiency gains.

The Challenge: Activation Outliers

The primary obstacle to low-bit quantisation is the presence of activation outliers—internal values with magnitudes significantly larger than the rest. Standard methods struggle to represent these outliers alongside smaller, precise values. While existing workarounds like SmoothQuant address this, they often introduce computational overhead or are limited to specific hardware architectures.

Block-based Arithmetic Formats

The authors propose revisiting block-based quantisation, where groups (blocks) of numbers share a single scaling factor or exponent. This allows the numerical range to adapt locally to outliers without sacrificing the precision of other values in the tensor.

Comparison of block-based formats: Block Minifloat (BM), Block Floating Point (BFP), and Block Logarithm (BL).

Three primary formats were evaluated:

  • Block Floating Point (BFP): Shares one exponent per block while maintaining individual mantissas.
  • Block Minifloat (BM): Uses a shared exponent bias for a block of minifloats.
  • Block Logarithm (BL): Shares an exponent bias for a block of logarithmic values.

Key Insights: Variance and Depth

A critical finding of this study is the "scaling offset" problem: different layers and tokens require vastly different numerical ranges. Block-based formats naturally address this by providing local scaling. Furthermore, the researchers observed a distinct statistical trend where activation variance increases as data moves deeper into the model.

Activation and weight variance across Transformer layers, showing a general increase in variance with model depth.

This increasing variance makes deeper layers more sensitive to quantisation and more prone to outlier-related errors. To combat this, the researchers employed a Mixed-Precision Search using Tree-structured Parzen Estimators (TPE) to identify sensitive tensors that require higher bit-widths while squeezing others to 4 bits.

Performance and Results

The methodology was tested on the OPT and LLaMA/Vicuna model families using WikiText2 for perplexity and a suite of zero-shot reasoning tasks (ARC, COPA, LAMBADA, etc.).

  • The 6-bit Sweet Spot: 6-bit BFP emerged as a "nearly lossless" format across all tested models without requiring data calibration or retraining.
  • Efficiency Gains: Compared to a float32 baseline, 6-bit BFP achieved a 19× increase in arithmetic density and a 5× increase in memory density.
  • Superiority over 8-bit Integer: The 6-bit approach outperformed standard 8-bit integer quantisation by 2.5× in arithmetic density while maintaining higher accuracy.
  • Accuracy Recovery: For 4-bit precision, mixed-precision search successfully recovered the performance of an OPT-2.7B model on the LAMBADA task from 36.2% to 61.3%.

Conclusion and Future Directions

Block-based quantisation provides a mathematically sound path to sub-8-bit LLM inference. While current GPUs lack native support for BFP, these results highlight the potential for next-generation AI hardware (ASICs and FPGAs) to achieve massive efficiency gains. Future research will focus on "variance-aware" block sizes and integrating these formats directly into the training loop.

Summary updated

BibTeX
@inproceedings{zhang2023revisiting,
  author = {Cheng Zhang and Jianyi Cheng and Ilia Shumailov and George A. Constantinides and Yiren Zhao},
  title = {{Revisiting Block-based Quantisation: What is Important for Sub-8-bit LLM Inference?}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.617},
}
Figure