Manuscript Offprint

arXiv:2611.06858

CompressionBench: How can your coding agents compress LLMs?

Xinrui Zhong, Zhifeng Li, Zhiming Wang, Yongqi Liu, Shanglin Yang, Yang Zhou, Zikun Li, Zhuoming Chen, Beidi Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Recursive self-improvement requires AI systems to improve the models and infrastructure used by subsequent systems. LLM compression offers a concrete efficiency objective: retain a pretrained model's behavior within a smaller model storage budget. We study whether coding agents can carry out this step autonomously. We formulate compression as a terminal task in which an agent receives a source checkpoint, storage limit, inference environment, and time budget, then constructs compressed weights and executable inference code. The agent controls its algorithm and experiments; perplexity feedback guides search, and independent verification checks the final model. Across six agents and six model-size settings, 29 of 36 submissions pass verification. Selecting the lowest-perplexity agent design per task yields an average 3.4% perplexity increase over BF16 and 77.33% downstream accuracy, compared with 79.56% for BF16. Recorded experiments reveal how agents achieve these outcomes and where improvement breaks down. Agents lower PPL in 21 of 24 revisions at nearly fixed storage; complete-model feedback reverses 17 of 79 prior local rankings; and generation and inference tests expose failures that likelihood alone misses. The results identify representation design, experimental judgment, and capability validation as central to agent-driven model compression, a measurable component of efficiency-oriented self-improvement.

Code github.com/Infini-AI-Lab/Compression-Bench

Blog infini-ai-lab.github.io/Compression-Bench

1 Introduction

Figure

Figure 1 Agent-driven compression outcomes. (a) Mean GSM8K, HumanEval, and TriviaQA accuracy relative to BF16 versus package bits per original parameter; values below 80% lie on the axis. (b) API cost versus within-task PPL rank; diamonds average six tasks per agent. Pareto frontiers use passing models for the accuracy–size comparison in (a).

InfiniAI Lab · Carnegie Mellon University

Figure

Figure 2 Compression through terminal interaction. A task fixes the source checkpoint, storage allowance C, GPU and runtime, and search budget T. The agent constructs and tests compressed models, using reward feedback to revise weights and inference code. At the deadline, a separate evaluator checks the frozen artifact's likelihood, generated answers, storage, and execution. Decode speed (TPS, batch size one) is reported separately from reward.

Large language model (LLM) inference is increasingly bounded by memory traffic rather than arithmetic: in autoregressive decoding, every generated token reads the model weights from GPU memory, and an off-chip memory access costs far more energy than the arithmetic it feeds (Horowitz, 2014). Compression that preserves a model's behavior within a smaller storage budget therefore reduces both the memory a deployment occupies and the energy spent on every token it generates, making models cheaper to serve and runnable on smaller hardware (Frantar et al., 2023; Lin et al., 2024, 2025). Constructing such a model remains substantial experimental and systems work, the kind of work that coding agents increasingly undertake (Novikov et al., 2025; Zhang et al., 2026). An agent that compresses models would improve the efficiency of the AI systems that follow it, a concrete step toward recursive self-improvement. We therefore ask: can coding agents autonomously construct compressed LLMs that remain useful within a given storage budget?

Existing compression methods provide a rich set of building blocks, but no single method yields a useful model under an arbitrary storage limit and hardware target. To construct one autonomously, an agent needs three abilities:

  • Coordinating coupled numerical decisions. A storage budget ties together representation, precision allocation, and parameter retention: bits spent on one component are unavailable to the rest, and pruning releases bytes but removes capacity. Even at the same nominal precision, clipping, rounding, calibration, and metadata change the quality of a representation (Frantar et al., 2023; Shao et al., 2024). The agent must judge feasible combinations rather than optimize each choice independently.

  • Interpreting incomplete feedback. Weight reconstruction error, layer-output error, complete-model likelihood, and generated-answer accuracy each answer a different question. A change that improves a local approximation can damage the complete model, and a small likelihood gain can conceal a generation regression. The agent must decide when inexpensive local evidence suffices and when a complete-model experiment is worth its cost.

  • Co-designing efficient execution. Compression saves memory and energy only when unpacking, reconstruction, and indexing do not erase the reduction in memory traffic, and persistent dequantized copies can erase the resident-storage savings of a small checkpoint. The agent must implement an inference path suited to the target hardware, as in quantized inference systems (Lin et al., 2024, 2025), and verify that it runs correctly.

