Scaling Laws for Floating Point Quantization Training

Xingwu Sun, Shuaipeng Li, Ruobing Xie, Weidong Han, Kan Wu, Zhen Yang, Yixing Li, An Wang, Jinbao Xue, Yu Cheng, Yangyu Tao, Zhanhui Kang, Chengzhong Xu, Di Wang, Jie Jiang · OpenReview

TL;DR

This paper introduces "Capybara," a novel scaling law that accurately predicts the performance of Large Language Models (LLMs) trained with floating-point (FP) quantization. It provides crucial insights into how to optimize FP quantization settings (exponent, mantissa, block size) for better efficiency and performance, suggesting an optimal precision range of 4-8 bits for cost-effectiveness.

What Problem Does This Paper Address?

Training and deploying large language models (LLMs) is computationally expensive. Quantization, a technique to reduce model size and computational cost by using lower-precision numerical formats, is a popular solution. While previous research has explored scaling laws for integer quantization, there's a significant gap in understanding how floating-point (FP) quantization, which is more prevalent in production due to its better accuracy at low bit rates, affects LLM performance. Existing FP quantization research is superficial, and existing scaling laws don't adequately capture the nuanced interplay of FP-specific parameters like exponent and mantissa bits, or the impact of scaling factor granularity. This paper aims to fill this gap by developing a comprehensive scaling law for FP quantization training.

Methods

The authors propose a new scaling law, dubbed "Capybara," which extends classical LLM scaling laws (like Chinchilla and OpenAI) to incorporate FP quantization parameters. Their approach involves:

  • Comprehensive Exploration: Systematically training hundreds of LLMs with varying model sizes (N), data sizes (D), exponent bits (E), mantissa bits (M), and block sizes (B) for scaling factors.
  • Unified Scaling Law Formulation: Developing a mathematical model (Eq. 18) that captures the combined effects of these parameters on the validation loss.
  • Parameter Fitting: Using experimental data to fit the coefficients of the Capybara scaling law.
  • Implication Analysis: Deriving practical insights from the scaling law regarding optimal FP layouts, critical data sizes, and compute-optimal precision.

Datasets

The paper does not explicitly name specific datasets used for training the LLMs. However, it mentions using a subset of the "Dolma V1.7 dataset" and training on various "billion tokens" for different model sizes, implying large-scale pre-training data.

Key Insights and Ideas

  • Exponent vs. Mantissa: Exponent bits have a slightly larger impact on model performance than mantissa bits. The paper provides optimal exponent-mantissa bit ratios for different total bit counts.
  • Critical Data Size: There's a "critical data size" beyond which adding more training data can actually degrade LLM performance, especially under low-precision FP quantization. This suggests that overtraining can occur even with more data.
  • Knowledge Intensity: The negative impact of low-precision training is amplified by the "knowledge intensity" of the LLM (related to model and data size).
  • Optimal Precision Range: For a good balance between cost and performance, the optimal FP quantization precision should generally lie between 4-8 bits.
  • Compute-Optimal Precision: The optimal precision is directly proportional to computational power, but this relationship holds within a wide computational power range.

Key Results

  • The proposed Capybara scaling law (Eq. 18) demonstrates significantly better prediction accuracy for FP quantized LLM training compared to previous approaches (as shown in Figure 1).
  • The paper provides a unified framework that considers model size (N), data size (D), exponent bits (E), mantissa bits (M), and block size (B) for predicting LLM loss.
  • Analysis suggests that for a given computational budget, the optimal precision for LLMs consistently falls within the 4-8 bits range across a broad spectrum of data sizes.
  • The paper quantifies the trade-offs between different quantization strategies (channel-wise, tensor-wise) and their impact on scaling laws.

Limitations and Future Work

  • Model Size: While the Capybara scaling law shows good performance on larger models (1.2B, 7B, 70B), its applicability to even larger models (e.g., trillion-parameter scale) is a direction for future work.
  • Architectures: The current scaling laws are derived for the Transformer architecture. Future research should explore their applicability to other LLM architectures like Mamba.
  • Quantization Methods: The study focuses on classical FP quantization strategies. Future work should investigate newer low-bit quantization methods and hardware.
  • Data Size Impact: The paper highlights the critical data size phenomenon, suggesting that future work could further explore the complex relationship between data volume and quantization effectiveness.

Summary updated

BibTeX
@inproceedings{sun2025scaling,
  author = {Xingwu Sun and Shuaipeng Li and Ruobing Xie and Weidong Han and Kan Wu and Zhen Yang and Yixing Li and An Wang and Shuai Li and Jinbao Xue and Yu Cheng and Yangyu Tao and Zhanhui Kang and Chengzhong Xu and Di Wang and Jie Jiang},
  title = {{Scaling Laws for Floating Point Quantization Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=Vn5iWX9sQS},
}
Figure