Manuscript Offprint

arXiv:2610.17528

ATTUNE: Agentic Throughput Tuning for LLM Training

Leo Fan, Hongyang Wang, Wenbo Chen, Jingguo Liu, Xian Li, Xuan Wang, Ruochen Wen, Yiming Yan, Hao Wu, Zheshen Wang, Benoit Dumoulin

ABSTRACT

Training recipes are tuned by hand for one model, cluster and workload, and every new model, accelerator, framework version or dataset means tuning again. Automated tuners search a fixed space of knobs and check only that a job runs, yet a configuration can run to completion while it silently changes training. ATTUNE is a single coding agent that tunes any working recipe for the workload and stack at hand, unattended, within a GPU-hour budget the user sets. It diagnoses each run and changes one lever at a time, guided by a catalog of lessons from past campaigns, and ships a recipe only if it passes a correctness gate: a configuration check against objective-changing settings and known stack defects, and a convergence check of its loss curve against the baseline's. On four held-out models at 64–128 GPUs, ATTUNE raises mean throughput over the strongest public recipe run on our stack by 6.7% on Llama-3.1-405B (best campaign 11.9%) and 33.9% on GLM-4.5 (54.7%), whose public recipe was written for H100. It keeps Mixtral-8x22B's recipe, where nothing it finds clears the noise band. Under a common GPU-hour budget it beats OptiCo, Bayesian optimization and random search on GLM-4.5 and MiniMax-M2; on GLM-4.5 its mean gain is more than four times the best alternative's at less than half the GPU-hours, and on both models its tuning pays for itself within a day of training. The gate rejects no legitimate run and catches 16 of 24 faulty runs, missing only ones that barely move the 20-step loss. Ablations tie its best campaigns to one of its search rules: retrying an out-of-memory layout with recomputation. We release ATTUNE's code and TrainingThroughputBench, a leaderboard of the fastest known recipes for MoE models up to 744B parameters on up to 256 GPUs, each with its throughput, cost per million tokens and a passed correctness check, at https://github.com/amazon-science/attune.

1 INTRODUCTION

Training large language models is expensive, and much of the cost depends on how efficiently each job uses its hardware. Reaching high efficiency requires a well-tuned training recipe, the full configuration a job runs with, from how the model is parallelized across GPUs (Shoeybi et al., 2019; Narayanan et al., 2021; Rajbhandari et al., 2022; Liu et al., 2025) to how memory, communication and kernels are managed. What works best depends on the model, the accelerator, the software stack and the data at hand, and a recipe that works well in one setting rarely works as well in another. Finding a good recipe remains largely manual: engineers launch trial jobs, profile them to find the bottleneck and adjust the configuration until throughput stops improving (Jiang et al., 2024b). Well-tuned recipes are therefore published for only a few popular models and accelerators, and most teams must repeat this work for their own setting. Existing tools automate parts of this tuning within a space fixed in advance. Parallelization planners (Zheng et al., 2022; Miao et al., 2022; Liu et al., 2024; Um et al., 2024) and vendor autoconfigurators (DeepSpeed Team, 2021; NVIDIA, 2026c) search placement with a cost model, a simulator or a sweep. Black-box search such as Bayesian optimization (Bergstra et al., 2011) needs no model of the system but many costly runs. Recent LLM-agent tuners (Chen et al., 2026; Ding et al., 2025, 2026b) let agents read profiles and propose configurations, but over a fixed schema of knobs. All of them judge a configuration by whether it runs and how fast.

Two observations motivate a different design. First, the throughput a working recipe misses lies partly in knobs that pay off only when changed together and partly in knobs a fixed schema does not list, such as virtual pipeline stages or a different expert dispatcher. Finding it requires a tuner that diagnoses what limits each run, as an expert does, and can change any argument the framework exposes. Second, a configuration can change what the model trains without failing. A larger microbatch, a standard throughput knob, changes the load-balancing loss of mixture-of-experts (MoE) models.

Correspondence to: Leo Fan

<jianhfan@amazon.com, leofanxyz@gmail.com>.

Preprint.

that compute it per microbatch, and --grad-reduce-in-bf16 reads like a communication setting but also disables FP32 gradient accumulation. A tuner that checks only that a job runs could ship either.

Coding agents make such a tuner practical. An agent such as Claude Code (Anthropic, 2026) reads source code, runs commands and works on one task for hours. These are the abilities an expert uses to tune a recipe: reading the framework to learn what a flag actually does, launching and profiling jobs and finding the bottleneck in a profile. Such an agent can search the framework's full argument space instead of a fixed schema, while deterministic checks outside the agent decide which measurements count and which recipes are correct.

We present ATTUNE, an agentic tuner that starts from any working recipe, including an expert's, and improves its training throughput for the actual workload and stack, unattended, within a GPU-hour budget the user sets; one such tuning session is a campaign. A single coding agent runs the whole loop, guided by a tuning skill that holds its search rules, helper scripts and a catalog of levers distilled from past campaigns. The agent diagnoses each finished run from its metrics and logs, profiles a run when the next decision needs it, reads a flag's implementation in the training image before using it, and changes one lever or one coupled set at a time. It stops when it judges the search converged.

ATTUNE ships a recipe only if it passes a correctness gate of two checks: a configuration check that refuses any setting that changes the objective or hits a known stack defect, and a convergence check that compares the recipe's loss curve with the baseline's. If no candidate clears the noise band, it ships the starting recipe. A harness runs the loop from one command to a shipped recipe, and after each campaign the agent writes generalizable lessons back into its skill.

We evaluate ATTUNE on four models held out from its development, on H100 and B200: Llama-3.1-405B (Grattafiori et al., 2024), Mixtral-8x22B (Jiang et al., 2024a; Mistral AI, 2024), GLM-4.5 (GLM-4.5 Team, 2025) and MiniMax-M2 (MiniMax, 2025), each at its public recipe's workload on real text. Each campaign starts from the strongest public recipe, which an expert has already tuned for its own setting. We ask how far ATTUNE improves that recipe, which of its design choices matter and how it compares with OptiCo, Bayesian optimization and random search under a common GPU-hour budget. Every tuner gets the same budget, the same isolated environment and the same correctness gate.

Our contributions:

• ATTUNE, a single-agent throughput tuner that runs unattended from a working recipe to a shipped one (skill, harness and correctness tools, open source at github.com/amazon-science/attune). It can change any framework argument that its configuration check classifies as objective-preserving.

• A correctness gate for throughput tuning, enforced by the control plane independently of the tuner and built on Megatron-Bridge’s convergence check. On runs with a known answer it rejects no legitimate recipe and stops every objective-changing setting and configuration defect, while subtle faults pass it. Existing tuners have no such gate.

• An evaluation on four held-out models under one protocol, with scoring, correctness checks and a single decision rule run by the control plane for every tuner (Section 3.1). From the strongest public recipe, ATTUNE gains 6.7% on Llama-3.1-405B and 33.9% on GLM-4.5 on average, up to 11.9% and 54.7% in its best campaign, and keeps Mixtral-8x22B's recipe. Under a common GPU-hour budget it beats every other tuner on GLM-4.5 and MiniMax-M2, on GLM-4.5 with more than four times the gain of the best alternative and, on average, less than half the GPU-hours of any.

• TrainingThroughputBench (TTB), an open leaderboard of the fastest known training recipe for each model and accelerator, with its throughput, its cost per million tokens and a passed correctness check (Section 4).

References (54)