Towards Efficient Pre-training: Exploring FP4 Precision in Large Language Models

Jiecheng Zhou, Ding Tang, Rong Fu, Boni Hu, Haoran Xu, Yi Wang, Suzhongling, Liang Liu, PeiZhilin, Hengjie Li, Xingcheng Zhang, Weiming ZhangES-FoMo-III @ ICML 2025 · DOI

Abstract

Large Language Model (LLM) pre-training is computationally intensive, driving interest in low-precision formats to reduce energy and time costs. While 8-bit floating-point (FP8) is gaining traction, 4-bit (FP4) training remains challenging due to numerical instability and quantization errors. This paper presents a mixed-precision FP4 pre-training framework that selectively applies higher precision to sensitive components and introduces a two-stage training schedule. Results demonstrate that this approach reduces theoretical compute costs by approximately 30% while maintaining performance parity with standard 16-bit training across various model scales.

Introduction

The computational demands of pre-training Large Language Models (LLMs) have led to a shift toward low-precision numerical representations. While FP8 is becoming an industry standard, pushing precision down to 4-bit (FP4) has historically resulted in training instability and performance degradation. This paper addresses these challenges by identifying the specific sensitivities of Transformer components to quantization noise and proposing a robust mixed-precision recipe that balances efficiency and accuracy.

The Challenges of FP4 Training

FP4 offers a severely restricted numerical range, leading to two primary issues: underflow and attention collapse. As training progresses, gradient values naturally diminish; in FP4, a significant portion of these gradients (approximately 8.6% of weight gradients and 18% of activation gradients) round to zero, a phenomenon known as underflow that halts the learning process. Furthermore, the Multi-Head Attention (MHA) mechanism is highly sensitive to quantization errors. Under pure FP4 training, attention scores tend toward a uniform distribution, preventing the model from learning meaningful token relationships and crippling convergence.

Proposed Methodology

The authors introduce a three-pronged strategy to stabilize FP4 training by identifying which parts of the model can handle 4-bit math and which require higher precision:

  1. Attention Protection: To preserve the integrity of the attention mechanism, Query, Key, Value (QKV) and output projections are maintained in FP8 precision.
  2. Gradient-Sensitive FFN Quantization: Since Feed-Forward Networks (FFNs) represent approximately 57% of total compute, they are targeted for FP4 in the forward pass using a per-block quantization strategy. However, to mitigate underflow in the backward pass, weight gradients are computed in FP8 and activation gradients in FP16.
  3. Target Precious Training Schedule: A two-stage schedule is employed where the model is trained in FP4 for the majority of the duration (90-95%), followed by a brief high-precision (FP16) recovery phase to "wash out" accumulated quantization noise and return the model to an ideal state.
Overview of FP4 training challenges and the proposed mixed-precision architecture.

Experimental Results

The methodology was validated on GPT-2 and LLaMA architectures ranging from 125M to 1B parameters. The proposed FP4-2-stage approach consistently matched the validation loss, WikiText perplexity, and GLUE benchmark performance of FP16 baselines.

A key finding was the necessity of the "Target Precious" recovery phase; without the final 5-10% FP16 training, models suffered a noticeable penalty, such as a 6.3-point increase in WikiText perplexity. By selectively using FP4 in FFN layers, the method achieves a theoretical reduction of computational costs by roughly 30% compared to standard FP16 training.

Training loss curves for LLaMA models comparing FP16, FP4, and the proposed two-stage recovery method.

Conclusion and Future Work

This work demonstrates that FP4 pre-training is viable and efficient when combined with selective precision and a strategic training schedule. While currently limited to simulated hardware and models up to 1B parameters, the findings provide a clear path toward more sustainable LLM development. Future work will focus on hardware-native implementations on next-generation architectures and scaling the methodology to massive, state-of-the-art LLMs with 70B+ parameters.

Summary updated

BibTeX
@misc{zhou2025towards,
  author = {Jiecheng Zhou and Ding Tang and Rong Fu and Boni Hu and Haoran Xu and Yi Wang and Suzhongling and Liang Liu and PeiZhilin and Hengjie Li and Xingcheng Zhang and Weiming Zhang},
  title = {{Towards Efficient Pre-training: Exploring FP4 Precision in Large Language Models}},
  year = {2025},
  eprint = {2502.11458},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.11458},
}
Figure