SKIM: Any-bit Quantization Pushing The Limits of Post-Training Quantization

Runsheng Bai, Bo Liu, qiang liu

Large Language Models (LLMs) are transformative, but their sheer size makes them a nightmare to deploy. While quantization—the process of reducing the precision of model weights—is the standard solution for squeezing these giants onto consumer hardware, it often comes with a "performance tax." Most existing methods are also rigid, forcing developers to choose between fixed bit-widths like 2, 3, or 4 bits.

A new paper, "SKIM: Any-bit Quantization Pushing the Limits of Post-Training Quantization," introduces a more flexible and efficient approach. By treating bit allocation as a dynamic resource problem rather than a fixed grid, the authors have found a way to squeeze more performance out of every single bit.

TL;DR

SKIM (Scaled K-means clustering wIth Mixed precision) is a post-training quantization method that allows LLMs to be compressed to any arbitrary bit-width (e.g., 3.2 bits) with minimal performance loss. By combining a greedy bit-allocation algorithm with a trainable scaling vector, it narrows the accuracy gap between quantized and full-precision models by an average of 14%.

What Problem Does This Paper Address?

The "Memory Wall" is the primary bottleneck in LLM inference. Loading a model like LLaMA-65B in standard FP16 precision requires 130GB of VRAM—far exceeding a single A100 GPU. Quantization helps, but it faces two major hurdles:

  1. Performance Degradation: As you drop below 4 bits, model "perplexity" (a measure of how confused the model is) usually spikes.
  2. Rigidity: Most methods only support integer bit-widths. If your GPU has enough memory for 3.5 bits but not 4, you’re usually stuck using 3 bits and leaving performance on the table.

The authors observed that weight channels in LLMs aren't created equal; some are highly sensitive to precision loss, while others are robust. Standard uniform quantization ignores this disparity.

Methods

SKIM introduces three core innovations to move beyond "one-size-fits-all" quantization:

  • Greedy Bit Allocation: The authors treat quantization as a variation of the "knapsack problem." They use a greedy algorithm to allocate bits channel-by-channel. Channels that exhibit high quantization error are given more bits, while "easy" channels get fewer. This allows the model to hit a specific average bit target (like 3.2 bits) precisely.
  • Scaled K-means Clustering: Instead of rounding numbers to a grid (uniform quantization), SKIM uses K-means clustering to find the optimal "centroids" for weights. This non-uniform approach better captures the actual distribution of the data.
  • Trainable Scaling Vector: K-means is traditionally non-differentiable, meaning you can't use standard gradient descent to improve it. SKIM solves this with an iterative optimization strategy: they fix the K-means groupings and then use the Adam optimizer to train a scaling vector that minimizes the reconstruction error. This "learns" the best way to scale the weights to match the original model's output.
SKIM Pipeline: Combining greedy bit allocation with scaled K-means clustering

Key Insights and Ideas

  • The Long Tail of Error: Quantization error follows a long-tail distribution. A small fraction of "outlier" channels are responsible for the majority of performance drops. By giving just a few more bits to these sensitive channels, you can stabilize the entire model.
  • Breaking the Integer Constraint: The "Any-bit" capability is a game-changer for deployment. It allows engineers to maximize the use of available hardware memory. If a 3-bit model is too small and a 4-bit model is too big, SKIM can produce a 3.5-bit model that fits perfectly.
  • Unifying Objectives: The paper provides a mathematical framework that unifies "layer-wise" and "sensitivity-based" quantization objectives, showing that they are essentially variations of the same goal. This allowed the authors to pick the most efficient loss function for each stage of their algorithm.

Key Results

SKIM was evaluated across a wide range of models (LLaMA, LLaMA2, OPT) and tasks, demonstrating significant improvements over existing baselines.

  • Superior Perplexity: On LLaMA-7B (WikiText2), SKIM achieved a perplexity of 6.21 at 3 bits, significantly outperforming SqueezeLLM (6.32) and OmniQuant (6.48).
  • Closing the Gap: SKIM narrows the performance gap between quantized models and their full-precision (FP16) counterparts by 14% on average.
  • Continuous Bit-Widths: Unlike baselines that only plot at integer intervals, SKIM maintains a smooth, predictable performance curve across fractional bit-widths.
Perplexity vs. Bit-width: SKIM achieves smooth any-bit quantization and outperforms baselines
  • Efficiency: Despite involving a training step, SKIM is fast. Quantizing a LLaMA-7B model takes about one hour on a single RTX 3090 GPU.
  • Memory Savings: SKIM achieved lower peak memory usage than baselines at the same bit level because it uses lower precision for the cluster centroids themselves.

Limitations and Future Work

  • Hardware Kernels: While SKIM provides excellent theoretical memory savings and perplexity, fully realizing the latency (speed) benefits of mixed-precision (e.g., 2-bit and 4-bit weights in the same layer) requires specialized CUDA kernels that are not yet standard.
  • Overfitting: The authors noted some slight overfitting on calibration data for OPT models, suggesting that the choice of calibration data remains a sensitive factor.
  • Greedy vs. Optimal: The greedy algorithm is an approximation. While efficient, there may be even better bit-allocation strategies for extremely low-bit regimes (under 2 bits).

SKIM represents a significant step toward "elastic" LLM deployment, where model precision is a dial you can turn to perfectly match your hardware constraints.

Summary updated

BibTeX
@inproceedings{bai2025skim,
  author = {Runsheng Bai and Bo Liu and qiang liu},
  title = {{SKIM: Any-bit Quantization Pushing The Limits of Post-Training Quantization}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=JpoDVFYx2w},
}
Figure