Abstract
The computational demands of training Large Language Models (LLMs) continue to outpace hardware advancements. While 8-bit floating-point (FP8) precision has become a standard for efficiency, 4-bit training remains a challenge due to accuracy degradation and lack of hardware-optimized software. We present Quartet, a framework for native 4-bit (FP4) training that achieves near-zero accuracy loss. By leveraging a novel scaling law analysis and optimized CUDA kernels for NVIDIA’s Blackwell architecture, Quartet delivers up to a 1.6x speedup over FP8 and a 2.9x speedup over BF16.
Introduction
As model parameters and dataset sizes scale, the energy and time required for training become prohibitive. NVIDIA’s Blackwell architecture introduces native support for 4-bit microscaling formats (MXFP4), promising a theoretical doubling of throughput over FP8. However, realizing these gains requires overcoming significant hurdles: maintaining numerical stability, avoiding high-precision fallbacks that bottleneck performance, and developing efficient end-to-end software support.
Methodology: The Quartet Framework
Quartet addresses these challenges through a four-pillared approach:
- Induced Scaling Laws: The authors model quantization error as a reduction in "effective" parameters (forward pass) and "effective" data (backward pass). This theoretical framework predicts the optimal precision for any given compute budget.
- Forward-Pass Optimization (QuEST): To minimize Mean Squared Error (MSE), the QuEST algorithm employs Hadamard rotations to smooth outliers and utilizes RMSE-based clipping.
- Backward-Pass Optimization (RTN): Recognizing that gradient alignment is more critical than low MSE in the backward pass, Quartet uses Round-to-Nearest (RTN) quantization with random Hadamard transforms to ensure unbiased gradient estimation.
- Hardware-Optimized Kernels (QuTLASS): These algorithms are implemented in CUDA kernels tailored for Blackwell’s
tcgen05.mmainstructions. By fusing Hadamard transforms and quantization, the pipeline avoids memory bottlenecks.
Experimental Results
The framework was validated by pre-training Llama-style models (30M to 7B parameters) on the C4 dataset and evaluating them on benchmarks such as HellaSwag, WinoGrande, and ARC-easy.
Scaling and Optimality
A key insight is that quantization is a resource trade-off. While FP4 is slightly less accurate than FP8 per operation, its increased speed allows for training larger models or using more data within the same time budget. Scaling law analysis demonstrates that for sufficiently large models or datasets, FP4 becomes the mathematically optimal training precision.
Performance Gains
On an NVIDIA RTX 5090, Quartet achieves:
- 2x speedup for individual linear layer computations compared to FP8.
- 1.6x end-to-end speedup for full training cycles over optimized FP8.
- 2.9x end-to-end speedup compared to BF16 baselines.
Crucially, these speedups do not come at the cost of stability; a 7B parameter model was successfully trained, showing performance nearly indistinguishable from FP8.
Discussion and Limitations
While Quartet sets a new frontier for low-precision training, its current high-performance implementation is specific to NVIDIA Blackwell GPUs. Future work is required to port these optimizations to other architectures and to investigate the impact of 4-bit formats on large-scale distributed training communication (e.g., All-Reduce). Additionally, exploring even lower precisions, such as 2-bit formats, remains an open research direction.
Conclusion
Quartet demonstrates that native FP4 training is not only feasible but can be optimal for large-scale LLM development. By co-designing scaling laws, quantization algorithms, and hardware-specific kernels, the framework provides a significant leap in training efficiency without compromising model quality.
Summary updated