SNIP: An Adaptive Mixed Precision Framework for Subbyte Large Language Model Training
Yunjie Pan, Yongyi Yang, Hanmei Yang, Scott Mahlke
TL;DR
SNIP introduces a fine‑grained adaptive mixed‑precision framework for LLM pretraining that selects subbyte per‑layer formats (FP8/FP4) via an ILP optimization guided by two training‑quality metrics: forward loss divergence and backward weight divergence. By periodically collecting statistics, estimating divergences, and solving a knapsack‑like ILP (extended to handle pipeline parallelism), SNIP achieves substantial FLOP reduction (up to 80% FP4 usage) while maintaining near BF16 accuracy across 1B–70B models. The approach is implemented as an asynchronous system that integrates with standard training, incurring modest overhead and showing robust performance across checkpoints and model scales. Theoretical foundations link quantization perturbations to measurable losses and weight updates, enabling reliable per‑layer decisions and practical deployment in large‑scale LLM pretraining pipelines.
Abstract
Training large language models (LLMs) efficiently while preserving model quality poses significant challenges, particularly with subbyte precision supported by state-of-the-art GPUs. Current mixed-precision training approaches either apply uniform precision to all GEMM operations or rely on heuristic-based methods that fail to generalize during training, leading to suboptimal convergence and instability. To address these challenges, this paper introduces SNIP, a fine-grained adaptive mixed-precision training framework for LLM pretraining that supports subbyte precision. SNIP periodically collects statistics on activations, gradients, and optimizer states to assess the precision loss impact on model quality. We define two key metrics: loss divergence in the forward pass, caused by quantization-induced increases in training loss, and weight divergence in the backward pass, which measures error propagation through gradients affecting model updates. These metrics guide an Integer Linear Programming (ILP) problem that systematically optimizes layerwise precision to minimize overall quality loss while meeting efficiency targets. Experiments on 1B, 3B, 7B and 70B Llama-like models demonstrate that SNIP consistently outperforms existing baselines, reducing FLOPs by up to 80% while preserving model quality across different model sizes and training phases with minimal computational overhead.
