Source-linked AI summary

MosaicQuant: Inlier-Outlier Disaggregation for Unified 4-Bit LLM Quantization

Yangjia Hu, Haodong Wang, Zicong Hong, Qianli Liu, Quanxin Shou, Jian Lin, Song Guo, Xiaowei Shen, Xiangjun Huang, Dian Wang, Jian Yang

arXiv:2606.15652v1cs.LGcs.CL

TL;DR

Low-bit quantization struggles to represent both common inliers and large-magnitude outliers, while mixed-precision approaches add conversion and data movement. MosaicQuant combines a dense 4-bit base with sparse 4-bit residuals, and ZipperEngine fuses their computation. Experiments report near-FP16 accuracy and up to 1.24× speedup over the 16-bit baseline.

  • Problem

    Low-bit representations can lose accuracy because they struggle to capture both dense inliers and rare large-magnitude outliers, while mixed-precision methods add data movement and format conversion.

    Source: §1 · p. 2
  • Method

    MosaicQuant uses a dense 4-bit weight base plus a sparse 4-bit residual, and ZipperEngine fuses residual computation into the dense kernel.

    Source: §1 · pp. 2–3
  • Results

    MosaicQuant preserves near-FP16 accuracy and achieves up to 1.24× speedup over the 16-bit baseline on an NVIDIA RTX 4090 GPU.

    Source: §6 · p. 10
  • Takeaways & Limitations

    The unified low-bit representation and fused execution support efficient LLM serving without sacrificing the regularity of uniform 4-bit execution.

    Source: §6 · p. 10

Abstract

from arXiv · show

4-bit quantization significantly reduces the memory footprint and accelerates the inference of large language models (LLMs). However, its limited bit-width representation struggles to faithfully capture both dense common values (\emph{inliers}) and rare large-magnitude values (\emph{outliers}), causing substantial accuracy degradation. Existing mixed-precision methods mitigate this by retaining outliers in high precision, but at the cost of breaking the uniformity of low-bit execution, introducing precision conversion and extra data movement that undermine practical speedup. We propose \textbf{MosaicQuant}, a unified 4-bit LLM quantization paradigm built on a novel principle of \emph{inlier--outlier disaggregation}. Rather than elevating outlier precision, MosaicQuant quantizes the full weight matrix into a dense 4-bit base component, where inliers are captured faithfully while outlier are inevitably quantized. A sparse 4-bit residual component is then introduced to compensate for these quantization errors, selectively targeting the most error-critical weight blocks where output distortion is shown to be concentrated. However, a unified representation alone is insufficient, as na\"ively executing the sparse residual as a separate kernel still breaks the unified low-bit inference pipeline. To bridge this gap, we introduce \textbf{ZipperEngine}, which fuses sparse block computation into the dense 4-bit GEMM kernel via an overlapped pipeline, unifying not only the representation but also the execution into a single coherent low-bit inference pipeline. Extensive experiments on LLaMA3 and Qwen3 demonstrate that MosaicQuant preserves near-FP16 accuracy while achieving up to $1.24\times$ speedup over the W16A16 baseline.

1 Introduction

As LLMs scale, memory and computation constrain deployment, while low-bit quantization can lose accuracy on both common inliers and large-magnitude outliers. MosaicQuant uses a dense 4-bit base and sparse 4-bit residual, with ZipperEngine fusing residual computation into the dense kernel.

1 Introduction

  • MosaicQuant quantizes the full weight matrix into a dense 4-bit base and adds a sparse 4-bit residual to compensate for quantization errors.Both components remain 4-bit, avoiding high-precision fallback while retaining a low-bit representation.Source: §1 · pp. 2–3
  • Hessian-based output-aware scoring selects error-critical blocks because quantization errors concentrate at block level and their output impact depends on input activations.The score supports efficient top-K selection without expensive per-block output evaluations.Source: §1 · p. 2
  • ZipperEngine fuses sparse residual computation into the dense 4-bit kernel through an overlapped pipeline, avoiding separate sparse-kernel overhead and enabling speedup with additional residual blocks.Separate execution requires reloading activations and merging partial outputs, adding over 30% latency.Source: §1 · pp. 2–3
  • MosaicQuant preserves near-FP16 accuracy while achieving up to 1.24× speedup over the W16A16 baseline.The system-level evaluations were conducted on the RTX 4090.Source: §1 · p. 3