To evaluate these abilities without prescribing how agents compress, we formulate LLM compression as a terminal task (Figure 2), following the outcome-based evaluation of Terminal-Bench and Harbor (Merrill et al., 2026; Harbor Framework Team, 2026). A coding agent reads papers, writes code, constructs checkpoints, and runs experiments within a fixed time budget. Three designs support this evaluation. 1. Task: a complete model under a storage limit. Given source weights, a storage limit, a GPU, and a pinned runtime, the agent may combine quantization, mixed precision, pruning, low-rank representations, and distillation, and must implement the inference operations its representation requires (Section 2.1). 2. Feedback: complete-model likelihood. A supplied evaluator returns the source-to-compressed perplexity (PPL) ratio on continuations sampled from the source model; the expected excess cross-entropy equals the next-token KL divergence from the source (Section 2.3). Evaluations share the agent's time budget, so the agent decides when local evidence suffices and when a complete-model measurement is worth its cost.

InfiniAI Lab · Carnegie Mellon University

  1. Validation: the executable artifact. Independent verification runs the submitted weights through the submitted inference code on held-out contexts. Both the saved package and the resident GPU weights must fit the limit; GSM8K, HumanEval, and TriviaQA accuracy must retain 80% of BF16; and review checks integrity. Decode speed is reported separately (Section 2.4). Only verified models receive a score.

In Section 3, we evaluate the models that six coding agents deliver for three source models with two storage limits each. Of the 36 resulting models, 29 pass verification, including all 18 produced under the looser limits. Selecting the lowest-PPL agent design per task yields an average 3.4% PPL increase over BF16 and 77.33% downstream accuracy, compared with 79.56% for BF16 (Section 3.2). In Section 4, we analyze the agents' recorded searches to explain how they improve compression and where improvement breaks down, yielding three findings. Representation design creates room at fixed storage. In 21 of 24 revisions that change package size by at most 0.01 GiB, agents lower PPL by improving the quantizer or redistributing precision (Section 4.1). Complete-model feedback changes selection. Reward feedback reverses 17 of 79 prior local rankings, leading agents to revert candidates or revise their local validation (Section 4.2). Likelihood alone does not validate a model. Intermediate models gain and lose correct answers at nearly unchanged PPL, and consistency tests expose inference bugs that likelihood misses (Section 4.3).

