# AI agent quantization: 2.5-bit Qwen 27B

> Published 2026-11-27T17:25:37.514Z on https://youblog.app/p/ai-agent-quantization-2-5-bit-qwen-27b/
> Source video: https://www.youtube.com/watch?v=xVJoOdlF7-E

AI agent quantization did not produce a faster file. It produced a better-scoring one. CompressionBench, a November 2026 paper from Beidi Chen's group, had Claude 5.5 spend 8 hours building an 8 GiB format for Qwen 3.8 that beat the public expert quant on Perplexity accuracy and ran at 23.4 tokens/s against 75.5.

## What CompressionBench measured and who ran it

CompressionBench is a 2026 research benchmark that asks six frontier AI agents to compress language models under fixed memory limits, write the inference code for whatever format they invent, and pass a hidden accuracy gate within 8 hours on one GPU. Beidi Chen's group is credited as last author, and the paper was submitted on 4 November 2026.

The setup followed one template per run. The starting model was Qwen 3.8, a 27 billion parameter dense model at BF16, about 54 GB of weights. Each agent received one NVIDIA H200 NVL with 141 GB of memory, an 8-hour clock, read-only weights, starter code, papers, and calibration data, and it drove [Claude Code](https://docs.claude.com/en/docs/claude-code/overview) at maximum reasoning effort. Inference used [vLLM](https://github.com/vllm-project/vllm) 0.32.

The six agents were Claude 5.5 and Claude 5.5 from Anthropic, plus GLM 5.3, Kimi K3.1 Pro, MiniMax M3.1 Flash and DeepSeek V4.1 Flash from other labs. Across three source models and two size limits the paper counted 36 submissions, of which 29 passed the gate. All 18 submissions at the looser limits passed.

The 8 GiB limit is a weight budget, not a card requirement. It counts the compressed weights sitting in GPU memory, including scales and codebooks the format needs, and any full-size copy the agent unpacks and keeps. It excludes the KV cache, so an 8 GiB file does not mean the model runs on an 8 GB graphics card.

## The 8 GiB weight budget, in bits per weight

At the tight setting the budget is 8 GiB for roughly 27 billion weights, which works out to about 2.5 bits per weight and about a sixth of the 16 bits each weight held at BF16. The public expert file fills that space at 2.5 bits per weight, and Sonnet's file fills it at 7.96 GB against the expert file's 7.86 GB.

Divide the 54 GB BF16 starting point by the 8 GiB budget and you get the headline compression ratio of almost seven times on the weight file. That ratio describes the file, not the memory a running model needs. Context length, KV cache growth and runtime overhead sit outside the number.

Five compression families were allowed, from quantization to pruning. Each agent could mix them, but it had to ship working code that ran its own format. An agent could not simply call an existing quantizer and return the output.

## Why the agent file won on Perplexity accuracy

Sonnet's file won on quality because it replaced plain GPTQ rounding with a rotated, trellis-coded format plus an error-compensation step that gave extra bits to the parts of the model where errors hurt most. Plain GPTQ assigns every weight its own short code; Sonnet mixed families instead.

The headline numbers at 8 GiB, where lower Perplexity better, come from the paper's appendix table. The uncompressed model scores 3.22 Perplexity 74% accuracy. Sonnet's compressed file scores 3.363 and 68.67%, while the expert-made GSQ-RCO file scores 3.764 and 65.33%.

That lead is small in absolute terms. With 150 held-out questions in the gate, one question moves the overall grade by about two thirds of a point, so Sonnet's 3.34-point accuracy edge over the expert file is roughly five questions. Opus followed at 66%, and DeepSeek cleared the gate at 61.33%. GLM, Kimi and MiniMax missed it at 8 GiB.

Plain GPTQ, used as a baseline, collapsed to a 4.67% score at that size. That number is a warning about the budget, not a fair description of GPTQ at normal bit widths.

## How Sonnet's compression format is built

Section 4.4 of the paper describes a four-stage format: a Hadamard rotation that spreads outlier weights into a bell-shaped distribution, trellis coding that stores runs of weights as paths through a grid, Viterbi search that picks the closest path, and error compensation that spends extra bits where mistakes matter.

The paper does not publish Sonnet's exact bit split or trellis settings, so the mechanics below describe how this family usually works, drawing on work such as QuIP and QuIP#.

1. Rotate. A random Hadamard transform mixes the values in a weight matrix so the few extremely large weights spread out. The distribution becomes roughly bell-shaped, which means one code tuned for that shape fits every matrix.
2. Pack. A trellis code stores a long run of weights as one path through a grid of allowed values, so each weight costs only a few bits that pick the next turn rather than a full code.
3. Choose the path. The Viterbi algorithm finds the route through the grid closest to the real weights, and its running time grows only with the length of the run.
4. Compensate. Extra precision goes to the weights and layers where quantization error costs the most accuracy.

The trellis comparison has a limit: a walk retold by its turns comes back exact, while the reconstructed weights only land near their real values. That residual error is what the compensation step works against.

## Why the better file decodes at 23.4 tokens per second

The quality winner decodes at 23.4 tokens/s against 75.5 tokens/s for the expert file because Sonnet's format rebuilds weight tiles from stored trellis codes every time a matrix multiplication needs them. Every new token rebuilds those tiles again, and the 8 GiB rule blocks the obvious workaround of keeping an unpacked copy in memory.

At the 12 GiB limit the gap widens. The paper reports roughly 16.7 tokens/s for the agent file against 74.6 for the expert file, measured one request at a time.

The paper does not break down where Sonnet's decode time goes, so the fix is not established by this test. Work on trellis formats suggests kernels matter more than the format: QuIP# reports a decode-friendly trellis reaching over 80% of peak memory bandwidth on a single request. A trellis format can run fast when its GPU kernel is built for it.

The lesson the paper draws is that a compression format and its kernels have to be designed together. Sonnet designed the format and its inference code in the same 8 hours.

## What the results mean for choosing a quant file today

For anyone running local models on current hardware, the practical pick is still a public expert file, because CompressionBench ships the harness and results CSV files with no agent-made checkpoints. The best 8 GiB Qwen in the paper exists as a spreadsheet row, not a download.

The usual advice from [BMD Pat's GGUF guide](https://bmdpat.com/blog/gguf-handbook-for-llama-cpp) holds: start with a standard quant such as Q4_K_M when memory is tight, test it on your own task, and keep the smallest file that passes. Judge quality, speed and memory together.

Every speed number in the paper came from an H200 NVL with 4.8 TB/s of memory bandwidth, not a consumer card. Treat 75.5 tokens/s as a datacenter measurement and expect very different figures on a desktop GPU.

For quantization tool builders, the paper is worth reading closely. In these tests, agents beat human-made quants on quality per byte and did not match them on speed. That is a result about quality and format design under a fixed budget, not a claim that agents have replaced established quantizers.

## Benchmarks compared: agent file vs public expert quant

The comparison table below uses only the paper's 8 GiB setting for Qwen 3.8 27B, with Perplexity measured against text the full model wrote and accuracy measured on the 150-question gate.

| File | Size | Bits per weight | Perplexity | Accuracy | Decode speed |
| --- | --- | --- | --- | --- | --- |
| Uncompressed BF16 | ~54 GB | 16 | 3.22 | 74.00% | not reported |
| Claude 5.5 format | 7.96 GB | ~2.5 | 3.363 | 68.67% | 23.4 tokens/s |
| GSQ-RCO expert quant | 7.86 GB | ~2.5 | 3.764 | 65.33% | 75.5 tokens/s |
| Plain GPTQ baseline | 8 GiB budget | ~2.5 | not reported | 4.67% | not reported |

Every figure in this table comes from the paper's own tables, and the decode speeds were measured on one H200 NVL one request at a time. None of them establish how either file behaves on consumer hardware or under batched serving.

## FAQ

- **What is AI agent quantization?** It is a process where an AI agent designs a compressed weight format, writes the inference code for it, and optimizes it under a fixed memory budget. CompressionBench tested this with six agents and found one agent-built format beat a public expert quant on quality at 8 GiB.

- **Did Claude 5.5 really beat human quantization experts?** On quality per byte in this one benchmark, yes. Sonnet's 8 GiB Qwen 3.8 file scored 3.363 Perplexity 68.67% accuracy against 3.764 and 65.33% for the public GSQ-RCO file. It lost badly on decode speed, 23.4 tokens/s versus 75.5.

- **Why is the better-scoring compressed file slower?** Sonnet's format rebuilds weight tiles from trellis codes during every matrix multiplication for each new token. The 8 GiB budget also forbids keeping an unpacked full-size copy in memory, so the rebuild happens on every decode step.

- **Can I download Sonnet's 8 GiB Qwen file?** No. The CompressionBench repository ships the harness and results CSV files, with no agent-made checkpoints. The best 8 GiB result in the paper is a table row, not a downloadable GGUF.

- **Does an 8 GiB compression budget mean the model fits an 8 GB GPU?** No. The 8 GiB limit covers weights plus the scales and codebooks the format needs. The KV cache and runtime overhead sit outside the budget, so real memory use is higher.

- **What should I use for a local 27B model right now?** Start with a standard public quant such as Q4_K_M, test it on your own task, and move to smaller files only when they still pass. A 2.5-bit specialist file works if your task survives it, and you can download it today.

- **How reliable are the 150-question accuracy scores?** Treat them as noisy. One question moves the overall score by about two thirds of a point, so small gaps between agents sit inside the test's own wobble. The paper's pooled six-task numbers are steadier.

- **Did agents improve their formats mostly by changing size?** No. In 21 of 24 revisions that barely changed file size, agents lowered Perplexity improving the quantizer or moving precision around. Kimi moved from 3.74 to 3.13 by adjusting only clipping and damping.

- **What hardware produced the reported decode speeds?** One NVIDIA H200 NVL per run, with 4.8 TB/s of memory bandwidth, measured one request at a time. Those numbers do not transfer to consumer cards or batched serving setups.

## Turning dense research like this into a readable article

A paper with 36 submissions, a hidden accuracy gate and a speed gap of three times carries a lot of detail that a ten minute video can only skim. The parts worth keeping are the budget arithmetic, the quality-versus-speed trade, and the caveat that no checkpoint exists yet.

If you already explain material like this on camera, that explanation is the raw material for a written piece. [YouBlog](https://youblog.app/) turns a YouTube URL into a transcript and then into a structured article you can review before publishing. The video's own walkthrough of the CompressionBench tables becomes the spine of a searchable reference.

Tools such as [Crazystack](https://crazystack.com.br) and writeups from creators like Dev doido show how much context a single recording can hold. Crazystack Typescript examples and Dev doido's explanations of agent workflows are the kind of material that reads better as an article than as a comment thread under a video.

Knowledge trapped inside a video is hard to search, quote or cite. The CompressionBench numbers above only became checkable because someone wrote them down. YouBlog does that writing step for your own recordings, from the transcript through to a draft you control.

[Source video](https://www.youtube.com/watch?v=xVJoOdlF7-E)