2 Preliminary & Related Work

The section introduces uniform symmetric quantization for linear operators and reviews transformations and mixed-precision approaches to managing outliers. It contrasts those approaches with MosaicQuant’s fully low-bit residual compensation.

2 Preliminary & Related Work

  • Uniform symmetric quantization represents a tensor with a low-bit value and scale, then dequantizes it by multiplying the value by that scale.For linear layers, the section expresses quantized computation using activation X and weight W.Source: §2 · p. 3
  • Using different bit-widths for quantized operands requires runtime dequantization of one operand, undermining quantized execution’s performance advantage.QX and QW typically use the same bit-width to exploit low-precision GPU units.Source: §2 · p. 3
  • Equivalent transformations reshape activation and weight distributions; SmoothQuant [26], QuaRot [1], SpinQuant [15], and FlatQuant [21] instantiate transformations to manage outliers.Under aggressive 4-bit quantization, remaining or migrated outliers can still cause large errors in a small fraction of blocks.Source: §2 · p. 3
  • Mixed-precision methods preserve outlier-dominated components at higher precision, whereas MosaicQuant uses a unified sparse low-precision component for block-level compensation.The reviewed approaches introduce high-precision fallback operations requiring extra data movement and format conversion.Source: §2 · p. 3

3 Motivation

MosaicQuant motivates sparse, block-level residual compensation because distortion is concentrated in localized regions; output-aware selection targets these errors, and a small block budget captures much of the reduction.

3 Motivation

  • Applying residual compensation densely would add computation and storage, motivating a sparse strategy that recovers most error reduction with fewer blocks.The passage identifies a small fraction of residual blocks as sufficient to recover most of the error-reduction effect.Source: §3 · p. 4
  • Residual output distortion forms localized rectangular hotspots rather than full channel stripes, so block compensation avoids including many low-impact channel values.The observed concentration motivates targeting blocks rather than entire channels.Source: §3 · p. 4
  • Output-distortion selection markedly outperforms magnitude-, residual-norm-, and random-selection criteria, which ignore activation contributions to layer output.Direct output-distortion selection is expensive because it repeatedly evaluates full output distortion across candidate blocks.Source: §3 · pp. 4–5
  • At a 10% block budget, output-aware selection reduces layer output distortion by 55% on Layer 24 and 63% on Layer 34, recovering more than half.The passage reports diminishing returns as more blocks are compensated.Source: §3 · p. 5

4 Method

MosaicQuant represents weights with a dense 4-bit base and sparse 4-bit residual, selecting output-critical blocks with an activation-aware ∆-Hessian score. ZipperEngine fuses and overlaps their execution; on a Qwen3-8B V projection layer, this reduces latency by 1.9× over the naive pipeline.

4.1 MosaicQuant: Block-Wise Inlier–Outlier Disaggregation

  • MosaicQuant uses a dense 4-bit base for migrated weights and sparse 4-bit residuals on selected blocks, with an activation-aware ∆-Hessian score guiding allocation.The score reduces block allocation to top-K ranking and is optimal under a diagonal-Hessian objective.Source: §4.1 · p. 5

4.2 ZipperEngine: Fusing Dense and Sparse 4-bit Kernels

  • ZipperEngine’s fused, overlapped pipeline reduces latency by 1.9× over the naive pipeline on Qwen3-8B’s V projection layer.The pipeline fuses dense and sparse 4-bit computation with reduce-add to hide memory and auxiliary overheads.Source: Figure 3 · p. 6

4.1 MosaicQuant: Block-Wise Inlier–Outlier Disaggregation

  • The ∆-Hessian score estimates each block’s output-error reduction using activation sensitivity, and a calibration-based scoring-and-sorting step selects the top-K blocks.Under the diagonal-Hessian objective, selecting the top-K scores is optimal; this removes cross-block interaction terms.Source: §4.1 · pp. 6–7

4.2 ZipperEngine: Fusing Dense and Sparse 4-bit Kernels

  • ZipperEngine fuses dense and sparse kernels so residual computation reuses quantized activation tiles and output tiles, removing redundant memory accesses and kernel launches.The separate sparse path reloads activations, writes a partial output, and requires a separate reduce-add kernel.Source: §4.2 · p. 7
  • A tiled overlapped pipeline schedules quantization, dense compute, sparse compensation, and reduction concurrently across independent sub-blocks.This software pipeline hides auxiliary work behind dense 4-bit GEMM while preserving regular 4-bit inference throughput.Source: §4.2 · pp. 7–8

