TL;DR
MoQE (Mixture of Quantization Experts) is a novel inference framework that mitigates accuracy loss in quantized models by treating different quantization variants of the same model as specialized "experts." By dynamically routing each input sample to the most suitable quantization expert via a lightweight router, MoQE achieves state-of-the-art accuracy—sometimes even rivaling full-precision models—with negligible VRAM and latency overhead.
What Problem Does This Paper Address?
Deep learning models are expanding at a breakneck pace, making their deployment on resource-constrained edge devices increasingly difficult. Quantization—the process of converting high-precision floating-point weights (like FP16) to lower-bit representations (like Int8 or Int4)—is a go-to strategy to reduce memory and compute costs.
However, quantization introduces noise and information loss, leading to a noticeable drop in accuracy. Crucially, the authors point out that different post-training quantization (PTQ) algorithms (such as GPTQ, AWQ, or SmoothQuant) degrade unevenly across different datasets. An algorithm that performs poorly on one type of prompt or image might excel at another. Currently, engineers must pick a single quantization method for the entire deployment, forcing an sub-optimal compromise across diverse data distributions.
Methods
MoQE addresses this by adapting the popular Mixture-of-Experts (MoE) architecture to the quantization domain. Instead of training massive new expert networks from scratch, MoQE uses multiple pre-existing quantization variants of the same full-precision base model as its experts.
The framework consists of two main components:
- Quantization Experts: Multiple frozen, low-bit versions of the base model (e.g., one quantized via GPTQ, another via SmoothQuant, etc.).
- Lightweight Routers: Structure-aware classification models tailored for specific domains. For computer vision (CV) tasks, they design an SEResNet-8 based router; for natural language processing (NLP) tasks, they utilize a lightweight Transformer encoder that hooks into the base model's existing full-precision embedding layer to save compute.
During training, the experts remain completely frozen. The router is trained to predict which expert will yield the lowest loss for a given input sample.
To prevent the system from suffering from the massive VRAM footprint typical of MoE models, MoQE employs an on-demand loading mechanism. Only the lightweight router and one active quantization expert reside in the GPU's VRAM at any given time. The remaining experts sit in host memory (CPU RAM) and are only swapped into VRAM when the router decides an expert switch is necessary.
Datasets
The authors evaluated MoQE across both language and vision benchmarks:
- NLP Tasks: Evaluated on the Qwen (0.6B, 1.7B, 4B) and LLaMA (3B) model families using the C4, WikiText-2, and OpenWebText datasets.
- CV Tasks: Evaluated on ResNet50, ResNet101, and MobileNetV2 using the ImageNet-1K dataset.
Key Insights and Ideas
- Quantization "Unfairness" as a Feature: The core "aha moment" is that quantization algorithms exhibit distinct, data-dependent biases. As shown in the paper's analysis, K-Quants might struggle on a particular text subset where SmoothQuant thrives. MoQE exploits these localized strengths to synthesize a superior composite decision boundary.
- Zero VRAM Bloat: Traditional MoE models require all experts to be resident in VRAM or require complex pipeline parallelism. MoQE exploits the fact that all experts share the same architecture, allowing seamless on-demand swapping. This keeps peak VRAM usage nearly identical to running a single quantized model.
Key Results
MoQE consistently outperformed individual state-of-the-art quantization methods across both language and vision tasks:
- Language Modeling (Int8): On Qwen-0.6B, MoQE achieved a perplexity of 24.82 on the C4 dataset, significantly lower than the next-best individual method (imatrix at 27.84). Remarkably, on LLaMA-3B evaluated on OpenWebText, MoQE achieved a perplexity of 10.03, actually surpassing the unquantized FP16 baseline (11.57), likely due to the regularization effects of dynamic routing.
- Computer Vision (Int8): For ResNet50 on ImageNet, MoQE reached 78.01% accuracy, outperforming standard Quantization-Aware Training (QAT) at 77.09% and BRECQ at 76.44%.
- Minimal Overhead: The Extra Inference Time (EIT) ratio—the time spent routing and swapping models—remained under 3% for the majority of large models, proving that the framework introduces negligible latency.
Limitations and Future Work
While MoQE successfully optimizes VRAM usage, its primary limitation lies in host memory (CPU RAM) and disk storage footprint. Because multiple expert variants must be stored locally to be swapped in on demand, the system requires significantly more storage space than a single quantized model.
Additionally, in worst-case scenarios where the input data oscillates rapidly between distributions, frequent expert swapping could introduce I/O bottlenecks. Future work could explore smarter caching strategies or weight-difference compression techniques to minimize the data transfer overhead between CPU and GPU.
Summary updated