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

Jiecheng Zhou, Ding Tang, Rong Fu, Boni Hu, Haoran Xu +6 more
2/17/2025
cs.LGcs.AI
transformer-attention

No confident code implementation found for this paper.

Abstract

The burgeoning computational demands for training large language models (LLMs) necessitate efficient methods, including quantized training, which leverages low-bit arithmetic operations to reduce costs. While FP8 precision has shown potential, leveraging FP4 remains challenging due to inherent quantization errors and limited representation capability.

Show full abstract

Based on the Transformer architecture, we present an FP4 training scheme for LLMs, overcoming these obstacles through mixed-precision quantization strategies tailed for different modules and training stages. This allows us to apply the precision level suitable to distinct components within the model, ensuring that multi-head attention and linear layers are handled appropriately. Our pretraining recipe ensures stability in backpropagation by incorporating fine-grained quantization methods with a target precision training schedule. Experimental results demonstrate that our FP4 training scheme achieves accuracy comparable to BF16 and FP8, with smaller theoretical computational cost. With the advent of next-generation hardware supporting FP4, our method sets the foundation for efficient ultra-low precision training.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhou2025towards,
  title  = {Towards Efficient Pre-training: Exploring FP4 Precision in Large Language Models},
  author = {Jiecheng Zhou and Ding Tang and Rong Fu and Boni Hu and Haoran Xu and Yi Wang and Zhilin Pei and Zhongling Su and Liang Liu and Xingcheng Zhang and Weiming Zhang},
  year   = {2025},
  eprint = {2502.11458},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11458v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.11458.svg)](https://codeofpaper.com/paper/2502.11458)

Discussion