读见

QDA:通过智能体实现闭环 LLM 量化设计

原题QDA: Closed-Loop LLM Quantization Design with Agents

约 10 分钟约 2,406 字原文英文已翻译

读前速览

5 个要点

QDA 利用编程智能体自主设计 LLM 量化方案,以极低成本实现推理模型精度提升,且不增加推理开销。

  1. QDA 利用编程智能体自主设计量化方案

    智能体以闭环方式运行,自主提出方案、构建检查点并测量性能,无需人工介入,让不同模型和精度级别的量化变得易于实现且可扩展。

  2. KL 散度评分可在几分钟内完成评估,而非耗费数小时 GPU 时间

    QDA 通过衡量量化模型在推理轨迹上的预测与原始模型预测之间的偏差,评估速度比完整精度测试快 350-990 倍,因此每次搜索可评估 5-36 个候选方案。

  3. 由 21 种可组合 PTQ 方法构成的库,支持灵活搭建量化方案

    每种方法都接收一个检查点并输出一个检查点,因此智能体可以按任意顺序组合这些方法。这种模块化设计发现,没有哪一种方法能在所有模型上都占优,必须组合多种方法才能取得最佳效果。

  4. QDA 在多种模型和精度设置下均优于公开方案

    在 12 组模型与精度组合中的 11 组里,QDA 的准确率比最佳公开方案高出 0.9-2.2 个点;当公开方法的表现明显低于 BF16 基线时,提升最高可达 6.1 个点。

  5. QDA 使用标准内核,同时保持推理效率

    与采用运行时旋转的 ParoQuant 不同,QDA 只使用可以折叠进权重的步骤,因此能够保持标准格式,并在 batch size 为 16 和 64 时实现 1.3-1.6 倍的解码速度提升。

完整摘要

QDA(通过智能体进行量化设计)提出了一套闭环系统,由编程智能体自主为 LLM 设计训练后量化方案。智能体提出方案、构建检查点,并使用快速 KL 散度评分方法测量性能;这一方法只需几分钟,而非耗费数十个 GPU 小时。系统包含一个由 21 种 PTQ 方法组成的库,这些方法可以按任意顺序组合,从而高效探索方案空间。在 4 个推理模型和 3 种精度设置下,QDA 在 W4A16、W4A8 和 W3A16 下的平均表现分别比最强公开方案高出 0.9、1.4 和 2.2 个点。在采用 NVFP4 的 320B 参数 GLM-5.3-Flash 模型上,QDA 用时 6.5 小时、花费 $69,恢复了 FP8 精度的 98.3%,超过 NVIDIA 的 96.9%。与此同时,该方法仍兼容标准内核,且不影响推理速度。

目录 · 15 节

查看原文

简而言之TL;DR

QDA 将编码智能体引入 LLM 量化设计。针对每种模型和精度,该智能体都会自主设计后训练量化方案,无需人工介入。在四个推理模型上,其模型检查点均优于最强的公开方案:在 W4A16、W4A8 和 W3A16 下,平均分别高出 0.9、1.4 和 2.2 个百分点;并且可在现有内核上运行,不带来任何推理开销。QDA brings a coding agent into LLM quantization design. For each model and precision, the agent designs the post-training quantization recipe on its own, with no human in the loop. Its checkpoints beat the strongest public recipe on four reasoning models, by 0.9, 1.4 and 2.2 points on average at W4A16, W4A8 and W3A16, and run on existing kernels with no inference overhead.

该智能体的工作方式与量化专家如出一辙:提出方案、构建方案、测量效果,然后决定下一步要做哪些调整。有两点让这一循环快到足以在一次八小时搜索中评估多达 36 个候选方案:一种只需几分钟而非数十个 GPU 小时的 KL 评分方法,以及一个包含 21 种 PTQ 方法、可按任意顺序组合的库。我们发现,没有哪种方法能在所有情况下都胜出:每种模型和精度都有各自的最佳方案,而智能体通过搜索找到了它。The agent works the way a quantization expert does: it proposes a recipe, builds it, measures it and decides what to change next. Two things make this loop fast enough for up to 36 candidates in one eight-hour search: a KL score that takes minutes instead of dozens of GPU-hours, and a library of 21 PTQ methods that stack in any order. We find that no method wins everywhere: the best recipe differs for every model and precision, and the agent finds it by searching.