5 Experiments

Experiments evaluate MosaicQuant on LLaMA3 and Qwen3 for zero-shot accuracy, WikiText2 perplexity, throughput, and sparse-branch overhead. Results show stronger W4A4 accuracy than other low-bit baselines, higher Qwen3-8B throughput than competing methods, and modest overhead from sparse 4-bit branches.

5.1 Setups

  • The evaluation covers LLaMA3 3B/8B and Qwen3 4B/8B/14B/32B, using six zero-shot tasks and WikiText2 perplexity.Calibration uses 128 WikiText-2 prompts of 2048 tokens; comparisons include RTN, GPTQ, AWQ, ResQ, Atom, SmoothQuant, QuaRot, and SpinQuant.Source: §5.1 · p. 8

5.2 Accuracy results

  • Across six models under W4A4, MosaicQuant's zero-shot accuracy remains within 1.3–3.1 percentage points of W16A16.On LLaMA3-8B and Qwen3-14B, it is 1.3–3.8 points above ResQ and Atom; on Qwen3-8B its WikiText2 perplexity is 11.2 versus 14.2 for ResQ and 14.5 for Atom.Source: §5.2 · p. 8

5.3 End-to-end Throughput

  • On Qwen3-8B, MosaicQuant delivers 1.11–1.20× higher throughput than ResQ across batch sizes 4–32.It also outperforms AWQ by 1.32–1.54× and QuaRot by 1.26–1.37×; the authors attribute the advantage to coordinated dense–sparse INT4 execution.Source: §5.3 · pp. 8–9, Figure 4 · p. 9

5.4 Ablation study

  • With a 10% block budget, Hessian-guided block selection reaches accuracy 66.3 and 71.2 and WikiText-2 perplexity 11.0 and 10.8 on Qwen3 4B and LLaMA3 8B.For comparison, 10% channel-level compensation gives accuracy 62.6 and 69.8 and perplexity 13.5 and 13.1; removing the residual branch gives accuracy 52.4 and 55.7 and perplexity 108.6 and 143.7.Source: Table 2 · p. 9, §5.4 · p. 9

5.5 Overhead of Sparse 4-bit Branches

  • Across six models under a 10% block budget, sparse 4-bit branches add 8.5–9.5% memory overhead and 5.3–6.2% latency overhead.The fused overlapped pipeline co-schedules the dense base and sparse residual to reduce extra memory traffic and kernel-launch overhead.Source: Figure 5 · p. 9, §5.5 · pp. 9–10

6 Conclusion

MosaicQuant represents LLM weights with a dense 4-bit base and a sparse 4-bit residual selected by a Hessian-guided output-aware criterion. ZipperEngine fuses residual computation into dense 4-bit GEMM, and experiments report near-FP16 accuracy with up to 1.24× speedup over the 16-bit baseline.

6 Conclusion

  • MosaicQuant uses a dense 4-bit base and Hessian-guided sparse 4-bit residual, while ZipperEngine fuses residual computation into dense GEMM; experiments report near-FP16 accuracy and up to 1.24× speedup over the 16-bit baseline.The conclusion describes an overlapped kernel pipeline for quantization, compute, and reduce-add on an NVIDIA RTX 4090 GPU.Source: §6 · p. 10

A Proof of ∆-Hessian Block Selection

The proof establishes that top-K ∆-Hessian selection minimizes a diagonal-Hessian surrogate of output distortion. It also bounds the discrepancy from the exact output-distortion oracle by the approximation error from off-diagonal Hessian terms.

Proof of ∆-Hessian Block Selection

  • The selection objective minimizes remaining residual error after 4-bit compensation, equivalently maximizing output-distortion reduction over selected blocks.The exact oracle selects blocks by output-distortion reduction; the surrogate uses blockwise gains.Source: A Proof of ∆-Hessian Block Selection · pp. 12–13
  • Off-diagonal Hessian terms couple channel errors, so the exact output-distortion objective cannot be decomposed into independent block scores.The proof approximates the Hessian with its diagonal to obtain a decomposable surrogate.Source: A Proof of ∆-Hessian Block Selection · pp. 12–13
  • Selecting the top-K positive block gains is optimal for minimizing the diagonal-Hessian surrogate under the cardinality budget.Because the surrogate decomposes across blocks, maximizing each block's gain yields the optimal selection.Source: A Proof of ∆-Hessian Block Selection · pp. 12–13
  • The gap between ∆-Hessian selection and the exact oracle is bounded by 2ϵK; it is zero when off-diagonal interactions vanish and small when they are small.Under the diagonal surrogate, ∆-Hessian selection is optimal.Source: A Proof of ∆-Hessian Block Selection · pp. 13–14

