Manuscript Offprint

arXiv:2608.23144

Activation-Weighted Seeded Residual Coding for Low-Bit LLM Weight Repair

Zehao Liu, Chuangchuang Fang, Yang Ren

ABSTRACT

Low-bit weight quantization saves storage but leaves errors that degrade language-model quality. We introduce activation-weighted seeded residual coding (AWSRC), a compact repair codec for an existing quantization backbone. Given a reconstructed weight W0W_0, AWSRC encodes the residual W−W0W - W_0 using deterministic seed-generated bases. The sidecar stores seed selectors, low-bit coefficients, and scales rather than an explicit codebook. Activation statistics prioritize errors that affect layer outputs. On Qwen2.5-3B-Instruct, adding 0.162 scope-bits/weight to an INT4 RTN backbone closes 88.2%, 78.9%, and 71.3% of the matched PPL, KL, and accuracy gaps to BF16. Repairing a matched strong low-bit backbone also improves all measured quality metrics. With a matched 49.25 MB sidecar, about 0.8% of the BF16 model-weight payload, AWSRC gives the best perplexity and mean task accuracy among sparse, low-rank, and vector-quantized codecs.

Index Terms— large language models, weight quantization, residual coding, seeded coding, model compression

1. INTRODUCTION

Large language models are expensive to store, transfer, and load because their weights contain billions of parameters. Weight-only post-training quantization (PTQ) reduces this cost without retraining and is therefore attractive when an existing checkpoint must be deployed under a fixed memory budget. Simple round-to-nearest (RTN) quantization is inexpensive; methods such as GPTQ and AWQ use calibration to preserve more quality [1, 2]. These backbones make different accuracy-cost trade-offs, but each produces a reconstructed weight W0W_0 that differs from its high-precision source WW. The remaining error R=W−W0R = W - W_0 is useful information. Adding it back exactly would recover WW, but a dense high-precision copy of RR is as costly as the weight it repairs. A practical residual code must therefore recover model quality with a small and explicitly measured payload. This is not only a matrix-approximation problem. Errors should be measured by their impact on layer outputs, while all methods should be compared under the same end-to-end storage budget, including metadata and padding.

We study this problem as post-hoc residual repair. The parent quantizer and W0W_{0} remain fixed, while a separately serialized sidecar approximates R. This separation has two advantages. First, repair can be attached to a cheap or already available backbone without repeating its optimization. Second, the parent and repaired model can be evaluated as a matched pair, so the quality gain and additional bytes are directly attributable to the residual codec.

Three challenges shape the design. First, the residual is neither guaranteed to be sparse nor well approximated at a small rank. Sparse correction pays for coordinates [3], low-rank correction stores dense factors [4, 5], and vector quantization stores assignments together with a learned codebook [6, 7]. Second, treating all weight errors equally can waste compression capacity on coordinates that rarely affect layer outputs under the model's actual input distribution. Third, a useful sidecar should be independently budgeted, deterministically decodable, and compatible with more than one backbone. Seeded coding provides a compact alternative to an explicit basis or codebook. Encoder and decoder share a deterministic generator, so a short seed identifies a reproducible set of basis atoms. SeedLM applies this principle to complete weight blocks [8]. An alternative is to retain the reconstruction of an off-the-shelf quantizer and seed-code only its residual. This reduces the coding target to a smaller-magnitude signal while keeping the correction relative to a fixed base quantizer.

We propose AWSRC, an activation-weighted seeded residual codec. AWSRC partitions R into tiles, generates candidate bases from seed-dependent sign flips and selected Hadamard columns, and fits low-bit coefficients under an activation-weighted least-squares objective. The central design decision is to optimize repair gain per stored byte rather than approximate every residual tile uniformly. Records are selected by activation-weighted error reduction per serialized byte. This criterion jointly determines basis choice, tile selection, and progressive order, while preventing apparent gains from unreported metadata overhead. Each record stores a tile index, seed selector, quantized coefficients, and scale. Decoding requires no search. The stored selector regenerates the basis and adds the correction to its designated tile. Because every record is additive, omitted tiles retain the exact parent reconstruction and a repair stream can be removed without changing the backbone format. Records may also be gain-ordered into a progressive stream, where every complete-record prefix reconstructs against the same W0W_{0}. AWSRC assumes only that a backbone supplies W0W_{0}, allowing the same codec to repair both inexpensive RTN and stronger calibrated backbones. We make three contributions.

• A zero-codebook residual codec with seed-generated bases and compact low-bit repair records.

• Activation-weighted fitting and byte-normalized allocation, with optional Fisher weighting and progressive prefixes.

• A byte-audited five-model evaluation. At +0.162 scope-bpw, AWSRC recovers 88.2%, 78.9%, and 71.3% of the matched PPL, KL, and accuracy gaps to BF16.

References (19)