在采用 NVFP4 的 320B 参数 GLM-5.3-Flash 上,一次耗时 6.5 小时、花费 69 美元的搜索,恢复了 FP8 模型 98.3% 的准确率,而 NVIDIA 发布的版本为 96.9%。工具同样重要:如果使用 NVIDIA ModelOpt 的工具而非我们的工具,同一个智能体在 Qwen3.6-35B 上会落后 0.5–1.3 个百分点。一次搜索会消耗价值 19–75 美元的智能体令牌。On the 320B-parameter GLM-5.3-Flash at NVFP4, one 6.5-hour, $69 search recovers 98.3% of the FP8 model's accuracy, against 96.9% for NVIDIA's release. The tools matter too: given NVIDIA ModelOpt's tools instead of ours, the same agent falls 0.5–1.3 points behind on Qwen3.6-35B. A search costs $19–75 of agent tokens.

1一个古老的问题1An old question

2024 年,Xingyang 在 MIT HAN Lab 的优秀导师 Yujun Lin 编写了 DeepCompressor,这是 QServe 和 SVDQuant 背后的量化工具箱。他曾告诉我们,有时结果会让他感到困惑:一项在论文中看起来很强的新方法,与 AWQ 的平滑处理、Hadamard 旋转和 GPTQ 等几种基础方法叠加后,往往收效甚微。此外,没人知道哪些方法能很好地协同工作,因为每种方法都是单独测试的。In 2024, Yujun Lin, Xingyang's wonderful mentor at MIT HAN Lab, wrote DeepCompressor, the quantization toolbox behind QServe and SVDQuant. He once told us that the results sometimes puzzled him: a new method that looks strong in its paper often adds little once it is stacked on a few basics, such as AWQ's smoothing, a Hadamard rotation and GPTQ. Moreover, nobody knew which methods work well together, because each is tested on its own.

手动回答这个问题意味着要逐个模型尝试各种组合,而没人有时间这么做。不过,如今 LLM 可以充当优化器[1, 2],而 Humanize[3] 这类智能体运行框架能让编程智能体在无人监督的情况下持续工作数小时。因此,QDA 让智能体能够针对每个模型和精度运行这些实验。Answering that by hand means trying combinations model by model, which no one has time for. Today, however, LLMs can act as optimizers[1, 2], and agent harnesses such as Humanize[3] keep a coding agent working for hours with no one watching. So QDA lets an agent run exactly these experiments, for every model and precision.

这个问题确实存在。在四种推理模型和三种精度设置中,没有哪种公开方案能在所有情况下都最准确(图 1)。最新方法在 W3A16 设置下赢得了四种模型中的三种,但在所有精度设置下,R1-Distill-Llama-8B 上表现最好的仍是原版 GPTQ。The question is real. Across four reasoning models and three precisions, no public recipe is the most accurate everywhere (Figure 1). The newest method wins three of the four models at W3A16, yet plain GPTQ is still the best on R1-Distill-Llama-8B at every precision.

No public recipe wins everywhere

The most accurate public recipe for each model and precision; hover a cell for all scores

GPTQAWQnewer method: ParoQuant, QuaRot+GPTQ or GSQ

Figure 1. Mean accuracy over math, GPQA-Diamond, LiveCodeBench and IFBench. Each precision has its own candidates: GPTQ and AWQ everywhere, plus ParoQuant at W4A16, QuaRot+GPTQ at W4A8 and GSQ at W3A16. The small number is the winner's lead over the runner-up; a split cell is a tie.

不过,只要搭配得当,现有方法也能带来显著提升。在 Qwen3.5-9B 的 W4A8 设置下,单独使用 GPTQ 的表现比 BF16 低 17 个百分点。Hadamard 旋转弥补了 9.9 个百分点,而智能体的方案又通过自生成数据、感知 FP8 的尺度搜索和尺度蒸馏弥补了 5.2 个百分点。这些步骤都不是新方法;提升来自针对该模型选择合适的方法。Stacked well, however, known methods go far. On Qwen3.5-9B at W4A8, GPTQ alone sits 17 points below BF16. A Hadamard rotation wins back 9.9 points, and the agent's recipe wins back another 5.2 with self-generated data, an FP8-aware scale search and scale distillation. None of these steps is new; the gain comes from choosing them for this model.

