QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks
Paper · 2024 · Albert Tseng, Jerry Chee, Qingyao Sun et al.
Summary
A trained language system can be too large for the device that would otherwise run it. Even when the weights fit, fetching them from memory can limit how quickly the system generates text. QuIP# studies whether post-training quantization can address both problems at once. It replaces trained weights with representations that use 2, 3, or 4 bits per weight, then reconstructs the values needed for inference. The challenge is to preserve enough of the original computation while making reconstruction cheap enough to benefit from the smaller representation.
QuIP# first changes the coordinates in which it represents each weight matrix. A randomized Hadamard transform spreads large entries and important directions across many coordinates. The resulting weights are easier to approximate in groups. An algorithm called BlockLDLQ chooses a representative vector for each group, using mistakes already made in the matrix to adjust its next choice. Its main dictionary of representative vectors, E8P, exploits the symmetry of the E8 lattice. A table occupying just 1KiB is enough to reconstruct the dictionary as needed. The authors then reduce the differences between the original and compressed computations by adjusting parameters still available for fine-tuning.
In the Llama experiments, QuIP# makes its clearest gains at the lowest precisions. It improves on OmniQuant and the original QuIP and generally has an advantage over AQLM at 2 and 3 bits. At 4 bits, QuIP# and AQLM give similar results. The Wikitext2 experiments also ask how best to spend a fixed weight-storage budget. On Llama 2, the curve for 3-bit QuIP# surpasses even an idealized 4-bit curve that assumes full-precision predictive quality. The advantage comes from the tradeoff between the number of weights that fit and the distortion incurred when storing each one.
The timing experiments show why the dictionary matters beyond approximation quality. On an NVIDIA RTX 4090, the authors’ implementation uses over 50% of peak memory bandwidth during generation with 2-bit weights in the FlashAttention setup. In the HuggingFace comparison, QuIP# generates faster than the FP16 reference, while the tested AQLM configuration is slower. The relevant distinction is what the processor must fetch and reconstruct for each token. E8P turns large, irregular dictionary accesses into lookups in a small table followed by inexpensive decoding.
Deep dive: QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks
QuIP# uses randomized Hadamard transforms and compact lattice codebooks to keep language systems accurate and fast at very low weight precision. · about 40 minutes to read
The problem and its context
Weight memory affects both capacity and speed
A large language system stores much of its learned behavior in matrices. Running a linear layer means applying one of these matrices to a vector of activations, the numerical signals passed between layers. The matrices take up space throughout inference. As an example of the capacity problem, the paper puts the native 16-bit weight storage for Llama 2 70B at 140GB of GPU memory. It describes the corresponding requirement at 2 bits as below 20GB. A compact weight format can therefore change which devices can hold the weights in the first place. Llama 2
The execution problem appears during autoregressive decoding, when the system produces text a token at a time. For small batches, the authors describe this work as typically limited by memory bandwidth. The device repeatedly brings large amounts of weight data to the computation, with relatively little reuse across the examples in a batch. A compressed matrix can reduce the traffic. How much of that saving becomes generation speed depends on the work needed to read indices, retrieve their values and apply the matrix.
This dependency matters especially for a dictionary-based format. A short index can stand for several weights, yet interpreting that index can require an irregular access to a large dictionary. In that case, the amount of weight data saved tells only part of the runtime story. The design problem belongs as much to GPU and parallel computing as to compression.
Starting from an already trained network
The authors distinguish post-training quantization, or PTQ, from pruning and quantization-aware training. Pruning seeks to remove some of the weights while preserving useful behavior. Quantization-aware training incorporates the effects of limited precision into training so the network can learn parameters suited to it. PTQ starts from trained weights and converts them afterwards. The paper motivates PTQ by its comparatively low computational cost and the competitive quality earlier work had already achieved.
These categories leave room for overlap. A conversion can use data to decide how to round and perform a limited optimization after some weights have been compressed. QuIP# uses both options. The training it adds is aimed at reproducing the behavior of an existing network. The paper places this approach alongside the tuning in AQLM and discusses quantization-aware training as a broader, more computationally demanding comparison. AQLM LLM-QAT
Large coordinates complicate rounding
Low-bit quantization gives the compressor a small set of values to choose from. When a few weights are much larger than most, choosing a scale to accommodate those extremes can leave the densely populated part of the range poorly resolved. The distribution of activations creates a related issue. An error along an input direction that the layer encounters frequently or at large magnitude can matter much more than an error of comparable size in another direction.
The earlier methods discussed in the paper address these difficulties in different ways. AWQ uses information about activation magnitudes to scale weights. OmniQuant learns transformations that preserve the original computation while preparing it for quantization. Grouping lets scales be chosen locally, at the cost of storing them. The paper’s example uses a 16-bit scale for each group of 64 weights, which adds 0.25 bits per weight. Another option is to retain certain outliers in higher precision. The authors point out that the resulting unstructured high-precision matrices can be costly to multiply by. OmniQuant
The original QuIP gives the problem a mathematical formulation through incoherence. For weights, the term describes how small the biggest coordinate is relative to the matrix as a whole. For input statistics, it describes how evenly the eigenvectors spread their magnitude over the coordinates. The latter condition matters because strong directions of variation can persist even when the individual weights appear well behaved. QuIP changes bases on both sides of a weight matrix using structured random orthogonal transforms. The paper takes that framework as a starting point.
QuIP also supplies a way of responding to the errors already introduced by rounding. This is useful because a matrix error is ultimately evaluated on a vector of inputs, where the effects of several weight errors can combine. The authors trace the scalar algorithm, LDLQ, to equivalent formulations in OPTQ and QuIP. Its feedback rule is derived from input statistics, and the optimality result cited for it concerns a class of scalar adaptive algorithms with linear feedback when rounding to integers.
The dictionary becomes a design constraint
Scalar quantization assigns a representable value to each weight individually. Even if the choices are made adaptively, the set of possible reconstructions for a group has the geometry of coordinate-by-coordinate choices. Vector quantization instead assigns a single codeword to a group. Each codeword represents a complete vector, so the compressor can decide where to put reconstruction points in the space as a whole. This lets it devote more points to a shape that resembles the distribution of the weights.
The difficulty is the number of entries. As either the bits available per weight or the number of weights per vector increases, a flat dictionary grows exponentially. The paper notes that an unstructured table can reach a GPU cache limit well before it reaches the dimension and bitrate one would choose on statistical grounds. Multiple copies of the table may be useful to avoid bank conflicts, where simultaneous accesses compete for the same part of the cache. This puts additional pressure on the table’s footprint. QuIP# has to make the vector representation itself economical to reconstruct.
The paper also takes up a question from earlier work on inference scaling laws. Given a fixed amount of weight storage, lower precision lets a system use more parameters, but each of those parameters is represented less faithfully. An earlier study had made the case for 4-bit precision under its observed tradeoffs. The question for QuIP# is how the preferred allocation changes when the low-bit approximation improves. The case for 4-bit precision
The method, step by step
A compression run begins by recording the kinds of inputs the linear layers receive. It expresses the weights and these input statistics in new coordinates, then uses the statistics to guide the selection of codewords. If tuning is enabled, the run alternates quantization and recovery within each transformer block before doing a final pass over the complete network. During inference, the stored codewords are decoded where the matrix is used, with transformations around the multiply to recover the intended layer operation.
QuIP# from calibration to generation
The steps in order.
Measure what rounding does to a layer
The first step is to decide what counts as a good approximation. A linear layer takes an input and forms weighted sums. Two matrices can differ by the same amount in their entries yet behave quite differently under the inputs that actually reach the layer. The authors use a quadratic objective inherited from prior work that measures the output discrepancy over representative inputs.
ℓ(Ŵ) = Eₓ[‖(Ŵ − W)x‖²]
Here W is the original weight matrix, Ŵ is the quantized reconstruction, and x is an input vector picked uniformly from a calibration collection. W and Ŵ have m output rows and n input columns, and x has n components. The product inside the norm is the difference in layer outputs for x. The squared Euclidean norm adds the squared components of that difference. Eₓ averages over the choice of x, and ℓ is the resulting loss.
Rather than rerun the comparison across all calibration inputs for each rounding decision, the method summarizes the inputs with a matrix.
H = Eₓ[xxᵀ]
H is the proxy Hessian. The superscript ᵀ indicates transpose, so xxᵀ is the outer product of x with itself. Its entries record products of input coordinates. Averaging gives the uncentered second moment, which captures both the average squared magnitude of each coordinate and how pairs of coordinates vary together. The word proxy identifies H as the matrix for this layer reconstruction objective. The experiment uses it to evaluate weight errors without differentiating a task loss through the entire network.
ℓ(Ŵ) = tr((Ŵ − W)H(Ŵ − W)ᵀ)
The notation tr takes the trace, the sum of a square matrix’s diagonal entries. This form uses the same loss ℓ, matrices W and Ŵ, and transpose operation as above. Multiplying by H measures the error in light of the directions represented by the calibration inputs. Summing the diagonal combines the resulting contributions from the output rows. The expression makes the rest of quantization a matrix problem that can be solved separately for each layer.
For Llama, the authors build these statistics from 6144 sequences drawn from RedPajama 1T. The sequence lengths match the native contexts, 2048 for Llama 1 and 4096 for Llama 2. Once collected, the statistics can serve more than one quantization experiment on the same pretrained network. Later recovery tuning uses a smaller development collection and a different target.
Change the coordinates without changing the layer
QuIP# aims to distribute weight magnitude and input directions before rounding begins. For the latter, the authors start from an eigendecomposition of H.
H = QΛQᵀ
Q is an orthogonal matrix with the eigenvectors of H as columns. Λ is diagonal and contains their eigenvalues. The superscript ᵀ indicates transpose. The columns of Q describe the directions along which the quadratic objective measures the weight error, and the eigenvalues give the strengths attached to those directions.
maxᵢ,ⱼ |Qᵢⱼ| ≤ μ / √n
The indices i and j range over the entries of Q. The vertical bars take absolute value, and the maximum picks the largest magnitude. The input dimension is n, √ takes a square root, and μ is the incoherence parameter. This bound asks how much of an eigenvector can be concentrated in any one coordinate. Smaller values of μ impose a stricter condition.
maxᵢ,ⱼ |Wᵢⱼ| ≤ μ‖W‖ꟳ / √(mn)
In this condition the indices range over the m rows and n columns of W. The Frobenius norm ‖W‖ꟳ is the square root of the sum of all squared entries. The denominator normalizes the scale by the matrix dimensions. The parameter μ again controls the allowed concentration, here of a single weight relative to the matrix’s magnitude.
QuIP# uses the randomized Hadamard transform to obtain coordinates satisfying such conditions with high probability. A Hadamard matrix combines inputs using a regular pattern of addition and subtraction. The paper uses scaled matrices, so the transformation preserves lengths. Independent random signs are applied before the mixing. This makes the distribution of the transformed coordinates less dependent on how the original vector happens to align with the fixed Hadamard basis.
x ↦ VSx
The arrow denotes the transformation of x. The diagonal matrix S has independent entries drawn uniformly from −1 and +1, and V is the orthogonally scaled Hadamard matrix on the input dimension. S flips the indicated signs, then V mixes the coordinates. There is a separate transform for the output dimension, using independent signs.
W̃ = USᵤWSᵥVᵀ
W̃ is the weight matrix in the new coordinates. U and V are the scaled Hadamard matrices for the output and input dimensions, respectively. Sᵤ and Sᵥ are the corresponding diagonal sign matrices. W is the original weight matrix and ᵀ denotes transpose. Multiplication on the left mixes output coordinates, and multiplication on the right mixes input coordinates.
H̃ = VSᵥHSᵥVᵀ
H̃ is the proxy Hessian in the transformed input coordinates. H is the calibration statistic defined earlier. V and Sᵥ act on the input dimension, and ᵀ denotes transpose. The transformation comes from applying the same input change of basis on both sides of the input outer product. Carrying the input statistics along makes the transformed rounding problem measure the same discrepancies as the original one.
SᵤUᵀ[W̃(VSᵥx)] = Wx
The variables are the two transforms and sign matrices, the rotated matrix W̃, the original weights W, and the input x. The operation inside the square brackets applies the rotated matrix to the rotated input. Uᵀ reverses the output Hadamard transform, and Sᵤ reverses the output signs. The equality uses orthogonality and holds for the unquantized weights with the original binary signs. During inference with compressed weights, the quantized reconstruction takes the place of W̃. When the sign vectors have been tuned, their real entries act as learned scalings in the corresponding positions.
Orthogonality also explains why the proxy is preserved by the coordinate change. The input transformation carries each calibration example into the new basis. If the weight approximation and the original matrix are expressed in that basis too, the layer error for each example is rotated on the output side. Its squared length stays the same. Thus the method changes the alignment between the coordinates and the grid used for rounding while preserving the meaning of the loss.
What the randomization guarantees
The paper gives a separate bound on the incoherence of the input-statistics matrix and the weight matrix. The guarantees apply to a fixed starting matrix and the random signs of the transform. For the proxy Hessian, the argument controls the transformed eigenvectors. For the weights, it controls entries after mixing both rows and columns.
μₕ = √(2 log(2n² / δ))
The parameter μₕ is the bound for H̃ under the eigenvector definition. The input width is n, log denotes the logarithm, and δ is the allowed failure probability for the statement. The guarantee holds with probability at least 1 − δ. It controls a maximum over coordinates, including the largest entry of any transformed eigenvector.
μᵥ = 2 log(4mn / δ)
Here μᵥ denotes the corresponding bound for W̃. The output width is m and the input width is n. The functions and failure parameter have the same meaning as in the previous formula. The guarantee again holds with probability at least 1 − δ. The weight bound grows logarithmically with matrix size. The corresponding bound for QuIP’s construction has squared-logarithmic dependence, with constants in the expression for that construction.
The appendix develops the concentration argument for a more general transform built out of orthogonal blocks. In that argument, random rotations create contributions with rapidly decaying tails. Controlling a single projection then makes it possible to control many coordinates at once through a union bound, which limits the probability that any of a collection of events occurs. An application to the columns of an eigenvector matrix yields the eigenvector result. For the entrywise weight result, the proof applies the projection argument on both sides of a fixed weight matrix. This is the sense in which the transformation gives mathematical control over outliers. The approximate Gaussian shape used to motivate the codebook is a further observation about the transformed weights.
Make the transform fast at practical widths
For a dimension that is a power of 2, the fast Walsh–Hadamard transform runs in time of order n log n for an n-component input. The corresponding cost per dimension in QuIP’s earlier construction grows as n√n. The Hadamard mixing itself also avoids general floating-point multiplies, since the unscaled matrix contains only signs. Both properties matter because the layer uses transforms during generation as well as during preparation.
For many other dimensions, the authors combine fast transforms with a smaller known Hadamard matrix. They factor the dimension to put as much of the work as possible in the power-of-2 part.
n = pq
Here n is the dimension of the transform. The factor p is the largest power of 2 that admits the construction with a known Hadamard matrix of size q. The paper uses the intermediate width of Llama 2 70B as an example, with 28,672 factored into 1024 and 28. The larger factor is suitable for the fast algorithm.
V = Hₚ ⊗ Hᵩ
Hₚ and Hᵩ denote the Hadamard matrices for sizes p and q, respectively. V is the combined Hadamard matrix, with scaling for orthogonality understood, and ⊗ is the Kronecker product. It forms a block matrix whose blocks are scaled copies of the second factor, with the coefficients supplied by the first. The paper gives the multiplication cost as order q²p log p, and compares it with order n(p + q) for the earlier approach using those factors. The advantage is most useful when p is much larger than q.
For other even dimensions, the authors offer a randomized fast Fourier transform. It interprets adjacent real components as the real and imaginary parts of complex numbers, applies random unit phases and a Fourier transform, and unpacks the result into real coordinates again. Multiplying by a phase rotates the corresponding pair of real components. The fast Fourier transform provides the mixing operation, and the appendix develops concentration bounds using the same framework as for Hadamard mixing. This option is useful when the Hadamard factors are inconvenient or when fast Fourier software is easier to obtain on the target hardware.
Round several weights in each decision
Once the coordinates have changed, the compressor works through groups of columns. Within one group, it quantizes a vector from each row. An earlier compression choice may have changed a weight enough to alter the layer output on some calibration inputs. Before committing to the next group, BlockLDLQ adjusts its target so the new choice can compensate for the earlier error. The proxy Hessian supplies the feedback coefficients.
The factorization behind this procedure is a block version of LDL decomposition. In the rest of the rounding discussion, W and H denote the weights and proxy Hessian in the coordinates where quantization takes place.
H = LᵀDL
H is the input second-moment matrix. L is block lower triangular, with identity matrices on its block diagonal and zero blocks above it. D is block diagonal. The transpose is indicated by ᵀ. Block width g must divide the input dimension n. Within a diagonal block, D can express interactions between the g coordinates, so the loss still reflects directions internal to the vectors that will be rounded together.
F = Lᵀ − I
F is the linear feedback matrix, written with a different letter here to distinguish it from the Hadamard transform. I is the identity matrix and L is the factor above. Subtracting the identity leaves only the strictly upper block part. Its structure makes it possible to compute each group’s adjustment entirely from earlier groups.
Ŵₖ = Qᵦ(Wₖ + (W₍<k₎ − Ŵ₍<k₎)Aₖ)
The index k labels the current group of columns. Wₖ contains its weights and Ŵₖ its reconstructed values. W₍<k₎ and Ŵ₍<k₎ collect the columns in already processed groups. Aₖ selects the part of F connecting those columns to the current group. Qᵦ applies the vector quantizer to the rows of the adjusted group. Each selected codeword updates the error history that later groups will use.
There are two distinct sources of information in this step. The feedback tells the compressor which target vector to try to approximate, using the directions that matter for the layer. The codebook tells it which approximations it can store. The feedback rule belongs to BlockLDLQ. E8P provides the vectors that rule can select for the 2-bit setting, and residual codebooks provide the choices at higher bitrates.
What BlockLDLQ bounds
The analysis formalizes when feedback can improve the proxy error. It assumes a bound on the matrix of second moments of a quantizer’s error for every input vector it can receive.
E[(Qᵦ(x) − x)(Qᵦ(x) − x)ᵀ] ⪯ σ²I
Here x is a g-component vector to quantize, Qᵦ is the vector quantizer, and E averages over any randomness in that quantizer. The outer product describes how error components vary together. The symbol ⪯ orders symmetric matrices by positive semidefiniteness, so the right-hand matrix dominates the left in every direction. The scalar σ² governs the bound, and I is the identity in the group’s coordinate space.
E[tr((Ŵ − W)H(Ŵ − W)ᵀ)] ≤ (gmμ²σ² / n)[tr(H¹ᐟ²)]²
The expression on the left is the expected layer proxy loss. The expectation is over rounding randomness, whereas the calibration average is already captured by H. The group width is g, the output and input dimensions are m and n, and μ is the incoherence parameter for H. The bound σ² comes from the quantizer assumption. H¹ᐟ² is the positive semidefinite square root of H. The trace of this matrix is taken before squaring.
E[tr((Ŵ − W)H(Ŵ − W)ᵀ)] ≤ gmσ² tr(H)
This is the bound the paper gives under the same conditions for rounding all groups independently. The symbols retain the meanings in the previous display, with Ŵ now reconstructed by independent rounding. In the feedback result, the spectral dependence goes through the trace of the square root and the incoherence parameter. This gives the analysis a way to express potential gains when important input directions occupy a relatively small part of the spectrum and their eigenvectors are suitably spread over the coordinates.
The proof uses the fact that feedback reorganizes the errors in the quadratic objective. Define a residual η by taking the difference between each adjusted target and the codeword selected for it. The full matrix of these residuals is related to the difference between the original and reconstructed weights.
η = (W − Ŵ)Lᵀ
Here η collects the errors at the actual inputs to the vector quantizer, W and Ŵ are the weight matrices, and Lᵀ is the transpose of the triangular factor. Inserting this identity into the proxy leaves a quadratic form with D in the middle. Since D is block diagonal, each group contributes through its own error second moment. The quantizer assumption then bounds the expected loss by mσ² times the trace of D. The remaining work is to bound that trace using H.
tr(D) ≤ tr(H¹ᐟ²) · ‖H¹ᐟ² ⊙ Mᴅ‖₂
In this appendix bound, D comes from the block factorization of positive definite H. The square root and traces have their earlier meanings. Mᴅ is a mask of ones within the diagonal blocks and zeros elsewhere. The symbol ⊙ means entrywise multiplication, and ‖·‖₂ is the matrix operator norm. The bound isolates how much of the square root of H is concentrated in those blocks. The incoherence calculation controls that concentration and leads to the spectral term in the theorem. The objects under analysis are the layer proxy and the assumed errors of the vector quantizer, so the result provides a rationale for the algorithm at the level where it operates.
Construct a dictionary that can stay in cache
The transformed weights are approximately Gaussian in the authors’ account. In groups of coordinates, the distribution has a roughly ball-shaped concentration. A codebook made by choosing independently from a scalar grid fills out a box and devotes some of its available combinations to corners. A dictionary designed jointly can place points inside a more suitable region. The paper separates the shape of that region from the local arrangement of points within it.
|C| = 2ᵏᵈ
C is the dictionary, and |C| is its number of codewords. The vector dimension is d and k is the budget in bits per weight. The exponent kd counts the bits for a complete vector. QuIP# uses d equal to 8 for E8P, giving 16 bits for each codeword at the 2-bit weight setting. The challenge is to make the resulting set of choices available to the decoder without storing each vector separately.
E8 supplies the local arrangement. It has optimal unit-ball packing density in 8 dimensions, which motivates its use when many well-separated reconstruction points are needed in a bounded region. It also has symmetries that the implementation can use to generate one point from another. The packing property guides the point placement. The symmetry makes it practical to use that arrangement within a GPU kernel.
E₈ = (ℤ⁸ ∪ (ℤ⁸ + 1/2)) ∩ {x | 𝟙ᵀx is even}
E₈ names the lattice. ℤ⁸ denotes vectors with 8 integer coordinates, and adding 1/2 to each coordinate produces the all-half-integer set. The union ∪ includes both families, and the intersection ∩ restricts the result to the vectors x whose coordinates sum to an even value. The vector 𝟙 contains all ones, so 𝟙ᵀx is that sum. The vertical bar inside the braces means “such that.”
The authors build E8P from the even-sum half-integer part of the lattice. For a half-integer vector, flipping a coordinate sign changes the sum by an odd integer. Flipping an even number of signs therefore preserves the parity. As a consequence, a pattern of absolute values determines which parity of sign flips will land in the desired set. Knowing that parity and all but one sign is enough to reconstruct the remaining sign.
The table S contains absolute-value patterns. The authors choose 227 patterns with norm at most √10, where the norm measures distance from the origin before the final shift. They pad the set with 29 patterns of norm √12. This supplies 256 table entries, selected to give a concentrated overall shape and enough patterns to fill the index field. The paper specifies the padding patterns in its appendix.
A 16-bit word devotes 8 bits to the table index, 7 bits to sign choices, and 1 bit to the direction of a quarter-unit shift. After the lookup, the decoder recovers the omitted sign from the required parity. It then shifts every coordinate by +1/4 or −1/4 as specified by the last bit. The two shifted sets come from a translation of E8, so they share its packing geometry. The table stores only the absolute patterns and the decoder supplies the variation that each index can represent.
In the paper’s example, the codeword begins with the field 00,010,101, selecting entry 21. The selected pattern contains a 3/2 component amid coordinates of 1/2. It requires an odd number of sign changes to enter the even-sum half-integer set. The explicit sign field calls for an even number of flips, so the implicit sign must also be flipped. Finally, the shift field calls for addition of 1/4. The example illustrates how an operation on the codeword can replace storage of a separate vector for each sign pattern and shift.
The resulting logical codebook has 2¹⁶ entries, with lookups into a table of 2⁸ entries. The coordinate patterns in that table can be stored as 4-bit integers. Its 1KiB footprint is small enough for the authors’ GPU cache design even with the stated 32× duplication for bank conflicts. The table is shared across the linear layers. Its compactness is important because the sequence of weight indices can send adjacent lookups to quite different entries.
Add precision through residual quantization
At higher bitrates, a single flat dictionary with an entry for every possible group would grow too large. QuIP# uses residual vector quantization. It first selects a coarse approximation, then applies a second quantizer to the part of the original vector left unexplained. The two decoded vectors contribute to the same reconstruction.
δᵢ = Q(qᵢ)((x − Σⱼ<ᵢ δⱼ) / sᵢ) · sᵢ
The index i denotes the current stage, and j ranges over preceding stages. The vector x is the group being approximated. Each δⱼ is a reconstruction already contributed by stage j, and Σ sums those contributions. The scale sᵢ puts the current residual in the range of the codebook, Q(qᵢ) is the quantizer using qᵢ bits per weight, and the final multiplication returns the new contribution δᵢ to the original scale.
RVQ(x, p, q) = Σᵢ δᵢ
RVQ denotes residual vector quantization as a whole. The input x is the original group, q is the list of stage bitrates qᵢ, and p is their total. The sum is over all stages and yields the final approximation. This describes the representation recovered from the stored stage indices. During encoding, a later stage sees the residual created by the earlier choice.
The 4-bit setting uses E8P in both stages. For 3 bits, an E8P stage is followed by a 1-bit E8-based codebook. The latter includes E8 points with norms at most 2 and 15 further points with norm 4. The arrangement reuses the efficient lattice design and allows the stages to work at different scales.
Scale affects the part of the codebook that sees the most use. The implementation adjusts it using the weight matrix’s Frobenius norm and a factor denoted ρ. The authors use 0.9 for E8P. For the 3-bit residual scheme, they give approximate stage settings of 0.98 and 2.04. For 4-bit residual quantization, the approximate settings are 1.03 and 3.45. They obtain the starting values by minimizing error in Gaussian quantization, then use a coarse sweep to find suitable scales for individual networks. Slight variations reflect differences between the actual transformed weights and the Gaussian used to select those starting values.
Recover the computation as the blocks are converted
A transformer block contains several interacting linear layers. To see why there is a separate recovery procedure, consider what happens after one layer is converted. The next layer now receives activations from an approximate computation. Its own weights could still match the original exactly, yet the combined output could differ. Optimizing each weight matrix against its original inputs only handles part of this problem.
QuIP# first tunes within individual transformer blocks. Once a linear layer has been quantized, it adjusts the layers in that block whose weights are still available in full precision. Those layers can absorb some of the activation error before they undergo quantization in turn. Different transformer blocks can be treated in parallel. The paper credits AQLM with an earlier block-level tuning approach and distinguishes QuIP# by the timing of the adjustments and the parameters made available.
After all linear layers have been converted, a whole-network tuning pass adjusts remaining unquantized parameters to reduce activation error against the original. In both passes, the two sign vectors become real-valued tunable parameters. Initially these vectors only flip signs. Learning their magnitudes adds freedom to scale the coordinates and better accommodate the codebook. Those magnitudes are stored in FP16 in the resulting representation.
bₜ = 16(n + m) / (nm)
Here bₜ is the additional number of bits per weight for the two tuned vectors. Their lengths are n and m, the input and output dimensions. The factor 16 is the storage per entry, and nm counts the matrix weights. The overhead scales with the dimensions of the layer while the weight count scales with their product.
bᵤ = (n + m) / (nm)
Here bᵤ is the corresponding overhead without tuning. The vectors then store binary signs, one bit for each coordinate. The dimensions have the same meanings as above. The paper reports that these costs remain below 0.01 bits per weight at the sizes it considers, giving the smallest Llama 2 7B matrix as 4096 × 4096. The separately shared E8P table contributes much less than 0.01 bits per weight.
For the within-block procedure, the authors use Adam with a batch size of 8 and sequences of the native context length. The development data contains 256 training sequences and 128 validation sequences from RedPajama 1T. The paper reports 5 epochs and 160 steps for the within-block run, retaining the setting with the best validation result. Its base learning rate is given as 5 × 10⁻⁵.
The whole-network pass uses the same development split and epoch setup, with batch size 1. It normally uses the native context length, though the 70B run uses 3072 to fit the authors’ training implementation in memory. At 2 bits, both passes train the transformation vectors at 5 × 10⁻⁴ and retain the base rate for the other tuned parameters. The authors report that keeping the learning rate sufficiently low mattered more than the other tuning settings they considered.
The paper names Cornell-RelaxML/quip-sharp as the implementation repository and relaxml as the distribution point for the prequantized weights. The CUDA matrix-vector kernel for the E8P representation is designed for NVIDIA Ampere and newer GPUs. It embodies the last step of the method, where decoded vectors feed the matrix computation without having to keep a full expanded weight matrix in memory.
Experiments and results
Quality on text and zero-shot tasks
The main experiments cover Llama 1 and Llama 2 across sizes from 7 billion to 70 billion parameters. The text evaluations use Wikitext2 and C4 perplexity, with lower values indicating better predictive fit. Perplexity reflects how much probability a system places on the text under the evaluation procedure. The authors use the sampling functions from OPTQ and specify its C4 sampling variant rather than C4 New.
The zero-shot evaluation asks how well the compressed systems solve tasks without examples supplied for those tasks at test time. It uses LM Eval and reports the ordinary accuracy field, acc. The paper distinguishes it from the normalized field, acc_norm. These evaluations complement perplexity because the latter aggregates prediction quality over text, while task accuracy asks whether the resulting predictions select the correct answers.
The comparison includes AWQ and OmniQuant from the OmniQuant results, as well as AQLM and the original QuIP. The reported AWQ and OmniQuant configurations keep activations at 16-bit precision while changing weight precision. For AQLM, the paper uses the Jan 11, 2024 release of the comparison results and the configuration denoted 1 × 16. This uses a learned dictionary per linear layer with 2¹⁶ entries, each representing an 8-dimensional vector. The particular release matters because the authors note that AQLM evaluated an earlier QuIP# version.
Context length affects how much preceding text is available when computing perplexity. The paper therefore presents separate comparisons at context lengths 2048 and 4096. The AWQ and OmniQuant comparisons at 2048 follow those baselines’ Llama 2 evaluation setup. The comparison with AQLM at 4096 uses the native Llama 2 context. Matching each comparison to its evaluation length keeps a change in the amount of input context from being attributed to compression.
The largest differences appear at low precision
At context length 2048, the authors report that AWQ breaks down at 2.15 bits and describe OmniQuant’s 2-bit setting as unusable. QuIP# at 2 bits reaches quality close to OmniQuant at 3 bits. The result is significant for the storage question because the comparison involves both the approximation method and a change in the precision needed for usable predictions. The reduced QuIP# variant that uses Hadamard processing with scalar rounding also improves markedly on these baselines, before the lattice representation or recovery tuning is added.
The context-4096 comparison places QuIP# alongside AQLM where both have useful low-bit solutions. At 2 and 3 bits, the authors report cases with a clear advantage at a similar parameter count and cases where a smaller QuIP# system attains quality similar to a larger AQLM system. At 4 bits, results are similar and close to the FP16 reference. This pattern points to the regime where the structure of the quantizer matters most for the tested predictions. When both compressed representations already reproduce the FP16 results closely, the available improvements in that metric are smaller.
The zero-shot results show a corresponding pattern. QuIP# and AQLM outperform OmniQuant, and QuIP# tends to have the stronger comparison with AQLM at lower bitrates and smaller sizes. At higher precision and larger sizes, both come close to FP16. The authors caution that random variation can produce discrepancies of up to 0.5% even between FP16 accuracy measurements. Close results should be interpreted with that evaluation variation in mind.
The authors also flag effective precision as a relevant comparison condition. In their experience, a difference as small as 0.1 bits can materially affect quality in the extreme compression regime. Grouping scales, extra parameters and codebook choices all bear on how much storage a representation uses. A nominal rate remains a useful description of the weight code, while the full comparison depends on what must accompany that code at inference.
Read the scaling comparison as a storage question
At a given weight-storage budget, spending fewer bits on each weight makes room for a larger network. Whether that is worthwhile depends on the predictive benefit of the additional parameters and the quality cost of approximating them. The authors plot the relationship for different Llama sizes and precisions using Wikitext2, with additional scaling plots on C4. These plots address a different question from comparing several bitrates for a single checkpoint.
For both Llama families, the paper reports better Wikitext2 scaling at 3 bits than at 4 bits. Its 2-bit setting shows scaling comparable to the higher-bitrate settings. An appendix plot compares QuIP# and AQLM on Llama 2 with context length 4096 and reports stronger scaling for the 2- and 3-bit QuIP# settings than for the respective AQLM settings.
On Llama 2, the authors add a stronger reference by assigning FP16 quality to a hypothetical 4-bit representation. This gives the 4-bit option the predictive quality of the original at each parameter count while placing it on the storage axis as if those weights cost 4 bits each. The 3-bit QuIP# curve exceeds this idealized reference in the reported Wikitext2 comparison. The result tests the allocation of weight storage across precision and parameter count. It shows how a method with sufficiently small low-bit errors can make additional parameters worth more than the additional precision would be at that budget.
As far as the authors know, this is the first result of its kind for 3-bit PTQ. They also expect that future improvements might let 2-bit compression give better scaling than 3-bit compression. The observation for 2 bits here is similar scaling to the higher bitrates. The stronger ordering remains a prediction about what improved quantizers might achieve.
Generation depends on what the decoder fetches
For the generation tests on the NVIDIA RTX 4090, the paper reports results using both the FlashAttention Llama implementation and the HuggingFace Llama implementation. The FlashAttention test shows QuIP# obtaining over 50% of peak memory bandwidth during generation with 2-bit weights. The paper gives that device’s peak bandwidth as 1TB/s. The authors characterize their implementation as a proof of concept and note that it uses little fusion around the Hadamard operation. Fusion combines operations in a kernel and can avoid intermediate work or memory traffic. FlashAttention-2
In the HuggingFace comparison, the authors report a throughput gain for QuIP# over FP16, whereas the selected AQLM setup runs slower than FP16. The explanation concerns the memory accesses caused by the dictionary. AQLM’s entries are drawn from a separate 1MiB codebook for each linear layer in this configuration. The paper gives 256KB as the H100’s L1 capacity to illustrate the mismatch between that size and fast on-chip cache. Accesses across the dictionary are irregular, so a lookup can repeatedly require data from a slower level of memory.
E8P requires less than 5 decoding instructions per weight in the authors’ implementation. A table lookup gets the magnitude pattern, and the rest of the decoded vector is recovered through regular operations on the stored bits. Along with the fast transform, this reduces the overhead of using the compact representation. The bandwidth measurement captures how well those pieces work together in the tested generation path.
The paper reports comparisons with other published throughput results as well. QuIP# obtains approximately twice the original QuIP throughput at the same bitrate on an A6000. Against fast-inference approaches including SpQR and SqueezeLLM, the authors describe more than 40% higher throughput with equal or better quantization quality. These comparisons characterize the reported implementations and settings. They give a practical reason to consider the weight encoding and the decoder together when evaluating a quantization method. SqueezeLLM
Time to convert the weights
The implementation details identify NVIDIA A100 GPUs for the experiments apart from the generation timing runs. For Llama 2 70B, the authors give separate cost estimates for compression with and without tuning. The chart retains the qualifiers on those estimates. Both settings produce compressed weights, with different amounts of recovery work and different resulting quality.
Llama 2 70B quantization time excluding Hessian generation
The untuned conversion takes less time than the full tuning workflow.
The numbers
| System or setting | GPU-hours |
|---|---|
| QuIP# without fine-tuning (under) (this paper) | 10 |
| QuIP# with fine-tuning (around) | 100 |
These are costs for conversion after the proxy Hessians are available. The paper excludes their generation from both figures because the statistics can be reused across quantization runs. Its description of the tuning procedure separately gives around 50 GPU-hours for tuning a 70B network. That figure is attached to the tuning procedure, and the hardware discussion gives the broader estimate for the quantization run with tuning. Together they show where to look for the extra work when weighing preparation cost against fidelity.
The appendix reports a further architecture check using 2-bit QuIP# without fine-tuning on Mixtral 8x7B and Falcon 180B. Mixtral provides an example with a mixture of experts, and Falcon provides another architecture outside the Llama families. The implementation discussion describes using the publicly available Falcon dataset for these additional results. These runs extend the evaluation of the basic conversion procedure beyond the families used in the main comparisons. Falcon
What the ablations show
From scalar rounding to the full procedure
The main perplexity ablation uses the context-4096 setting and starts with a version of QuIP# that contains Hadamard processing and scalar rounding. Its scalar codebook is a half-integer grid. Lattice vector codebooks and fine-tuning are absent in that setting. The authors compare it with the original QuIP and use the difference to assess Hadamard processing against QuIP’s earlier Kronecker transform. The reported perplexity improvement is consistent with the stronger incoherence bound and is observed before recovery tuning enters the process. The QuIP reference is the result reported by AQLM, which is part of the provenance of that comparison.
The next version adds the lattice representation and keeps tuning disabled. Adding it lowers perplexity further in the reported ablation. This comparison tests the authors’ decision to use vectors after transforming the weights. The scalar version already benefits from a more dispersed distribution. Vector rounding gets another benefit from using groups whose available reconstruction points can be arranged around the region actually occupied by those groups. In this step, the change includes the block rounding required to use the vector codebook. The result therefore measures the lattice representation and its rounding procedure together.
The final comparison adds fine-tuning while keeping the lattice codebook. It yields another quality gain. The authors report improvements from each successive component across the evaluated bitrates. The evidence for fine-tuning concerns the complete recovery procedure, which includes adjustments inside blocks, the whole-network pass and updates to the transformation vectors. The appendix also reports a zero-shot ablation with the same progression from scalar rounding to lattice vectors and then tuning.
This sequence helps interpret why the components are combined. Changing bases improves the numerical problem presented to the quantizer even when the codebook is scalar. Changing the representable vectors can improve how well the quantizer uses its storage budget. Tuning acts on the errors left in the composed computation after rounding. Each successive comparison measures an addition in the presence of the components already enabled.
Hadamard and Fourier processing
The authors compare randomized Hadamard processing with the randomized fast Fourier alternative at 2 bits, with fine-tuning disabled. The metric is Wikitext2 perplexity at context length 4096. The Fourier version gives slightly worse results in this setting, while retaining strong performance by the paper’s account. Since the comparison turns off recovery, it provides a direct look at the choice of preprocessing used to prepare the weights for rounding.
The paper derives closely related concentration guarantees for both transforms. The observed difference shows the level of detail at which those guarantees operate. They control large transformed coordinates with high probability. Reconstruction can also respond to the detailed distribution of the weight groups and to how the chosen codebook covers them. The Fourier option consequently retains practical value for widths that are hard to factor for Hadamard processing, or on hardware where a fast Fourier implementation is easier to obtain.
Gaussian distortion and end-to-end quality
The paper first compares lattice constructions on a standard multivariate Gaussian. The reported metric is the minimum achievable elementwise mean squared quantization error for each tested codebook. Each construction selects lattice points within a ball to obtain the required number of reconstruction vectors. In these comparisons the E8-based constructions have lower error than the other presented lattice choices.
The D4 construction has favorable packing in its own dimension. The paper attributes some of the advantage of E8 to the greater dimensionality available for shaping the codebook. The experiments with half-integer grids also show reduced Gaussian quantization error as the vector dimension increases. That comparison separates the general advantage of grouping more coordinates from the particular packing density of E8.
The appendix tests a learned K-means dictionary without fine-tuning alongside E8P and alternatives based on other lattices. K-means places centers to reduce the average distance from the source to its representative vector. The authors point out that a learned dictionary can have lower distortion on the source distribution, yet they observe stronger performance from E8P in their quantized networks. One explanation they suggest is that coverage near the edge of the distribution remains useful for preserving the computation. The experiment identifies this possibility without separately measuring the contribution of those outer points.
Dictionary structure also changes what can be stored cheaply. The paper describes difficulty imposing the needed symmetries on a learned collection. Learning in the positive orthant can enforce sign symmetry but can also give poorer coverage near the coordinate axes. The authors compare FP16 storage for learned entries with 4-bit integer storage for E8P’s source coordinates. They report that the resulting 8-dimensional learned source table is 4 times larger than E8P’s, increasing cache pressure. The quality comparison and the storage analysis thus test different consequences of the same design choice.
The appendix’s comparison with grouped OmniQuant addresses another plausible source of improvement. Grouping gives the baseline more freedom to choose local scales, at a storage cost. The authors report that QuIP# keeps its quality advantage in this comparison. It extends the comparison beyond the ungrouped setting, where the baseline has less ability to respond to local variation in weight magnitude.
Limitations
Limits identified by the authors
The Hadamard method depends on the network widths and the fast transforms available for them. The paper’s mixed-dimension construction needs a suitable known Hadamard factor, and its computational advantage is most favorable when the power-of-2 factor dominates. The Fourier alternative has the simpler requirement of an even width. Its slightly weaker result in the comparison leaves the choice dependent on the dimensions and the implementation environment.
The authors treat Gaussian behavior as an approximation. Theoretical incoherence bounds control entry magnitudes. The scale search deals with the actual distribution seen by the codebook, and the authors report slightly different best scales across networks. A codebook obtained from Gaussian distortion is therefore a starting design with empirical calibration. The residual stages at higher precision are also a design choice. The authors explicitly identify more sophisticated multi-codebook methods as a possible source of quality improvements.
For BlockLDLQ, the guarantee requires a uniform second-moment assumption on the quantizer error and controls the quadratic proxy under that assumption. The authors acknowledge that the earlier scalar analysis included more detailed treatment of finite codebooks, and they leave corresponding extensions beyond their main block theorem. A bounded dictionary can have a different error profile near its edge than near the center. This is especially relevant when interpreting the connection between the theorem and the finite set of vectors implemented by E8P.
The paper describes recovery tuning as a recent and improvable approach. Its comparison with quantization-aware training includes an extrapolation at 4 bits. The authors contrast their compression workflow with 960 GPU-hours used by LLM-QAT to generate training data, while acknowledging that quantization-aware training for these systems remained relatively underexplored. That comparison mixes different workflows and cost components. It motivates the practical appeal of a short recovery procedure, with broader equivalence in quality or computational cost still open. LLM-QAT
Finally, the authors acknowledge that a representation could trade slower decoding for better quantization quality. The small, structured table restricts how freely reconstruction points can be placed. They also identify the CUDA implementation as a proof of concept. The reported bandwidth use supports the chosen design under the measured conditions, with room for implementation changes and for different choices on the speed–quality frontier.
Boundaries of the evidence
The main quality comparisons test particular checkpoints from the Llama families, explicitly matched contexts, and selected baselines. The auxiliary architecture checks show that the untuned conversion runs beyond Llama. The main scaling, timing and recovery comparisons remain evidence about their own tested configurations. Strong generalizations about other network families would require the same kinds of comparisons under their own shapes and input distributions.
Calibration makes the proxy conditional on the inputs observed. RedPajama supplies the Llama calibration and development data. Directions that matter heavily for a specialized application could receive different weight from what they receive in this estimate. Wikitext2 and C4 perplexity, and the separate zero-shot accuracy tests, provide evidence on the evaluated text and tasks. They leave open how much compression changes performance on particular capabilities outside those tests.
The appendix gives sample outputs from Llama 2 70B chat at 2 bits, truncated to 256 tokens. They illustrate the kinds of responses the compressed system can produce, including prose and code. Their evidentiary role is qualitative. Establishing error rates or factual fidelity would require a comparison with systematic sampling and a definition of correctness for each task.
The recovery ablation concerns a sequence of configurations. It provides evidence that enabling the implemented tuning package improves the result after lattice quantization. It leaves the magnitude of the within-block and whole-network contributions individually undetermined. The change from scalar to lattice rounding likewise bundles a change in representable points with the blockwise mechanism that selects them. The published comparisons evaluate usable configurations, with finer attribution open.
The storage and speed measurements apply to weight-only compression. The memory required for all other parts of inference depends on the deployment. Timing also depends on such details as the inference library, the cache organization and the implementation of the transforms and decoding kernel. The measured throughput describes the reported GPU paths, with different batch conditions or processors requiring their own evidence. AQLM’s runtime in these experiments is specifically the runtime of the tested dictionary configuration.
The scaling result is bounded by what is varied and what is measured. It concerns prediction quality as a function of weight storage across sizes in the tested families. Its idealized 4-bit comparison keeps the FP16 quality for each parameter count by construction. It gives a stringent reference for the observed storage tradeoff while leaving open what precision would be best for other size ranges, architectures, tasks or runtime budgets.
What came after
Rotations, formats and execution
QuaRot studies outlier-free 4-bit inference in rotated language systems. It takes up the use of a coordinate change to make low precision practical, the same problem QuIP# treats through incoherence processing. The connection is closest at the level of the representation before quantization. QuIP# then makes its own choice of objective, block rounding and lattice dictionary to store the rotated weights. QuaRot
FlashAttention-3 investigates fast, accurate attention using asynchronous execution and low precision. Its object is the attention computation. The relationship to QuIP# lies in the practical requirements for converting low precision into real speed. QuIP# studies whether a compact weight format can be decoded fast enough on the device, while FlashAttention-3 approaches the execution question through attention and its scheduling. FlashAttention-3
ARCQuant considers how augmented residual channels can improve NVFP4 quantization. It shares an interest in recovering accuracy within a constrained format. For comparison, QuIP# represents the residual from one codeword with a further codeword at higher bitrates. The title of ARCQuant identifies its intervention at the level of residual channels, a distinct place to look for accuracy lost when precision is reduced. ARCQuant
Adaptive training and vector representations
EfficientQAT focuses on making quantization-aware training efficient. QuIP# reaches into the neighboring space by tuning a limited set of parameters during and after conversion. EfficientQAT’s focus continues the question raised by that comparison: how much optimization can be done within a practical preparation budget when the final representation uses low precision? EfficientQAT
The additive quantization work behind AQLM appears both in QuIP#’s own comparisons and among the works that cite it. The QuIP# paper describes AQLM’s learned vector dictionaries and credits its use of tuning to account for interactions within transformer blocks. The two papers give concrete points of comparison for extreme compression. They differ in how they organize the representative vectors, how they tune around quantization and how much dictionary data the measured decoder has to retrieve. Extreme Compression via Additive Quantization
SCVQ studies sparse compensation in conjunction with vector quantization. It takes up a question that also matters in QuIP#: where to spend additional expressive power once a compact vector representation has introduced errors. QuIP# distributes weight magnitudes before rounding and uses feedback and tuning for recovery. SCVQ’s stated focus is compensation through a sparse component alongside the vector representation. SCVQ
Sensitivity and performance evaluation
Work on layer-wise information effectiveness studies post-training quantization in small language systems. Its layer-level focus connects to QuIP#’s use of activation statistics to evaluate local weight errors and its later effort to compensate across layers. A related study focuses on optimizing the proportion of high-impact parameters across layers. Together these topics continue the question of how compression decisions account for the different contributions of weight choices to the final computation. Exploring Layer-wise Information Effectiveness Layer-Wise High-Impact Parameter Ratio Optimization
The work on signal degradation and computation collapse studies kinds of failure under quantization. Its subject complements evaluations such as QuIP#’s perplexity and task accuracy comparisons, which measure the final behavior after approximation. Looking at failure modes moves the question inside the computation, towards how errors develop and where the system’s behavior breaks down. From Signal Degradation to Computation Collapse
The study of accuracy–performance tradeoffs in quantization puts the two outcomes QuIP# measures into a broader comparison. Its stated subject captures why weight precision alone is an incomplete description of a deployment: the representation must be judged alongside predictive behavior and measured execution. ArcLight takes up efficient inference on many-core CPUs, a setting in which that same question concerns a different memory and execution architecture. Accuracy–Performance Trade-Offs in LLM Quantization ArcLight
Fields, topics and concepts
Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 worksComputer Vision and Pattern Recognition · 3,621 works
Topics 2Research subjects and languages the work is about.Language models & pretraining · 4,145 worksEfficient models & compression · 328 works
Cite
Cite as Albert Tseng, Jerry Chee, Qingyao Sun, Volodymyr Kuleshov and Christopher De Sa. 2024. QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks. arXiv:2402.04396.
@misc{tseng2024quip,
title = {{QuIP\#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks}},
author = {Albert Tseng, Jerry Chee, Qingyao Sun, Volodymyr Kuleshov and Christopher {De Sa}},
year = {2024},
doi = {10.48550/arxiv.2402.04396},
eprint = {2402.04396},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2402.04396}
}References
- Almazrouei, E., Alobeidli, H., Alshamsi, A., Cappelli, A., Cojocaru, R., Debbah, M., Étienne Goffinet, Hesslow, D., Launay, J., Malartic, Q., Mazzotta, D., Noune, B., Pannier, B., and Penedo, G. The falcon series of open language models, 2023. our card
- Chee, J., Renz, M., Damle, A., and Sa, C. D. Model preserving compression for neural networks. In Oh, A. H., Agarwal, A., Belgrave, D., and Cho, K. (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=gt-l9Hu2ndd. OpenAlex ↗ · Scholar ↗
- Chee, J., Cai, Y., Kuleshov, V., and Sa, C. D. QuIP: 2-bit quantization of large language models with guarantees. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=xrk9g5vcXR. OpenAlex ↗ · Scholar ↗
- Cochran, W., Cooley, J., Favin, D., Helms, H., Kaenel, R., Lang, W., Maling, G., Nelson, D., Rader, C., and Welch, P. What is the fast fourier transform? Proceedings of the IEEE, 550 (10):0 1664–1674, 1967. . OpenAlex ↗ · Scholar ↗
- Computer, T. Redpajama: An open source recipe to reproduce llama training dataset, 2023. URL https://github.com/togethercomputer/RedPajama-Data. OpenAlex ↗ · Scholar ↗
- Dao, T. FlashAttention-2: Faster attention with better parallelism and work partitioning. 2023. our card
- Dao, T., Fu, D. Y., Ermon, S., Rudra, A., and Ré, C. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, 2022. OpenAlex ↗ · Scholar ↗
- Dettmers, T. and Zettlemoyer, L. The case for 4-bit precision: k-bit inference scaling laws. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 7750–7774. PMLR, 23–29 Jul 2023. URL https://proceedings.mlr.press/v202/dettmers23a.html. our card
- Dettmers, T., Svirschevski, R., Egiazarian, V., Kuznedelev, D., Frantar, E., Ashkboos, S., Borzunov, A., Hoefler, T., and Alistarh, D. Spqr: A sparse-quantized representation for near-lossless llm weight compression, 2023. OpenAlex ↗ · Scholar ↗
- Egiazarian, V., Panferov, A., Kuznedelev, D., Frantar, E., Babenko, A., and Alistarh, D. Extreme compression of large language models via additive quantization, 2024. our card
- Fino and Algazi. Unified matrix treatment of the fast walsh-hadamard transform. IEEE Transactions on Computers, C-250 (11):0 1142–1146, 1976. . OpenAlex ↗ · Scholar ↗
- Frantar, E., Ashkboos, S., Hoefler, T., and Alistarh, D. OPTQ: Accurate quantization for generative pre-trained transformers. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=tcbBPnfwxS. OpenAlex ↗ · Scholar ↗
- Gao, L., Tow, J., Abbasi, B., Biderman, S., Black, S., DiPofi, A., Foster, C., Golding, L., Hsu, J., Le Noac'h, A., Li, H., McDonell, K., Muennighoff, N., Ociepa, C., Phang, J., Reynolds, L., Schoelkopf, H., Skowron, A., Sutawika, L., Tang, E., Thite, A., Wang, B., Wang, K., and Zou, A. A framework for few-shot language model evaluation, 12 2023. URL https://zenodo.org/records/10256836. OpenAlex ↗ · Scholar ↗
- Halko, N., Martinsson, P.-G., and Tropp, J. A. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 530 (2):0 217–288, 2011. OpenAlex ↗ · Scholar ↗
- Hedayat, A. and Wallis, W. D. Hadamard Matrices and Their Applications. The Annals of Statistics, 60 (6):0 1184 – 1238, 1978. . URL https://doi.org/10.1214/aos/1176344370. OpenAlex ↗ · Scholar ↗
- Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary, B., Bamford, C., Chaplot, D. S., de las Casas, D., Hanna, E. B., Bressand, F., Lengyel, G., Bour, G., Lample, G., Lavaud, L. R., Saulnier, L., Lachaux, M.-A., Stock, P., Subramanian, S., Yang, S., Antoniak, S., Scao, T. L., Gervet, T., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mixtral of experts, 2024. OpenAlex ↗ · Scholar ↗
- Juang, B.-H. and Gray, A. Multiple stage vector quantization for speech coding. In ICASSP '82. IEEE International Conference on Acoustics, Speech, and Signal Processing, volume 7, pp. 597–600, 1982. . OpenAlex ↗ · Scholar ↗
- Kim, S., Hooper, C., Gholami, A., Dong, Z., Li, X., Shen, S., Mahoney, M., and Keutzer, K. Squeezellm: Dense-and-sparse quantization. arXiv, 2023. our card
- Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization, 2017. our card
- Kostina, V. and Verdú, S. Fixed-length lossy compression in the finite blocklength regime: Gaussian source. 2011 IEEE Information Theory Workshop, ITW 2011, 10 2011. . OpenAlex ↗ · Scholar ↗
- Lin, J., Tang, J., Tang, H., Yang, S., Dang, X., Gan, C., and Han, S. Awq: Activation-aware weight quantization for llm compression and acceleration, 2023. OpenAlex ↗ · Scholar ↗
- Liu, Z., Oguz, B., Zhao, C., Chang, E., Stock, P., Mehdad, Y., Shi, Y., Krishnamoorthi, R., and Chandra, V. Llm-qat: Data-free quantization aware training for large language models, 2023. our card
- Lloyd, S. Least squares quantization in pcm. IEEE Transactions on Information Theory, 280 (2):0 129–137, 1982. . OpenAlex ↗ · Scholar ↗
- Nagel, M., Amjad, R. A., Van Baalen, M., Louizos, C., and Blankevoort, T. Up or down? Adaptive rounding for post-training quantization. In III, H. D. and Singh, A. (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 7197–7206. PMLR, 13–18 Jul 2020. URL https://proceedings.mlr.press/v119/nagel20a.html. OpenAlex ↗ · Scholar ↗
- Nagel, M., Fournarakis, M., Bondarenko, Y., and Blankevoort, T. Overcoming oscillations in quantization-aware training. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 16318–16330. PMLR, 17–23 Jul 2022. URL https://proceedings.mlr.press/v162/nagel22a.html. OpenAlex ↗ · Scholar ↗
- Nguyen, E., Poli, M., Faizi, M., Thomas, A., Birch-Sykes, C., Wornow, M., Patel, A., Rabideau, C., Massaroli, S., Bengio, Y., Ermon, S., Baccus, S. A., and Ré, C. Hyenadna: Long-range genomic sequence modeling at single nucleotide resolution. 2023. OpenAlex ↗ · Scholar ↗
- Rozière, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X. E., Adi, Y., Liu, J., Sauvestre, R., Remez, T., Rapin, J., Kozhevnikov, A., Evtimov, I., Bitton, J., Bhatt, M., Ferrer, C. C., Grattafiori, A., Xiong, W., Défossez, A., Copet, J., Azhar, F., Touvron, H., Martin, L., Usunier, N., Scialom, T., and Synnaeve, G. Code llama: Open foundation models for code, 2024. our card
- Shao, W., Chen, M., Zhang, Z., Xu, P., Zhao, L., Li, Z., Zhang, K., Gao, P., Qiao, Y., and Luo, P. Omniquant: Omnidirectionally calibrated quantization for large language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=8Wuvhh0LYW. our card
- Sloane, N. Hadamard Matrices — neilsloane.com. http://neilsloane.com/hadamard/. [Accessed 02-02-2024]. OpenAlex ↗ · Scholar ↗
- Sun, M., Liu, Z., Bair, A., and Kolter, J. Z. A simple and effective pruning approach for large language models. In Workshop on Efficient Systems for Foundation Models @ ICML2023, 2023. URL https://openreview.net/forum?id=tz9JV2PRSv. OpenAlex ↗ · Scholar ↗
- Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., Rodriguez, A., Joulin, A., Grave, E., and Lample, G. Llama: Open and efficient foundation language models, 2023a. our card
- Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Ferrer, C. C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M.-A., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. Llama 2: Open foundation and fine-tuned chat models, 2023b. our card
- Viazovska, M. The sphere packing problem in dimension $8$. Annals of Mathematics, 1850 (3), May 2017. ISSN 0003-486X. . URL http://dx.doi.org/10.4007/annals.2017.185.3.7. OpenAlex ↗ · Scholar ↗
- Xi, H., Li, C., Chen, J., and Zhu, J. Training transformers with 4-bit integers. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=H9hWlfMT6O. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/tseng-2024-quip-even-better-llm-quantization/