Manuscript Offprint

arXiv:2610.09212

CurveTQ: Rotation-Free Trellis Quantization of LLM Weights via Curvature-Weighted Search

Guanhua Ding, Zi Wang, Ruichao Li, Jack Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

The best two-bit weight quantizers for large language models, such as QTIP and Proteus, share a recipe. Each weight matrix is first rotated by a random orthogonal transform so that its entries look Gaussian, and this rotation has to be undone at every decoding step. The rotated weights are then encoded with a trellis or lattice code under a Euclidean search, and the layer Hessian is used only in the error-feedback step between coding blocks. We show that this recipe leaves part of the Hessian unused. Error feedback turns the loss into a weighted sum of per-coordinate rounding errors, and the weights, the diagonal of the Hessian's LDL factorization, are computed by existing quantizers but never read. We put these weights into the search's distance, the Viterbi branch metric, so that the search follows the curvature within each coding block. This also explains what the rotation is for. The rotation removes this within-block variation, so after it the weight has little left to exploit. Weighting in the native basis and rotating are therefore substitutes. We confirm this on three models: the weighted native search matches the baselines' rotation, a full-dimension randomized Hadamard, to within about one point of downstream accuracy, and weighting after the rotation gains little. Around this search we build CURVETQ, a trellis codec with no rotation. The rotation also flattened the amplitude and the marginal shape of the weights, which we handle directly with a factored scale field and a closed-form quantile table. In either basis, error feedback passes each block's residual on to the next, so we store a start state per coding block that lets the trellis adapt to it. At two bits CURVETQ is 1–3 points higher in mean downstream accuracy than QTIP and Proteus on three 4–8B Instruct models, even after both are given our start state, which by itself lifts either baseline by 1–3 points. It also leads on a 35B mixture of experts, to our knowledge the first trellis-coded result on such a model. With no rotation to undo, our decoder is the fastest of the three at all tested batch sizes and bit widths.

1 INTRODUCTION

When a large language model (LLM) generates text one token at a time, the cost of each step is dominated by reading the model's weights from memory. Storing fewer bits per weight therefore directly translates into faster decoding. At four bits per weight, post-training quantization (PTQ) is by now routine (Frantar et al., 2023; Lin et al., 2024). The open frontier is two to three bits, where quantized models still lose a large amount of accuracy, and where the choice of the code, how groups of weights are jointly mapped to a small set of stored indices, matters more than the choice of the scalar grid (Tseng et al., 2024b; Egiazarian et al., 2024).

The strongest two-bit trellis and lattice codecs today follow the same three-step recipe, which we call transform-and-flatten (Figure 1a). First, each weight matrix is rotated by a random orthogonal transform, so that its entries look like independent Gaussian samples (Chee et al., 2023; Tseng et al., 2024a). Second, the rotated weights are encoded with a high-dimensional code, a trellis or a lattice, using a Euclidean search and a Gaussian-shaped reconstruction. Third, the layer Hessian, which says how sensitive the layer output is to an error in each input coordinate, enters only through an error-feedback step between coding blocks (LDLQ). QTIP (Tseng et al., 2024b) is the canonical instance; Proteus (Yang et al., 2026) replaces its lookup table by a computed code but keeps the rotation and the Euclidean search. The recipe has a cost at every decoding step: the rotation has to be undone at inference time, either on the activations or on the weight-decoding path.

∗^{*}Equal contribution.

What error feedback leaves unused. It is tempting to think that the feedback step has taken care of the Hessian, so that the search inside a block can safely be Euclidean. In fact, feedback only rearranges the loss of a row into a weighted sum of its per-coordinate rounding errors (Eq. 1). The weights are the diagonal D of the Hessian's LDL factorization, the same quantity GPTQ divides its residuals by (Chee et al., 2023; Frantar et al., 2023). In the native basis these weights differ by orders of magnitude between input channels, because a few channels carry outlier activations. Yet, to our knowledge, every trellis and lattice quantizer ignores them and minimizes the unweighted error inside the block; QTIP computes their block form as part of its feedback step and never reads it. Our first step is simply to use them. Placed in the Viterbi branch metric, they change neither the code nor the decoder, and, as we show next, they make the rotation unnecessary.

Why the rotation then becomes unnecessary. Once the weight is in the search, the random rotation turns out to act on the same quantity. The rotation is meant to make all coordinates look alike, and for the raw Hessian diagonal it does. For the LDL diagonal it does not: Figure 2(a) shows that it turns the jagged native weights into a smooth ramp along the coding order, nearly flat within one 64-column block. A weight that is constant within a block does not change which path the block's search selects, so after rotation the weighted and the Euclidean search coincide: the rotation removes the structure the weight exploits. Proposition 1 relates the weighted search's gain over the Euclidean one, in the high-resolution limit, to the within-block variation of these weights, which is large in the native basis and near zero after rotation. Weighting and rotating are therefore substitutes, which Section 4.2 confirms on three models. A rotation also flattens the local amplitude and the marginal shape of the weights; we handle both directly, with a factored group scale and a closed-form quantile table (Section 3.3), so the decoder needs no transform (Figure 1b).

What else the block boundary changes. Taking the feedback block seriously has a second consequence, for the trellis termination. Under feedback, the first columns of each block carry the residual pushed forward from the previous block, so the boundary is where the search needs the most freedom. QTIP's tail-biting trellis ties each tile's first coordinates to its last, constraining exactly this boundary, and stores no start state; we instead let each block start in any trellis state and store the choice (Section 3.1). The 14 stored bits per block are 0.22 bpw, our largest single component, and not specific to our codec: given to QTIP and Proteus, the same state is worth 1–3 downstream points at two bits. Removing the state costs 2–4 perplexity and 5 downstream points, ten times the cost of a group-scale field of the same size. At decode time it is one load per block, 1–3% of throughput.

Contributions. (1) We show that the curvature weight and the random rotation are substitutes: the LDL diagonal in the branch metric exploits what a rotation removes (Sections 3.1–3.2). On three models the weighted native search matches, to within about a point of mean accuracy, the full-dimension rotation QTIP deploys at equal rate (Section 4.2). The loss identity (Chee et al., 2023) and weighted trellis search (Fischer & Wang, 1992) are both known; what is new is that together they make the rotation unnecessary. (2) We replace QTIP's tail-biting termination by a block-local trellis with a stored start state per block, our largest single rate component and the one that creates the two-bit downstream margin (Sections 3.1, 4.3). It is not specific to our codec: transferred unchanged to QTIP and Proteus, it lifts each by 1–3 points (Section 4.1). (3) Using (1), we build CURVETQ, a rotation-free trellis codec; in the native basis, its per-module quantile table and factored scale field handle the marginal shape and the local amplitude that a rotation would have flattened (Section 3.3). Against QTIP and Proteus given our start state it is 1–3 points higher downstream at two bits on three Instruct models (Section 4.1). It also leads on a 35B mixture of experts, to our knowledge the first trellis-coded result on one; at 32B the start state alone closes most of the baselines' gap. (4) With no rotation to undo, our decoder is faster than both baselines' kernels at batch 1 to 128 (Section 4.4).

References (69)