2为什么循环很慢2Why the loop is slow

智能体像专家一样设计配方:提出配方、构建检查点、测量结果,并决定下一步要修改什么。在预算范围内完成的迭代轮数越多,配方就越好,但这个循环中的两个步骤速度较慢(图 2 左侧)。An agent designs a recipe the way an expert does: propose a recipe, build the checkpoint, measure it, and decide what to change next. The more rounds it fits into a budget, the better the recipe, but two steps of this loop are slow (Figure 2, left).

The design loop, without and with QDA

The agent's loop is the same; QDA replaces the two slow steps

Figure 2. Left: building means porting methods across codebases, and measuring means a full evaluation, so a search fits only a few rounds. Right: QDA builds from one library and scores by KL in minutes, so a search fits dozens of rounds.

测量过程很慢,因为推理模型每次回答都要思考数千个 token,而且每道题都必须采样多次,因此完整评估一个检查点需要数十个 GPU 小时。构建也很慢,因为大多数 PTQ 方法都各自独立,分散在不同的代码库中。让智能体自行移植这些方法时,它每次搜索都要写 3.1 千行代码,最终准确度反而更低。QDA 让这两个步骤都变得更快(图 2 右侧)。图 3 展示了各部分如何协同工作:智能体在沙箱中运行,只能通过四条命令访问库、评估器和 GPU。其外围的运行框架基于 Humanize(我们的智能体流程系统)构建,可限制智能体访问文件和网络,在某个回合卡住时重新启动,并让长时间搜索在无人值守的情况下持续运行。Measuring is slow, because reasoning models think for thousands of tokens per answer and each problem must be sampled many times, so a full evaluation of one checkpoint takes dozens of GPU-hours. Building is slow, too, because most PTQ methods live in separate codebases. Left to port them itself, the agent wrote 3.1k lines of code per search and still ended up less accurate. QDA makes both steps fast (Figure 2, right). Figure 3 shows how the pieces fit: the agent works in a sandbox and reaches the library, the evaluator and the GPUs only through four commands. The harness around it is built on Humanize, our agent flow system, which fences the agent's files and network, restarts a stalled turn and keeps a long search running unattended.

System architecture

The agent reaches the rest of the system only through four commands

recipe or checkpointscoreGPU job

Figure 3. The agent calls qda to build, kl to score, qsched for other GPU jobs such as long generations, and handin to submit. Reference traces and test benchmarks stay outside its sandbox, so it cannot tune on them, and every GPU job goes through one scheduler that keeps the search within budget.

2.1 测量:以分钟计的分数2.1Measuring: a score in minutes

QDA 只需几分钟就能为候选模型打分,速度比完整评估快 350–990 倍,依据是它的下一词元预测与原始模型的偏差程度。量化模型的优劣取决于其行为是否与原始模型相似,因此 QDA 不对答案评分,而是衡量两个模型在原始模型生成的推理轨迹上所做预测之间的 KL 散度。原始模型一侧的计算只需执行一次并缓存,因此评分时只需对候选模型进行一次前向传播。这些轨迹保存在智能体沙箱之外,因此它无法利用这些轨迹进行调优。QDA scores a candidate in minutes, 350–990× faster than a full evaluation, by how far its next-token predictions drift from the original model's. A quantized model is good when it behaves like the original one, so instead of grading answers, QDA measures the KL divergence between the two models' predictions on reasoning traces that the original model wrote. The original model's side is computed once and cached, so a score needs only one pass of the candidate. The traces stay outside the agent's sandbox, so it cannot tune on them.

该评分对检查点的排序与准确率一致。大多数 PTQ 方法只会单独最小化每一层的误差,因此无法捕捉跨层累积的误差。在 W4A16 配置下,该逐层误差指标对 Qwen3.5-9B 上三种公开方案的排名中,将 AWQ 排在最后,尽管它的准确率排名第二;而 KL 的排序则正确(图 4)。在 44 对检查点中,KL 有 82% 的概率选出准确率更高的那个,而逐层误差指标为 73%,不过它也无法发现所有失效情况(§3)。The score ranks checkpoints the way accuracy does. Most PTQ methods minimize the error of each layer on its own, which cannot see errors that build up across layers. On Qwen3.5-9B at W4A16, this layer-wise error ranks AWQ last of three public recipes although it is second in accuracy, whereas KL gets the order right (Figure 4). Over 44 pairs of checkpoints, KL picks the more accurate one 82% of the time, against 73% for the layer-wise error, though it does not catch every failure (§3).

