A2Optimizer: Accelerating Time-to-Efficiency of LLM Serving with Agents

Taekwon Lee, Kyoungho Jeun, Hyeseong Kim, Jiin Kim, Gunho Park, Byeongjun Shin, Seungjun Lee, Wontak Ryu, Seunghyun Lee, Deukwoong Woo, Woong Park, Minyoung Kim, Baeseong Park, Dongsoo Lee, Minsoo RhuarXiv 2026

TL;DR

AI coding agents can now write custom GPU kernels and tweak serving stacks to make large language models (LLMs) run dramatically faster—but writing the code is no longer the bottleneck. Agents spend nearly 90% of their time sitting idle in a queue, waiting for scarce GPUs to benchmark and profile their ideas. A2Optimizer breaks this logjam by pairing coding agents with a fast, co-evolving CPU-based performance simulator, slashing the time it takes to reach peak serving efficiency by an average of 3.9×.

What Problem Does This Paper Address?

When a competitive open-weight LLM drops, cloud providers face two distinct hurdles: getting it online (easy, usually done on day one) and making it cheap to run (hard, often taking months). Software tuning alone can boost per-GPU token throughput by up to 14× on the exact same hardware, directly dictating a provider's profit margins. The authors call the race to hit this sweet spot time-to-efficiency.

Increasingly, providers hand this optimization puzzle over to AI coding agents. You might assume that throwing more parallel coding agents at the problem would speed things up. Surprisingly, it doesn't.

Every code or configuration tweak an agent proposes must be tested across multiple traffic concurrency levels on real GPUs—machines that could otherwise be making money serving customers. Worse, simply spinning up the serving engine, loading massive model weights, and warming up the system eats up nearly 60% of each benchmark's runtime before actual measurement even begins.

Figure 3: Time breakdown of a single GPU benchmark sweep of GLM-5.3-Flash on an 8×H100 server.

In a 24-hour optimization run on an 8×H100 server, GPU benchmarking consumed 18.8 hours. Furthermore, because every accepted change shifts the system's performance bottleneck, agents must wait for a fresh GPU profiling pass ("diagnosis") before knowing what to fix next. As a result, parallel coding agents spend 89% of their time completely idle, waiting in line for GPUs.

Average time breakdown of a candidate slot showing 89% wait time

Methods

To get GPUs out of the critical path, the authors introduce A2Optimizer, which locks an orchestrator agent, parallel coder subagents, and an event-driven CPU simulator (A2Sim) into a closed, co-evolving loop.

Standard LLM simulators assume a fixed software stack—they break the moment an agent rewrites a GPU kernel or alters the batch scheduler. A2Optimizer's core innovation is co-evolution: whenever a coder agent modifies the serving stack (vLLM), it also updates A2Sim to match.

  • Kernel tweaks: The agent runs a quick micro-profile of its new kernel on a test GPU and updates A2Sim's latency lookup database.
  • Engine tweaks: If an agent rewrites scheduling or KV-cache logic, a coder updates A2Sim's Python engine model to mirror the new rules, verifying alignment via a fast CPU-only differential test.

With an up-to-date digital twin running in ~4 minutes on a CPU core (versus 1.3 hours on an 8×H100 node), A2Optimizer changes the workflow in three ways:

  1. Two-stage configuration search: Before writing code, it sweeps configuration knobs in simulation (screening one knob at a time, then crossing winners) to find a strong starting point.
  2. Simulated benchmarking & batched validation: Agents test and reject bad ideas in simulation. Real target GPUs are only woken up in the background once $K$ (e.g., 8) winning candidates accumulate, validating them in a single amortized sweep and recalibrating the simulator.
  3. Asynchronous orchestration: Because diagnosing bottlenecks in A2Sim takes minutes on CPUs, the orchestrator immediately assigns new tasks as soon as an agent finishes, eliminating synchronization barriers. Any changes A2Sim cannot model (like CPU host-side overheads) are flagged as "escalated" and tested directly on GPUs during batch sweeps.

Datasets

No new datasets are introduced, nor are models trained. Instead, the system optimizes four open-weight models (GLM-5.3-Flash, DeepSeek-V4.1-Flash, Qwen3.8-Flash-Next, and GPT-OSS-120B) using two realistic serving workloads and two accuracy benchmarks:

  • AgentX: An open, multi-turn agentic coding trace featuring growing contexts and heavy prefix cache reuse.
  • ShareGPT: A standard conversational chat workload with shorter prompts.
  • GSM8K & MMLU: Used post-optimization to verify that aggressive floating-point kernel fusions didn't degrade model intelligence.

Key Insights and Ideas

  • Rejections cost as much GPU time as breakthroughs: In a baseline GPU-bound agent loop, 11 out of 17 candidates were either rejected or crashed—wasting 11.3 hours of precious 8×H100 server time. Moving rejections to cheap CPUs is the ultimate unlock.
  • Asynchronous agents hurt without simulation: You might think removing round-based barriers would speed up a GPU-only loop. In ablation tests, making the baseline loop asynchronous actually slowed down time-to-efficiency (from 12.8 hours to 14.8 hours) because running a GPU diagnosis after every single accepted candidate clogged the GPU queue even worse.
  • Don't calibrate too rarely: Increasing the GPU batch size $K$ from 8 to 16 cuts GPU time per candidate, but starves the agents of real hardware diagnostics. Because A2Sim doesn't model CPU host-side overhead, fewer GPU diagnostic passes meant missing host-side optimizations that accounted for 42% of throughput gains at $K=8$.

Key Results

Evaluated over a 24-hour wall-clock budget on an 8×H100 server (using Claude Code with Claude Opus 5.5):

  • Faster Time-to-Efficiency: A2Optimizer reached the baseline loop's peak 24-hour throughput 1.1× to 15.1× faster (geometric mean of 3.9×). For DeepSeek-V4.1-Flash, what took the baseline 23.3 hours took A2Optimizer just 5.2 hours.
  • Higher Peak Frontier: Given the full 24 hours, A2Optimizer achieved 1.12–1.52× higher per-GPU throughput and 1.31–1.77× higher interactivity (tokens/sec/user) over default vLLM recipes—beating the GPU-bound agent baseline by 1.06–1.11× in throughput.
  • Preserved Accuracy: Final optimized systems stayed within 0.23 percentage points of the original models on GSM8K and MMLU.

Limitations and Future Work

  • Blind spots in simulation: A2Sim does not model host-side CPU overheads (such as kernel launch latencies, host–GPU synchronization, or Python scheduling overhead). Candidates targeting these bottlenecks must still be "escalated" and benchmarked one-by-one on real GPUs.
  • Diminishing returns on parallel coders: Scaling parallel coder slots ($N$) beyond 8 runs into resource contention on the shared pool of test GPUs used for correctness checks, while increasing the rate of failed implementations (from 4% at $N=2$ to 9% at $N=8$).
  • Future directions are not explicitly discussed by the authors, though they note that A2Optimizer's design allows providers to plug in any trusted simulator or kernel-generation agent framework they already maintain.

Summary updated

BibTeX
@misc{lee2026optimizer,
  author = {Taekwon Lee and Kyoungho Jeun and Hyeseong Kim and Jiin Kim and Gunho Park and Byeongjun Shin and Seungjun Lee and Wontak Ryu and Seunghyun Lee and Deukwoong Woo and Woong Park and Minyoung Kim and Baeseong Park and Dongsoo Lee and Minsoo Rhu},
  title = {{A2Optimizer: Accelerating Time-to-Efficiency of LLM Serving with Agents}},
  year = {2026},
  eprint = {2611.36831},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.36831},
}
Figure