QDA: Closed-Loop LLM Quantization Design with Agents
Xingyang Li, Tianlang Zhao, Song Han, Ligeng Zhu
MIT · NVIDIA
Published November 17, 2026 · on the feed November 19, 2026 · ▲ 13 · arXiv 2611.23388
The abstract
Post-training quantization is the standard way to serve large language models at low cost. However, the best quantization recipe differs across models and precisions. As a result, experts must redesign it for every new model, which is time-consuming and often sub-optimal. Fortunately, an LLM agent can take over this design by refining the recipe over rounds of building and evaluating candidates, so that more rounds lead to better recipes. However, evaluating one quantized reasoning model takes tens of GPU-hours, and combining methods from different codebases means porting each to the new architecture by hand. We present QDA, a system in which an agent designs the recipe for each model and precision. To make evaluation fast, QDA scores each candidate in minutes by its output KL divergence from the original model on reasoning traces that the agent never sees, and checks promising ones with long generations to catch failures such as repetition loops. To make building fast, QDA provides a library of public PTQ methods that are compatible with one another and with new model architectures. Across four reasoning models, QDA improves accuracy over the strongest public recipe by 0.9, 1.4 and 2.2 percentage points on average at W4A16, W4A8 and W3A16, using 64 GPU-hours per search. On the 320B-parameter MoE model GLM-5.3-Flash at NVFP4 W4A4, it recovers 98.3% of the FP8 model's accuracy, against 96.9% for the best vendor checkpoint. Every QDA checkpoint also runs on existing serving kernels with no inference overhead. We will release the library, the evaluator and the harness.
The Brief
2:55A short podcast summary of the paper. Written and voiced by AI.
Transcript
QDA. Closed-Loop LLM Quantization Design with Agents. By Xingyang Li and three others, from MIT and NVIDIA. Published on the seventeenth of November.
Post-training quantization is the standard way to serve large language models cheaply. The trouble is that the best quantization recipe differs from model to model and from one precision to another. Experts have to redesign the recipe for every new model, which takes time and often lands short of the best possible result.
An agent built on a language model could take over the design, refining the recipe over rounds of building and evaluating candidates, so that more rounds yield better recipes. Two costs stand in the way. Evaluating a single quantized reasoning model takes tens of GPU-hours. And combining methods that live in different codebases means porting each of them to the new architecture by hand.
QDA is a system in which an agent designs the recipe for each model and each precision, in a closed loop. Its two supporting pieces each target one of those costs: one makes evaluation fast, the other makes building fast. The goal is a loop tight enough that the agent can actually run many rounds, since more rounds are what lead to better recipes. Rather than an expert hand-tuning a recipe once per model and per precision, the agent searches for one each time, and the system around it keeps that search affordable.
For evaluation, QDA scores each candidate in minutes rather than hours. The score is the KL divergence between the candidate's outputs and the original model's, measured on reasoning traces that the agent never sees. Promising candidates are then checked with long generations, to catch failures such as repetition loops that a short score might miss. The fast score does the bulk of the filtering, and the slower check is reserved for the few candidates that look worth the expense.
For building, QDA provides a library of public PTQ methods made compatible with one another and with new model architectures, so the agent can combine them without porting each one by hand.
Across four reasoning models, QDA improves accuracy over the strongest public recipe. On average the gain is zero point nine percentage points at W4A16, one point four points at W4A8, and two point two points at W3A16. Each search uses sixty-four GPU-hours. Set against the tens of GPU-hours that a single full evaluation of one quantized reasoning model can take, that is the budget for an entire search.
The largest test is GLM-5.3-Flash, a mixture-of-experts model with three hundred and twenty billion parameters, quantized at NVFP4 W4A4. There QDA recovers ninety-eight point three percent of the FP8 model's accuracy. The best vendor checkpoint recovers ninety-six point nine percent. Every QDA checkpoint also runs on existing serving kernels, with no inference overhead.
The agent is only as useful as the loop it runs in. By shrinking each evaluation from tens of GPU-hours to minutes and removing the porting work, QDA makes it practical to run enough rounds for an agent to improve the recipe, and the resulting checkpoints drop into existing serving with nothing extra to pay at inference. The authors plan to release the library, the evaluator and the harness.
The deep dive
5:52A longer episode, written from the whole paper. Written and voiced by AI.
Transcript
QDA. Closed-Loop LLM Quantization Design with Agents. By Xingyang Li and three others, from MIT and NVIDIA. Published on the seventeenth of November. This is the long version: the whole paper rather than the abstract.
A quantized model comes from a recipe: a stack of methods, their settings, and the calibration data they learn from. The best recipe keeps changing. With four-bit weights, ParoQuant wins on Qwen3.5-9B, AWQ on Qwen3.8-27B, and GPTQ on the distilled DeepSeek R1 Llama model. On Qwen3.5-9B alone, AWQ beats GPTQ by five point one points at four bits, then loses to it by twelve point three at three bits. So experts write recipes by hand. NVIDIA's ModelOpt keeps a separate one for each of twenty-eight models, while more than ninety large open-weight models were released in about a year.
An agent could search by trial and error, as an expert does. Two costs stand in the way. The first is evaluation. A reasoning model writes very long answers, one different token can change the rest of the reasoning, and a benchmark like AIME holds only tens of problems, so a reliable score averages many samples. A full evaluation of one checkpoint takes twenty-three to eighty-six GPU-hours. The second cost is building. Most methods ship as research code that hardcodes module names for one model family, so stacking them on a new architecture means porting each by hand.
QDA runs a loop. The agent proposes a recipe, a library builds it, and an evaluator scores it in minutes. For a few promising candidates, the agent also generates long answers to look for failures. When the budget of sixty-four GPU-hours runs out, it submits its best checkpoint, and only that one ever meets the test benchmarks.
The score is a KL divergence: how far the quantized model's next-token distribution drifts from the original's, averaged over reference traces the original model wrote, which the agent never sees. Why not the layer-wise error that GPTQ and AWQ minimize? It sees one layer at a time and misses error that builds up across layers. On forty-four pairs of checkpoints, the KL orders eighty-two percent the same way accuracy does, against seventy-three for layer-wise error. It is computed inside vLLM on the serving kernel, so it also catches errors that only the kernel introduces.
To keep scoring cheap, the evaluator caches only the original model's hundred and twenty-eight most likely tokens at each position, plus one bucket for the rest. The paper proves this estimate never exceeds the true KL. Scores closer than the noise of rebuilding a recipe on fresh calibration data are marked as tied, so the agent does not chase chance.
The long-generation check catches what the KL cannot: a model that loops late in its own answers. On Qwen3.6, calibrating GPTQ on the model's own generated text cut the KL by thirty percent. Yet that checkpoint cut off twelve of a hundred and ninety-one answers at the length limit, against three for the original, mostly code answers looping on debugging steps. The agent noted that the truncation count was the signal it watched, and added scale distillation on the quantized model's own long outputs.
Underneath sits a library of twenty-one methods behind one interface: each takes a checkpoint and returns one, so they stack in any order. It derives which layers feed which from the model itself, so a new architecture needs only a small adapter.
Across four reasoning models, QDA beats the strongest public recipe on average by zero point nine, one point four and two point two points at three precisions. On the three hundred and twenty billion parameter GLM-5.3-Flash in NVFP4, one search recovers ninety-eight point three percent of the FP8 model's accuracy, against ninety-six point nine for NVIDIA's own checkpoint. Every checkpoint runs on existing kernels with no inference overhead.
The comparison that tests the thesis most directly is a different one. The same agent, Claude Opus, was given NVIDIA's ModelOpt and its recipe-search skill instead of QDA's library and evaluator. It even selected candidates on the test benchmarks themselves, and still landed zero point five to one point three points behind QDA. The gain comes from the search flow and infrastructure, not from a strong agent alone. Without the library, the agent writes about three times as much code and never tries a rotation.
The paper has no limitations section, so these come from what it reports. Most model and precision pairs get exactly one search; only Qwen3.6 was searched three times. Some margins are thin. With four-bit weights, greedy search and ASHA come within a tenth of a point of the agent. At three bits on Qwen3.6, QDA ends slightly below GSQ, and most three-bit searches started from the GSQ checkpoint. The KL proxy misorders about one pair in five. And every search used one agent model.
Agent-driven quantization stalled on cost and honesty, not cleverness. Make scoring take minutes, hide its data from the agent, let methods compose, and the agent reads its own logs like an expert. On Qwen3.5-9B it traced spikes in its distillation loss to scales crossing a rounding boundary, and raised Adam's epsilon. The recipe changes per model. The loop that finds it does not.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free