Three ways to rank three public recipes

Qwen3.5-9B at W4A16; lower is better in every panel

ParoQuantAWQGPTQ

Figure 4. Layer-wise error puts AWQ last even though it is second in accuracy, whereas KL gets the order right.

2.2 构建:可卡合在一起的部件2.2Building: parts that snap together

QDA 的库通过统一接口实现了 21 种 PTQ 方法。由于每种方法都以一个检查点为输入并返回一个检查点,智能体可以按任意顺序叠加这些方法,而且只需编写一次的方法就能应用于新的架构。每种方法都会改变量化层背后数学运算的一部分,图 5 展示了如何将这些方法组合起来。QDA's library implements 21 PTQ methods behind one interface. Because every method takes a checkpoint and returns one, the agent can stack them in any order, and a method written once runs on new architectures. Each method changes one part of the math behind a quantized layer, which Figure 5 lets you assemble.

Assemble a recipe

Pick one option per row or start from a preset; lines that differ from plain GPTQ are highlighted

Figure 5. A recipe as math, with a few of the library's 21 methods.

它的速度也足以满足迭代循环的需求。在一张 H100 上,Qwen3.8-27B 的 GPTQ 版本构建耗时 191 秒,而使用 llm-compressor 则需 501 秒;35B MoE 版本的构建耗时为 181 秒,而 llm-compressor 会因内存不足而失败。It is also fast enough for the loop. On one H100, a GPTQ build of Qwen3.8-27B takes 191 s against 501 s with llm-compressor, and the 35B MoE builds in 181 s, where llm-compressor runs out of memory.

3 一次搜索,从头到尾3One search, start to finish

每次搜索都在 Claude Code 中以 high effort 运行 Claude Opus 5.5,由 Humanize 驱动,在八块 GH200 GPU 上运行八小时,全程无人参与;每次搜索消耗价值 19–75 美元的智能体 token(3700万至1.22亿个,绝大多数从缓存读取)。图 6 重放了针对 Qwen3.6-35B(W4A16)的那次搜索。Each search runs Claude Opus 5.5 in Claude Code at high effort, driven by Humanize, on eight GH200 GPUs for eight hours, with no human in the loop, for $19–75 of agent tokens per search (37–122M tokens, mostly read from cache). Figure 6 replays the one on Qwen3.6-35B at W4A16.

Replay of one search

KL of every candidate the agent scored, Qwen3.6-35B-A3B at W4A16

Figure 6. Grey dots are the 26 scored candidates; the red line is the best so far.

该智能体首先尝试用不同的裁剪和求解器设置重新构建 GPTQ,但效果都不如公开发布的检查点。运行 1.5 小时后,它不再使用通用文本,而是用原始模型自身的推理轨迹进行校准,KL 散度一步就下降了 23%。它的笔记将原始模型称为“锚点”,并详细说明了这场押注及其风险:The agent first rebuilds GPTQ with different clip and solver settings, none of them better than the public checkpoint. At 1.5 hours, it calibrates on the original model's own reasoning traces instead of generic text, and the KL drops by 23% in one step. Its notes, where the “anchor” is the original model, spell out both the bet and the risk:

使用锚点自身生成的思维轨迹对 GPTQ 进行校准,是迄今为止影响最大的手段(……),但这会提高 ref KL:它会专门适配锚点风格的文本。
Calibrating GPTQ on the anchor's own generated thinking traces is the biggest lever so far (…), but it raises ref KL: it specialises on anchor-style text.

