Reducing Batch Makespan for LLM Agent Workloads through Inference-Environment Coordination

The Ling Team at Ant Group presents coordinated optimizations that shorten batch makespan for agent workloads, which alternate between LLM inference and environment interaction in evaluation, data generation and RL rollouts.
Ask this paper
Resource model. For hybrid LLMs, a workload-based model splits GPU memory between KV cache and recurrent state and sets a reference concurrency that uses parallelism while limiting recomputation.
Routing and scheduling. Trajectory-aware routing keeps a trajectory on workers that hold its cache while balancing load. Chain-Advancing Action Scheduling prioritizes long chains when environment capacity is limited, which shortens the batch tail.
Results. Live runs with Ling-3.0-Flash and Ling-3.1-Flash on BFCL, SWE-bench Multilingual, WideSearch and MCP-Atlas cut makespan by 10.4% to 65.0% while evaluation scores stay aligned.
Deployment. The methods are used in training and evaluation for the Ling-3.x model series.
Abstract
Efficient batch execution of agent tasks is critical to LLM training and development workflows, including benchmark evaluation, synthetic-data generation, and RL rollouts. Since these tasks alternate between LLM inference and environment interaction, we present coordinated optimizations to reduce batch makespan, the time required to complete all tasks in a batch. For hybrid LLMs, a workload-based resource model guides GPU-memory allocation between key-value (KV) cache and recurrent state and provides a reference sample concurrency to exploit parallelism while limiting recomputation. Trajectory-aware routing and scheduling promote cache reuse while balancing worker load. Under constrained environment capacity, we decouple sample admission from environment execution and introduce Chain-Advancing Action Scheduling (CAAS), which prioritizes long chains using observed progress to shorten the batch tail. Controlled replay combines actual inference with recorded environment responses and durations for ablations of individual optimizations. Live evaluations with Ling-3.0-Flash and Ling-3.1-Flash on the BFCL, SWE-bench Multilingual, WideSearch, and MCP-Atlas benchmarks demonstrate makespan reductions of 10.4% to 65.0%, while evaluation scores remain aligned. Furthermore, these methods have been successfully applied to training and evaluation workflows for the Ling-3.x model series, accelerating the model-development cycle.