acceptodds
Under review as a conference paper at ICLR 2027

QGATE: Counterexample-Guided Precision Patching of Quantized LLMs with Fail-Closed Slice Reporting

Abstract

Quantized large language models can retain aggregate quality while changing their answers on specific slices of behavior, such as bias categories, low-resource languages, and safety prompts. Post-training quantization optimizes aggregate loss and does not localize these changes; existing repair methods add runtime modules, train weights, or rely on solvers that do not scale to 7B-parameter models, and none reports what it leaves unfixed. We propose QGATE, a training-free loop that treats every input on which a quantized model and its full-precision reference disagree (a flip) as a counterexample. QGATE targets the slice whose flip rate is largest relative to its tolerance, shortlists weight regions by the activation traffic of its flipped inputs, and applies patches native to the serving format: raising the bit-width of weight groups, re-solving stored quantization scales, and correcting biases where present. A patch is accepted only when a full discovery sweep, charging it for the flips it creates, confirms the improvement within a byte budget and a latency cap. Once the patched model is frozen, QGATE reports all 23 slices of its manifest: sampled slices carry simultaneous Clopper-Pearson upper bounds on sealed pools, exhaustively evaluated slices carry exact rates, and any slice not shown to be within tolerance is declared uncertified (fail-closed). On three shipped Qwen2.5-7B and Llama-3.1-8B configurations in EXL2 and GGUF, QGATE cuts the flip rate of the initially worst tolerance-normalized slice by 37.2–60.3% within a 96 MB budget, changes perplexity by at most 0.35%, and leads all eleven matched-cost baselines on the primary one (37.2% vs. at most 23.0%). On Llama, re-solving scales alone adds no bytes yet cuts more than raising bit-widths alone with 80 MB (46.6% vs. 43.8%). It certifies every primary-configuration slice and declares 2 and 7 slices uncertified on the stressed ones instead of passing them.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.