它的 KL 看起来没问题,但 KL 评估的是模型对给定文本的表现,而不是它生成文本的表现。因此,在 3.1 小时时,智能体让这个候选模型为它自行挑选的 191 道难题写出完整答案,其中 12 道答案因达到长度上限而被截断,大多是陷入循环的代码答案;原始模型则有 3 道。智能体开始关注截断情况(“我关注的信号就是截断次数”),并转而在量化模型自身生成的长答案上进行蒸馏。它的提交得分为 0.0088,而最佳公开方案为 0.0153,且只有 6 道答案被截断。Its KL looked fine, but KL scores the model on text it is given, not on text it writes. So at 3.1 hours the agent had this candidate write full answers to 191 hard problems of its own choosing, and 12 were cut off at the length limit, most of them code answers stuck in a loop, against 3 for the original model. The agent starts watching truncations (“the truncation count is the signal I watch”) and turns to distillation on the quantized model's own long answers. Its hand-in scores 0.0088 against 0.0153 for the best public recipe and cuts off only 6 answers.

4 结果4Results

我们针对四种推理模型(稠密模型、线性注意力混合模型和 MoE 模型),按每种模型和精度各进行了一次搜索,并使用最终检查点在数学、GPQA-Diamond、LiveCodeBench 和 IFBench 上进行了评估。We ran one search per model and precision on four reasoning models (dense, linear-attention hybrid and MoE) and evaluated the final checkpoints on math, GPQA-Diamond, LiveCodeBench and IFBench.

4.1 超越最佳公开配方4.1Over the best public recipe

在 12 种模型与精度组合中,有 11 种情况下,QDA 的准确率高于最佳公开方案;在 W4A16、W4A8 和 W3A16 下,平均分别高出 0.9、1.4 和 2.2 个百分点(图 7)。最大提升分别出现在 W4A8 下的 Qwen3.5-9B(+5.2 个百分点)和 W3A16 下的 R1-Distill-Llama-8B(+6.1 个百分点);在这两种情况下,最佳公开方案的表现远低于 BF16,分别相差 7.1 和 11.7 个百分点。QDA is more accurate than the best public recipe on 11 of the 12 pairs of model and precision, by 0.9, 1.4 and 2.2 points on average at W4A16, W4A8 and W3A16 (Figure 7). The largest gains, +5.2 on Qwen3.5-9B at W4A8 and +6.1 on R1-Distill-Llama-8B at W3A16, come where the best public recipe is far below BF16, by 7.1 and 11.7 points.

Gain over the best public recipe

Points of mean accuracy over the winner of each cell in Figure 1; hover a cell for all scores

Figure 7. Darker means a larger gain. Below each gain: the public recipe it is measured against. The Qwen3.6-35B cells are means of three searches.

4.2A 采用 NVFP4 的 320B 模型4.2A 320B model at NVFP4

在 GLM-5.3-Flash 上——这是一款主搜索均未见过的 320B MoE 模型——一次耗时 6.5 小时、花费 69 美元的搜索,将其准确率恢复到了 FP8 模型的 98.3%;而 NVIDIA 和 Red Hat AI 发布的 NVFP4 检查点分别为 96.9% 和 96.3%(图 8)。这次搜索使用了与主搜索相同的智能体、库和评估器,且没有可供参考的公开方案。On GLM-5.3-Flash, a 320B MoE that none of the main searches saw, one 6.5-hour search for $69 recovers 98.3% of the FP8 model's accuracy, against 96.9% and 96.3% for the NVFP4 checkpoints that NVIDIA and Red Hat AI released (Figure 8). It used the same agent, library and evaluator as the main searches, with no public recipe to start from.

Figure 8. Mean accuracy over math, GPQA-Diamond, LiveCodeBench and SuperGPQA, as a share of the FP8 model's 77.7. All three checkpoints are served by the same engine on the same GB300 GPUs, with the same sampling settings.

4.3 使用 NVIDIA ModelOpt 的智能体4.3Over an agent with NVIDIA ModelOpt

仅有一个强大的智能体还不够。NVIDIA 的 ModelOpt 为编码智能体提供了一项配方搜索技能,因此我们给同一个智能体配备了 ModelOpt 和这项技能,而不是我们的工具,并为其提供了相同的 64 GPU 小时。它的表现比 QDA 低 0.5–1.3 个百分点,在 W4A8 和 W3A16 上甚至不如最佳公开配方(图 9),尽管它是在测试基准本身上挑选候选方案的。A strong agent alone is not enough. NVIDIA's ModelOpt ships a recipe-search skill for coding agents, so we gave the same agent ModelOpt and that skill instead of our tools, with the same 64 GPU-hours. It falls 0.5–1.3 points behind QDA, and even below the best public recipe at W4A8 and W3A16 (Figure 9), although it picks its candidates on the test benchmarks themselves.

