Building with AI

QDA uses coding agents to automate LLM quantization design

MIT Han Lab introduces QDA, a system where autonomous agents design custom post-training quantization recipes, improving accuracy over public baselines without adding inference overhead.

A robotic arm assembling modular blocks into a cube, representing automated quantization design.
Illustration generated for this article

Researchers at the MIT Han Lab have introduced QDA, a system that employs autonomous coding agents to design post-training quantization (PTQ) recipes for large language models. Published in late November 2026, this approach removes human intervention from the optimization loop, allowing the agent to propose, build, and evaluate quantization strategies independently. The resulting checkpoints consistently outperform existing public recipes across multiple reasoning models and precision levels while maintaining standard inference speeds.

What happened

Quantizing large language models to lower precisions like W4A16 or W3A16 is essential for efficient deployment, but finding the right combination of optimization techniques remains a manual, trial-and-error process. Historically, engineers have relied on isolated methods such as GPTQ or AWQ, often unaware of how these techniques interact when stacked. Yujun Lin, a researcher at MIT Han Lab, noted that new methods frequently add little value once combined with basics like smoothing or rotation, yet no one had the time to systematically test every combination for each specific model.

QDA addresses this by deploying a coding agent to run these experiments automatically. For each target model and precision, the agent designs a unique recipe without human guidance. In tests across four reasoning models, QDA’s checkpoints surpassed the strongest public recipes by an average of 0.9, 1.4, and 2.2 points at W4A16, W4A8, and W3A16 precisions respectively. Notably, on the 320B-parameter GLM-5.3-Flash model, a single search costing $69 recovered 98.3% of the FP8 model’s accuracy, exceeding the performance of official releases from NVIDIA and Red Hat AI.

How it works

The core innovation lies in accelerating the feedback loop that allows the agent to learn. A typical quantization workflow involves proposing a recipe, building the checkpoint, and measuring its accuracy. Measuring accuracy traditionally requires dozens of GPU-hours because reasoning models generate thousands of tokens per answer. QDA replaces this slow evaluation with a KL divergence score that measures how much the quantized model’s next-token predictions drift from the original model. This scoring method takes minutes instead of hours, enabling the agent to evaluate up to 36 candidates in an eight-hour search.

To handle the building phase, QDA provides a library of 21 PTQ methods that share a unified interface. Each method takes a checkpoint and returns a modified one, allowing the agent to stack them in any order. This modular design prevents the agent from wasting resources porting code between different repositories. The entire process runs within a sandboxed environment managed by the Humanize agent flow system, which restricts network access and ensures the agent cannot cheat by tuning directly on test benchmarks.

Key details

  • QDA improves accuracy over the best public recipes by 0.9 to 2.2 points across W4A16, W4A8, and W3A16 precisions.
  • The system uses a KL divergence score to evaluate candidates in minutes, which is 350–990 times faster than full benchmark evaluation.
  • A library of 21 interchangeable PTQ methods allows the agent to stack optimization techniques in any order.
  • Each search costs between $19 and $75 in agent tokens and runs for approximately eight hours on eight GH200 GPUs.
  • The resulting checkpoints use standard formats and kernels, meaning they decode as fast as GPTQ without requiring custom inference engines.
  • When tested with NVIDIA ModelOpt tools instead of the QDA library, the same agent performed 0.5–1.3 points worse, highlighting the importance of the tooling infrastructure.

Why it matters

For software engineers and ML practitioners, QDA demonstrates that the optimal quantization strategy is not universal but highly specific to each model and precision target. The research shows that no single public method wins everywhere; for instance, plain GPTQ remains the best option for some models, while newer methods excel in others. By automating the search for these combinations, QDA eliminates the need for teams to manually experiment with stacking techniques, saving significant engineering time and compute resources.

Furthermore, the system proves that high-quality quantization does not require sacrificing inference speed. Many high-accuracy methods introduce runtime overhead through complex rotations or custom kernels. QDA’s recipes only include steps that fold directly into the model weights, ensuring that the final checkpoints run on existing high-performance kernels like those in vLLM or llama.cpp. This makes the improved accuracy accessible to any production pipeline that already supports standard quantized formats.

What you can do

  • Download the pre-quantized checkpoints for models like Qwen3.5, Gemma 4, and GLM-5.3-Flash from Hugging Face to test accuracy improvements in your own pipelines.
  • Integrate QDA-generated checkpoints into your inference server using standard tools like vLLM, SGLang, or llama.cpp without modifying your kernel stack.
  • Use the KL divergence scoring concept to quickly prototype and rank quantization candidates during internal model development before running full benchmarks.
  • Study the modular PTQ library structure to understand how different optimization methods like Hadamard rotation and scale distillation can be combined effectively.
  • Consider implementing similar agent-driven search loops for other model compression tasks, such as pruning or KV cache optimization, leveraging the fast feedback mechanisms demonstrated here.
  • #llm quantization
  • #ai agents
  • #model optimization
  • #mit han lab
  • #inference efficiency

Tools from the Bytechap store

$89

DocBento

Self-hosted document management that reads every scan and answers with page citations.

Live demo

Keep reading

All stories