MF-QAT: Multi-Format Quantization-Aware Training for Elastic Inference

Zifei Xu, Sayeh Sharify, Hesham MostafaarXiv 2026

TL;DR

Standard quantization-aware training (QAT) locks a model into a single numerical format, making deployment rigid and brittle. This paper introduces MF-QAT, a method to train a single LLM that remains highly robust across multiple integer and floating-point microscaling formats. Combined with a novel Slice-and-Scale technique, it allows a single 8-bit checkpoint to be dynamically down-quantized on-the-fly at runtime with virtually no accuracy loss, enabling truly elastic inference serving.

What Problem Does This Paper Address?

To deploy large language models (LLMs) within strict latency and memory budgets, engineers rely heavily on quantization (reducing the bit-precision of weights). However, production environments are highly dynamic: different hardware accelerators support different numerical formats (like integer vs. floating-point microscaling), and a single device might need to switch precisions dynamically based on current system load or batch constraints.

Standard Quantization-Aware Training (QAT) forces a brittle dependency between training and deployment because it optimizes a model for one specific format. Storing separate, full-sized model checkpoints for every possible precision target is prohibitively expensive. The authors tackle a fundamental question: Can we train a single model that is robust across multiple quantization formats and elastically scale its precision at inference time with minimal loss?

Methods

The authors propose an end-to-end pipeline consisting of three core components:

  1. Multi-Format Training Schedule: Instead of optimizing for a single bit-width, MF-QAT trains a model sequentially across multiple formats (MXINT and MXFP) with bit-widths $b \in \{2, 4, 6, 8\}$. Crucially, they train in increasing bit order ($2 \rightarrow 4 \rightarrow 6 \rightarrow 8$). Because lower precisions require larger weight updates to escape quantization bins, training in this direction prevents lower-precision steps from destabilizing the high-precision configurations learned earlier.
  2. Slice-and-Scale (SS) Format Conversion: To enable fast runtime transitions without decompressing weights back to FP32, the authors introduce Slice-and-Scale for both integer (SSMXINT) and floating-point (SSMXFP) microscaling formats. For integers, this drops the least-significant bits (effectively a right-shift operation) and scales the shared block factor to preserve the represented real-valued range.
  3. Anchor Format Storage: During deployment, only a single high-precision "anchor" format checkpoint (MXINT8 or MXFP8) is stored. At runtime, the system elastically down-quantizes this anchor on-demand to lower precisions based on immediate hardware constraints.

Datasets

  • Finetuning: WikiText-2 training split (using a lightweight setup of just 128 examples).
  • Evaluation:
  • Language Modeling: WikiText-2 validation split (measured via perplexity).
  • Downstream Common Sense & Understanding: HellaSwag (zero-shot), MMLU (zero-shot), and MathQA (zero-shot).
  • Multimodal Vision-Language: ChartQA (used to evaluate Qwen3-VL models on visual question answering).

Key Insights and Ideas

  • Precision-Specific QAT Over-Specializes: The authors demonstrate that standard single-format QAT models are highly brittle. For instance, an 8-bit optimized model degrades sharply when evaluated at 2 or 3 bits, while a 2-bit optimized model performs poorly if scaled up to higher precisions.
  • Generalization to Unseen Formats: Remarkably, training a model on even bit-widths ({2, 4, 6, 8}) provides excellent "zero-shot" generalization to unseen intermediate bit-widths ({3, 5, 7}) during inference.
  • Decoupling Training from Deployment: Slice-and-Scale proves that full-precision master weights are unnecessary for post-training down-conversion. Operating directly on the compressed 8-bit anchor format yields nearly identical numerical fidelity to direct quantization from scratch.

Key Results

  • Tracking the Envelope: MF-QAT closely tracks the upper-bound performance of precision-specific single-format QAT across the entire evaluation range, eliminating the trade-off of training a generalized model.
Figure 1: Multi-format QAT on Qwen3-4B-Base, trained for one epoch on 128 WikiText-2 examples. Left: MXINT formats. Right: MXFP formats. For each training variant, we show the result at the best learning rate, chosen as the one with the lowest evaluation loss among the three learning rates in Section 3.2. The x-axis denotes evaluation quantization bit-width, and the y-axis denotes WikiText-2 validation perplexity after post-training quantization to the corresponding bit-width. The horizontal dashed line marks the original high-precision model (FP16/BF16/FP32, depending on pretraining). The black solid line corresponds to full-precision fine-tuning, the purple solid line to multi-format QAT, and the other colored solid lines to single-format QAT.
  • Downstream Robustness: Across six distinct models from the Llama and Qwen families, MF-QAT consistently stays within 1% accuracy of the best-performing single-format baselines on MMLU, MathQA, and HellaSwag. Even at ultra-low 2-bit configurations, accuracy remains within 3% of the specialized 2-bit baseline.
  • Fidelity of Slice-and-Scale: End-to-end language modeling evaluations show that the proposed Slice-and-Scale conversion achieves a perplexity curve nearly identical to direct target-format quantization.
Figure 2: WikiText-2 perplexity for Llama-3.2-1B, comparing direct MXINT quantization and SSMXINT. Left: Varying bit precision at block size 64. Right: Varying block size at 4-bit precision. Horizontal dashed line denotes the baseline model.

Limitations and Future Work

  • Overfitting on Larger Models: For models larger than 2B parameters, the authors observed severe overfitting when running multi-format QAT over multiple epochs. They mitigated this by restricting training to a single epoch with balanced steps per format, but scaling multi-format training dynamics to much larger models remains an open challenge.
  • Weight-Only Quantization: The study focuses strictly on weight-only quantization within the text decoder stack (excluding the lm_head). Extending this elastic precision framework to activations is a necessary next step for full hardware acceleration.
  • MXFP Hardware Overhead: While integer down-conversion (SSMXINT) maps cleanly to hardware bit-shifting, floating-point down-conversion (SSMXFP) requires explicit division and quantization due to its non-integer nature, which may introduce minor runtime overhead depending on accelerator support.

Summary updated

BibTeX
@misc{xu2026mf,
  author = {Zifei Xu and Sayeh Sharify and Hesham Mostafa},
  title = {{MF-QAT: Multi-Format Quantization-Aware Training for Elastic Inference}},
  year = {2026},
  eprint = {2604.00529},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.00529},
}
Figure