The same agent, with ModelOpt or with QDA

Qwen3.6-35B, mean accuracy, the same 64 GPU-hours per search

best public recipeagent + NVIDIA ModelOptQDA

Figure 9. The agent with ModelOpt picks its candidates on the test benchmarks; QDA never sees them. QDA is the mean of three searches.

4.4 推理时免费4.4Free at inference

QDA 的检查点解码速度与 GPTQ 一样快(图 10)。在 Qwen3.5-9B 上表现最强的公开方案 ParoQuant,部分准确率收益来自服务时对每一层的输入进行旋转;这是一种合理的权衡,但需要专用内核。在批量大小为 16 和 64 时,QDA 检查点的解码速度快 1.3–1.6 倍。QDA 只采用可折叠到权重中的步骤,因此其检查点仍能使用标准格式和内核。QDA's checkpoints decode as fast as GPTQ's (Figure 10). ParoQuant, the strongest public recipe on Qwen3.5-9B, earns part of its accuracy with a rotation applied to each layer's input at serving time, a sensible trade that comes with its own kernel; at batch sizes 16 and 64, QDA's checkpoints decode 1.3–1.6× faster. QDA only uses steps that fold into the weights, so its checkpoints keep the standard formats and kernels.

Decode throughput, Qwen3.8-27B at W4A16

Output tokens per second on one GH200, vLLM

ParoQuantGPTQQDA

Figure 10. QDA runs on GPTQ's kernel and decodes within 0.2% of it. Checkpoints for Qwen3.5, Qwen3.6, Qwen3.8, Qwen3-Coder, Gemma 4, Nemotron 3 Nano, R1-Distill-Llama and GLM-5.3-Flash are on Hugging Face, ready for vLLM, SGLang and llama.cpp.

5 我们学到了什么,以及接下来要做什么5What we learned, and what's next

PTQ 方法是互补的组成部分,而非彼此的对手。论文常把一种方法与另一种方法对比,仿佛这个领域是一场只能决出一个赢家的竞赛。然而,每种方法解决的都是一种特定类型的误差,而哪种误差占主导取决于模型;因此,最佳模型检查点往往来自已知方法的叠加,而某种方法即使单独使用时表现不佳,仍可能是某套方案所需要的关键一步。PTQ methods are parts, not rivals. Papers pit one method against another, as if the field were a contest with a single winner. Yet each method fixes one kind of error, and which error dominates depends on the model; so the best checkpoints came from stacking known methods, and a method that loses in isolation can still be the step a recipe needs.

智能体已经足够聪明;它们需要的是快速反馈和好用的工具。评分耗时几分钟时,每次搜索只尝试了 5 到 36 个候选方案,GPU 时间中仅有 4% 用于评分。相比之下,没有这个库时,智能体把精力都花在移植代码上,从未尝试在 W4A8 下进行旋转,而这正是 QDA 在该设置下获得最大提升的步骤。Agents are smart enough already; they need fast feedback and good tools. With a score that takes minutes, each search tried 5 to 36 candidates, using only 4% of its GPU time on scoring. Without the library, by contrast, the agent spent its effort on porting code and never tried a rotation at W4A8, the step that gave QDA its largest gain there.

接下来:让智能体自行降低 token 成本。搜索会花费 token 来降低 token 成本:花费价值 19–75 美元的智能体 token,就能找到一个检查点,让此后每个 token 的权重内存占用减少约四分之三。将这一方法用于智能体自身运行所依赖的开放模型,就会形成一个自我强化的循环,而我们计划分三步实现它。第一,首日量化:每个新开放模型一经发布,就为所有格式搜索出量化配方。第二,不断自我扩充的库:我们的智能体已经自行发明了一些步骤,例如在量化模型的回答上继续训练、对检查点取平均;经评估器确认有效的步骤就可以纳入库中,因此每次搜索的起点都比上一次更丰富。第三,将同样的循环拓展到权重之外,应用于 KV 缓存、稀疏化,以及与内核协同设计的新型低比特格式;NVIDIA 的 Kernel Design Agents[4] 等编码智能体已经能够编写更快的内核。我们希望 QDA 能以一个人人都能运行的工具,回应 DeepCompressor 提出的问题。What's next: agents that make their own tokens cheaper. A search spends tokens to make tokens cheaper: $19–75 of agent tokens buys a checkpoint that serves every later token with about a quarter of the weight memory. Pointed at the open models that agents themselves run on, this becomes a loop that feeds itself, and we plan to close it in three steps. First, day-one quantization: every new open model gets searched recipes for every format on release day. Second, a library that grows itself: our agents already invented steps of their own, such as training on the quantized model's answers and averaging checkpoints, and the ones the evaluator confirms can join the library, so each search starts from more than the last. Third, the same loop beyond weights, for KV caches, sparsity and new low-bit formats co-designed with their kernels, where coding agents such as NVIDIA's Kernel Design Agents[4] already write faster kernels. We hope QDA answers the question DeepCompressor raised, with a tool anyone can run.

