← Latest papers
🤖 machine learning

QAM-W: Joint 2D Codebook Quantization for LLM Weights via Hadamard Rotation and Activation-Aware Scaling

QAM-W introduces a joint 2D codebook quantization method for LLM weights that utilizes Hadamard rotation and activation-aware scaling to preserve pairwise coordinate structures, achieving near-BF16 perplexity at approximately 5.5 bits per weight while outperforming polar coding and matching SmoothQuant quality with significantly fewer weight bits.

Original authors: Preetam Sharma, Kacper Dobek

Published 2026-05-27
📖 4 min read☕ Coffee break read

Original authors: Preetam Sharma, Kacper Dobek

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a massive library of books (a Large Language Model, or LLM) that is incredibly smart but takes up a huge amount of space. To make it easier to carry around, you want to shrink the books down. This process is called quantization.

Most current methods of shrinking these books are like taking a dictionary and replacing every single word with a short number code, one word at a time. It's simple, but it ignores the fact that words often come in pairs or groups that have a specific relationship to each other. If you treat them as isolated individuals, you lose some of the story's nuance.

This paper introduces a new method called QAM-W (Quadrature Amplitude Modulation for Weights). Think of it as a smarter, more efficient way to pack those books.

Here is how it works, using simple analogies:

1. The Problem: The "Solo Dancer" vs. The "Duet"

Imagine the weights in an AI model are dancers.

  • Old Method (Scalar Quantization): The old way treats every dancer as if they are performing a solo. It looks at each dancer individually and says, "You are a '3', you are a '7'." It ignores that two dancers might be holding hands or moving in sync.
  • The QAM-W Insight: The authors realized that within a row of data, these "dancers" are actually dancing in pairs. They are correlated. Instead of coding them as two separate soloists, QAM-W treats them as a duet.

2. The Solution: The "Magic Spin" and the "Pairing"

QAM-W uses a three-step process to shrink the model without losing the story:

  • Step A: The Magic Spin (Hadamard Rotation):
    Imagine the dancers are standing in a messy, crowded room. QAM-W applies a "Magic Spin" (a mathematical rotation) that rearranges them. Suddenly, the dancers who were moving randomly are now paired up perfectly, moving in a smooth, circular pattern. This makes them much easier to describe mathematically.

  • Step B: The "Duet" Codebook:
    Instead of giving each dancer a separate number, QAM-W looks at the pair as a single point on a map. It uses a pre-made "map" (a codebook) trained on how these pairs usually behave. It's like having a library of standard dance moves for duets. Instead of describing two separate steps, you just say, "They did the 'Waltz #42' move." This captures the relationship between the two numbers, saving space.

  • Step C: The "Volume Knob" (Activation-Aware Scaling):
    Sometimes, certain parts of the model are very loud (highly active) and others are quiet. If you shrink the loud parts too much, the music gets distorted. QAM-W listens to the "volume" of each channel before shrinking. It turns down the volume of the loud channels slightly so they fit better into the small space, ensuring the most important information isn't crushed.

3. The Results: Smaller Size, Same Quality

The paper tested this new method on five different AI models (ranging from small to medium-large).

  • The "Sweet Spot": At a specific compression level (about 5.5 bits per weight), QAM-W achieved results that were almost identical to the original, uncompressed model.
  • The Comparison: A popular competitor method called SmoothQuant needed to use about 8.1 bits to get the same quality. QAM-W got the same result using 32% fewer bits.
    • Analogy: It's like packing a suitcase. SmoothQuant needs a large suitcase to fit all your clothes neatly. QAM-W folds the clothes so efficiently that you can fit the exact same amount into a much smaller bag.

4. What It Doesn't Do (The Limits)

The paper is very specific about what it doesn't claim:

  • Not the Smallest: If you try to shrink the model even more (down to 4 bits), another method called QTIP actually performs better. QAM-W is the champion in the "medium-small" range (5–6 bits), not the "tiny" range.
  • Storage vs. Speed: The paper measures how much space the model takes up on a hard drive or in memory. It does not yet claim to make the model run faster on a computer chip, because the software to actually use these compressed numbers in real-time is still being built.

Summary

QAM-W is a new "packing technique" for AI models. By recognizing that data comes in pairs, spinning them into a better shape, and adjusting for volume, it can shrink AI models by about a third without making them any less smart. It's a specialized tool that works best in a specific size range, offering a significant saving in storage space compared to current methods.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →