QDA:基于智能体的闭环LLM量化设计
研究论文 · 2026/11/19
QDA 是一个利用 LLM 智能体为不同模型和精度自动设计训练后量化方案的闭环系统。它通过快速评估候选方案(基于推理轨迹的 KL 散度)和提供兼容的 PTQ 方法库来加速构建与评估。在四个推理模型上,QDA 在 W4A16、W4A8 和 W3A16 下平均准确率比最强公开方案分别提升 0.9、1.4 和 2.2 个百分点,每次搜索仅需 64 GPU 小时。在 320B MoE 模型 GLM-5.3-Flash 的 NVFP4 W4A4 上,QDA 恢复了 FP8 模型 98.3% 的准确率,优于最佳厂商检查点的 96.9%。所有 QDA 检查点均可在现有服务内核上运行且无推理开销。
QDA 展示了智能体自动设计量化方案的可行性,在多个模型和精度上显著提升准确率,且评估高效、部署无额外开销,为低成本服务大语言模型提供了实用方案。
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.