致谢Acknowledgements

我们感谢 Han Cai、Yi Pan、Haocheng Xi、Yujun Lin、Ziyi Xu、Mark Kim 和 Enrico Shippole 提供的反馈。本研究得到 SK Telecom 和 MIT 生成式 AI 影响联盟(MGAIC)的支持。Jenia Jitsev 和 LAION 提供了计算资源使用权限,Gauss Centre for Supercomputing e.V.(GCS)则提供了在于利希超级计算中心(JSC)的 JUPITER 超级计算机上使用计算资源的时间。We thank Han Cai, Yi Pan, Haocheng Xi, Yujun Lin, Ziyi Xu, Mark Kim and Enrico Shippole for their feedback. This research was supported by SK Telecom and the MIT Generative AI Impact Consortium (MGAIC). Jenia Jitsev and LAION provided access to compute, and the Gauss Centre for Supercomputing e.V. (GCS) provided computing time on the JUPITER supercomputer at the Jülich Supercomputing Centre (JSC).

参考文献References

[1] Yang 等人。《大型语言模型作为优化器》。ICLR 2024。[1] Yang et al. Large Language Models as Optimizers. ICLR 2024.

[2] Novikov 等。《AlphaEvolve:用于科学与算法发现的编码智能体》。2025 年。[2] Novikov et al. AlphaEvolve: A coding agent for scientific and algorithmic discovery. 2025.

[3] Humanize:智能体流程系统。github.com/humanfia/humanize。[3] Humanize: the agent flow system. github.com/humanfia/humanize.

[4] KDA:Kernel Design Agents,一种以智能体为中心的高性能 CUDA 内核工作流。github.com/NVlabs/kda.[4] KDA: Kernel Design Agents, an agent-centric workflow for high-performance CUDA kernels. github.com/NVlabs/kda.

引用Citation

请按以下格式引用这项工作:Please cite this work as:

Xingyang Li、Tianlang Zhao、Song Han 和 Ligeng Zhu。《QDA:基于智能体的闭环 LLM 量化设计》。arXiv:2611.23388,2026 年。Xingyang Li, Tianlang Zhao, Song Han and Ligeng Zhu. “QDA: Closed-Loop LLM Quantization Design with Agents.” arXiv:2611.23388, 2026.

或者使用 BibTeX 引用:Or use the BibTeX citation:

@article{li2026qda,
  title   = {QDA: Closed-Loop LLM Quantization Design with Agents},
  author  = {Li, Xingyang and Zhao, Tianlang and Han, Song and Zhu, Ligeng},
  journal = {arXiv preprint arXiv:2611.23388},
  year    = {2026}
}

值得记下

  1. QDA 将编程智能体引入 LLM 量化设计。对于每种模型和精度,智能体都会独立设计训练后量化方案,无需人工介入。
  2. 我们发现,没有任何一种方法能在所有情况下都胜出:每种模型和精度对应的最佳方案都不同,而智能体可以通过搜索找到它。
  3. 在采用 W4A16 的 Qwen3.5-9B 上,这种逐层误差指标将 AWQ 排在 3 种公开方案中的最后一位,尽管它的准确率排名第二;而 KL 散度则正确排出了顺序。
  4. PTQ 方法是可以组合的部件,而不是彼此竞争的对手。论文总是将一种方法与另一种方法对比,仿佛这个领域是一场只有一个赢家的比赛。
  5. 智能体已经足够聪明;它们需要的是快速反馈和趁手的工具。