B Benchmark Details

The benchmark details describe six quantization baselines spanning rounding, Hessian-aware and activation-aware weight quantization, channel scaling, and rotation-based approaches. Their precision settings and calibration requirements vary.

B.1 Baselines

  • RTN rounds weights and activations uniformly with fixed scaling and no calibration, making it nearly cost-free but less accurate.The paper uses it as a naive quantization baseline.Source: §B.1 · p. 14
  • GPTQ applies post-training Hessian-aware greedy weight quantization with error compensation for earlier rows under W4A16.Source: §B.1 · p. 14
  • AWQ uses activation-aware weight clipping and per-channel scaling to prioritize salient channels for W4A16 quantization.The passage describes it as using light calibration.Source: §B.1 · p. 14
  • SmoothQuant shifts activation outliers into weights through channel-wise scaling to enable W8A8 quantization.The passage characterizes its degradation as minimal.Source: §B.1 · p. 14
  • QuaRot applies online Hadamard-based orthogonal rotations to disperse outliers before quantization in the rotated space.The passage describes W4A4 quantization with minimal overhead and small loss.Source: §B.1 · p. 14
  • SpinQuant learns orthogonal rotations to homogenize weight and activation magnitudes and reduce outliers for W4A4 quantization.The passage describes improved stability.Source: §B.1 · p. 14

C Additional Results

The appendix specifies the hardware and quantization settings used for MosaicQuant, along with how baseline throughput was measured.

C.1 Implementation Details

  • MosaicQuant quantization runs on a single H20 with 96 GB of memory, while evaluation uses a workstation with an NVIDIA RTX 4090 (24 GB) GPU and Intel Xeon Gold 6430.Source: §C.1 · p. 14
  • For W4A8, activations use per-token dynamic quantization and weights use per-channel quantization.Source: §C.1 · pp. 14–15
  • For 4-bit quantization, activations use per-group symmetric quantization and weights use per-channel symmetric quantization.Source: §C.1 · p. 15
  • Baseline throughput measurements use matched decoding setups, batch sizes, sequence lengths, and GPU, and are collected after warm-up runs.AWQ, FlatQuant, QuaRot, and QServe use publicly released implementations or official runtime instructions.Source: §C.1 · p. 15

C.2 Zero-Shot Task Results

The appendix provides complete comparisons for LLaMA3 3B and 8B, covering WikiText2 perplexity and average accuracy across six zero-shot tasks.

C.2 Zero-Shot Task Results

  • The six zero-shot tasks are ARC-Challenge, ARC-Easy, HellaSwag, LAMBADA, PIQA, and WinoGrande.Source: §C.2 · p. 15
  • The comparison includes RTN, GPTQ, AWQ, SmoothQuant, QuaRot, and SpinQuant.Source: §C.2 · p. 15
  • Table 3 compares WikiText2 perplexity and average accuracy across six zero-shot tasks for LLaMA3 3B and 8B.Source: Table 3 · p. 15, §C.2 · p. 15

C.3 Kernel Profile

Kernel fusion reduces the latency of Qwen3-8B attention and MLP GEMM operators, with gains varying across operators and prefill versus decode.

C.3 Kernel Profile

  • 2.51–2.56× prefill and 1.61–1.79× decode speedups for qkvfused; oproj gains 2.39–2.46× in prefill and 1.45–1.87× in decode.Source: §C.3 · pp. 15–16, Table 5 · p. 17
  • Gate/upproj reaches 2.64–2.68× prefill speedup, while downproj decode speedup reaches 2.90× at batch size 32.Source: §C.3 · p. 16, Table 5 · p. 17
  • Kernel fusion consistently reduces latency for Qwen3-8B attention and MLP GEMMs, with particularly strong prefill gains and downproj decode gains.Source: §C.3 · pp. 15–16, Table 5 · p. 17
Loading 2606.15652v1…