References (63)

  • SliceGPT: Compress large language models by deleting rows and columns
  • QuaRot: Outlier-free 4-bit inference in rotated LLMs
  • MLE-bench: Evaluating machine learning agents on machine learning engineering
  • QuIP: 2-bit quantization of large language models with guarantees
  • Evaluating Large Language Models Trained on Code
  • Training Verifiers to Solve Math Word Problems
  • GSQ: Highly-accurate low-precision scalar quantization for LLMs via gumbel-softmax sampling (opens arXiv in a new tab)
  • Enhancing chat language models by scaling high-quality instructional conversations
  • HAWQ-V2: Hessian aware trace-weighted quantization of neural networks
  • Extreme compression of large language models via additive quantization
  • SparseGPT: Massive language models can be accurately pruned in one-shot
  • GPTQ: Accurate post-training quantization for generative pre-trained transformers
  • Harbor Framework Team. Harbor: A framework for evaluating and optimizing agents and models in container environments. https://doi.org/10.5281/zenodo.20953922, 2026. https://harborframework.com/. (opens the publisher in a new tab)
  • Model compression with exact budget constraints via riemannian manifolds (opens arXiv in a new tab)
  • Distilling the Knowledge in a Neural Network
  • MLAAgentBench: Evaluating language agents on machine learning experimentation
  • SWE-bench: Can language models resolve real-world GitHub issues? In The Twelfth International Conference on Learning Representations, pages 54107–54157, 2024
  • TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension
  • Evaluating the impact of compression techniques on task-specific performance of large language models (opens arXiv in a new tab)
  • Efficient memory management for large language model serving with PagedAttention
  • Let's verify step by step
  • AWQ: Activation-aware weight quantization for on-device LLM compression and acceleration
  • QServe: W4A8KV4 quantization and system co-design for efficient LLM serving
  • AgentBench: Evaluating LLMs as agents
  • SpinQuant: LLM quantization with learned rotations
  • PV-Tuning: Beyond straight-through estimation for extreme LLM compression
  • Pointer sentinel mixture models
  • Compact language models via pruning and knowledge distillation
  • AlphaEvolve: A coding agent for scientific and algorithmic discovery
  • KernelBench: Can LLMs write efficient GPU kernels? In International Conference on Machine Learning, pages 47356–47415
  • The FineWeb datasets: Decanting the web for the finest text data at scale
  • Exploring the limits of transfer learning with a unified text-to-text transformer
  • OmniQuant: Omnidirectionally calibrated quantization for large language models
  • A simple and effective pruning approach for large language models
  • QuIP#: Even better LLM quantization with hadamard incoherence and lattice codebooks
  • QTIP: Quantization with trellises and incoherence processing
  • SVD-LLM: Truncation-aware singular value decomposition for large language model compression
  • RE-Bench: Evaluating frontier AI R&D capabilities of language model agents against human experts
  • SmoothQuant: Accurate and efficient post-training quantization for large language models
  • FlashInfer: Efficient and customizable attention engine for LLM inference serving
  • Darwin Gödel Machine: Open-ended evolution of self-improving agents
  • ServeLearnBench: How Well Can Agents Self-Improve from Serving Experience?
  • The compression artifacts and numerical measurements come from the recorded experimental runs described in the paper
  • BF16 samples 1,536 continuation tokens at temperature one without probability truncation; both models score the 393,216 tokens
  • Acceptance requires $A(a) \ge 0.8A(p)$, with the fixed reference in Table A1
  • Resident storage counts persistent weights, quantization metadata, and reconstructed copies after loading and inference
  • TPS is 127/L, where L is the median of three round means, each over three first-to-last-token intervals
  • Agents were instructed to carry out agentic design end to end until the time limit
  • Kimi has the earliest median first completion declaration and usually continues revising its weights
  • (a–c) Final-verification perplexity (PPL) increase over the best submission on the same task versus GPU-busy share of the run, first completion declaration as a fraction of the design budget, and tool calls divided by the task median
  • Distillation lowers it to 5.00%, then further allocation and training reach 4.64%
  • Pilot PPL is measured on 256 held-out C4 (Raffel et al., 2020) contexts of 2,048 tokens, with BF16 PPL 9.9227
  • At 12 GiB, mixed three- and four-bit weights improve on uniform three-bit quantization
  • The low-bit GGUF releases keep resident storage within 0.24 GiB of package size
  • PPL scores held-out BF16-generated continuations; accuracy (%) averages GSM8K, HumanEval, and TriviaQA
  • Four fresh trials use empty workspaces, the original checkpoints, prompts, and verification protocol, Claude Code through Fireworks, maximum reasoning effort, eight hours, and one H200 NVL
  • ><tr><td>Agent</td><td>Trial</td><td>PPL</td><td>HE/TQ/GS</td><td>Mean</td></tr><tr><td colspan=
  • HE/TQ/GS denote HumanEval/TriviaQA/GSM8K, with fifty questions each; Mean averages their accuracies
  • Paired variants share source weights, calibration, precision allocation, group sizes, and inference
  • ><tr><td>Setting</td><td>PPL</td><td>GSM8K</td><td>HE</td><td>TQ</td><td>Mean</td></tr><tr><td colspan=
  • Compensation reduces negative log-likelihood on 197 of 256 MoE verification contexts
  • Runtime allocations include caches, recurrent states, and temporary workspace
  • Values are medians of three cold starts