Manuscript Offprint

arXiv:2611.00403

MXCode: Vector Quantization for MX-Native Inference at Scale

Gaurav Kolhe, Cansu Demirkiran, Shubhi Tyagi, Sulaiman Sadiq, Boyao Wang, Richard Wang, Maximiliana Behnke, Shreyas Labhsetwar, Levi Melnick, Matthew Mattina, Partha Maji

ABSTRACT

Memory capacity and bandwidth are major bottlenecks in large language model (LLM) inference, motivating weight compression beyond conventional 4-bit quantization. Meanwhile, FP4 computation is becoming a standard capability in modern AI accelerators, with microXcaling (MX) formats enabling efficient W4A4 (Weights & Activations in 4 bit) matrix multiplication. Vector quantization (VQ) enables approximately 2-bit weight storage, roughly halving the storage cost of MXFP4 formats. However, existing VQ approaches often rely on codebook representations that are not directly compatible with native FP4 computation. We present MXCode (MX-Native Codebook Quantization), a framework that bridges ultra-low-bit VQ compression and MX-native FP4 computation. MXCode introduces three complementary strategies: PostScale, which quantizes learned codebooks to MXFP4; PreScale, which extracts MX scales before codebook learning; and PreScale+, which additionally compresses these scales using VQ. Together, they explore tradeoffs among quantization quality, scale overhead, and codebook granularity. All three strategies reconstruct MX-native W4A4 operands without materializing intermediate high-precision weight tensors. We evaluate MXCode on three industrial-scale LLMs, including Qwen3 (235B), DeepSeek-R1 (671B), and GLM-5.2 (753B), using the Microsoft MX Emulation Library¹ to assess model quality under MX-compatible numerics. MXCode achieves approximately 2 bits per weight while maintaining competitive model quality, with workload-dependent degradation. In GB300 serving experiments with Qwen3 (235B) model, MXCode approximately halves model-load memory relative to Native FP4 while sustaining near-Native-FP4 serving throughput, and it reduces P90 TTFT by up to 94.5% under memory-constrained prefix reuse compared to Native FP4. These results, demonstrated through software-based reconstruction on existing FP4 hardware, inform the ongoing development and evaluation of MXCode for future MX-native inference systems.

1 INTRODUCTION

Large language model (LLM) inference is increasingly constrained by memory capacity and bandwidth. Model weights drive accelerator memory requirements, replication density, and capacity for runtime state such as the KV cache. During autoregressive decoding, repeated weight transfers can dominate memory traffic, particularly at low-to-moderate batch sizes. While 4-bit quantization reduces these costs, further compression is desirable for efficient large-scale serving.

Sub-4-bit compression must contend with hardware support centered on FP4. Modern AI accelerators, including Microsoft MAIA (Xu et al., 2026), NVIDIA Blackwell (NVIDIA), and AMD Instinct MI350-series (AMD), support native MXFP4 (microXcaling) compute (Open Compute Project, 2023). These formats combine low-precision elements with shared block scales to enable effi-

cient FP4 computation. However, storage precision need not match compute precision. Storing weights below four bits per element (BPE) while retaining native FP4 execution can reduce model footprint and HBM traffic without sacrificing low-precision compute.

Vector quantization (VQ) enables ultra-low-bit weight compression by representing weight vectors with compact codebook indices, achieving approximately 2 BPE or lower. However, conventional VQ approaches typically employ FP16 or INT8 codebooks without explicitly considering MX block-level scaling (Egiazarian et al., 2024; Tseng et al., 2024; van Baalen et al., 2025; Liu et al., 2024). Some approaches also use large codebooks, such as 65,536 entries in AQLM (Egiazarian et al., 2024), increasing lookup footprint and potentially limiting on-chip caching. Mapping these representations onto MXFP4 hardware requires either quantizing codebooks into MX-compatible formats, potentially introducing block-scale distortion, or reconstructing higher-precision weights before conversion, increasing data movement and execution overhead. Ultra-low-bit compression for MX-native inference is therefore a hardware-software co-design problem involving quantization quality, codebook

¹https://github.com/microsoft/microxcaling

*Equal contribution ¹Microsoft ²Carnegie Mellon University. Correspondence to: Partha Maji parthamaji@microsoft.com.

footprint, scale handling, and operand reconstruction. Furthermore, some VQ methods require gradient-based fine-tuning through codebooks, complicating deployment of large-scale pretrained models with frozen weights (Egiazarian et al., 2024; Tseng et al., 2024).

MXCode addresses these challenges through an MX-native VQ framework combining approximately 2-bit weight storage with native W4A4 computation. Its three strategies, PostScale, PreScale, and PreScale+, jointly explore codebook quantization, MX scale extraction, and scale compression to balance numerical fidelity, storage efficiency, and execution compatibility. MXCode uses one-shot, gradient-free post-training quantization on frozen pretrained weights, avoiding retraining or backpropagation through codebooks and easing adoption for large-scale and third-party LLMs.

Industrial Context. MXCode is being developed and evaluated for integration into large-scale LLM inference systems, with the objective of reducing weight-memory requirements while preserving native MXFP4 computation. The intended integration combines compact codebook-indexed weight storage with FP4 operand reconstruction in the inference execution path. While native accelerator integration remains under development, we validate MXCode's numerical behaviour and serving implications through a software-based implementation on NVIDIA GB300 GPUs. This enables evaluation of compression efficiency, reconstruction overhead, model replication, and KV-cache capacity on existing FP4 hardware, providing practical guidance for ongoing hardware–software co-design and deployment planning.

Our main contributions are:

  • MX-native vector quantization. We introduce MX-Code, combining approximately 2-bit weight storage with native W4A4 computation through FP4-compatible codebooks and operand reconstruction without intermediate high-precision weights.

  • Compression strategies and large-scale validation. We develop PostScale, PreScale, and PreScale+, exploring storage–quality trade-offs across three industrial-scale LLMs (235B–753B parameters).

  • GPU serving demonstration. On NVIDIA GB300 GPUs, MXCode approximately halves model-load memory while sustaining near-Native-FP4 throughput, enabling 2× data-parallel replication at comparable memory headroom and reducing P90 TTFT by up to 94.5% under prefix reuse compared to Native FP4.