Xiaomi's ARL-Tangram Cuts AI Agent Training Costs by 4.3x
Xiaomi and Peking University built ARL-Tangram to schedule external CPUs, GPUs, and APIs at the granularity of individual actions, cutting resource waste by 71%.
ProTakeaways
- ARL-Tangram schedules external CPU, GPU, and API resources at the granularity of individual agent actions rather than full trajectories.
- Existing frameworks waste over half of allocated CPUs; reward-model GPUs were measured at under 3% SM activity.
- Delivers up to 4.3x lower action completion time, 1.5x faster training steps, and 71.2% external resource savings.
- CPU manager uses Allocate-on-Execution via Docker cgroups; GPU manager uses Evict-on-Execution with LRU service caching.
- Beats Kubernetes on CPU workloads and outperforms SGLang and ServerlessLLM by 18x and 100x on GPU reward serving.
- Deployed in production to train Xiaomi's MiMo-V2.5 and MiMo-V2-Flash models.
Training agents with reinforcement learning has quietly become one of the most resource-hungry workloads in the cloud, and not in the way most people think. The GPUs holding the policy model are only part of the bill. Every time an agent runs a shell command, hits a search API, or asks a reward model to grade a trajectory, it touches a separate pool of external resources sitting outside the training cluster. A new system called ARL-Tangram, built by researchers at Peking University and Xiaomi's LLM-Core team, argues that these external resources are being spectacularly mismanaged, and it proposes to fix that by scheduling at the level of individual agent actions.

The 47% problem
The paper's central observation is that existing agentic RL frameworks provision external resources statically, either pinning them to a full trajectory or isolating them by task. In AI coding, for example, the environment is accessed only for 47% of a trajectory's lifetime on average, leaving the allocated CPUs idle for the rest of the time. At the task level, things are just as bad. Profiling two production tasks, DeepSearch and MOPD, showed that the number of external invocations varies by up to three orders of magnitude during training, so any fleet sized for peak demand sits mostly empty.
The consequences hit both directions. Under-provisioning stalls the rollout phase and can crash training runs when invocations time out. Over-provisioning burns money on idle CPUs and reward-model GPUs, some of which the authors measured running at under 3% SM activity.
Break down, then pool
ARL-Tangram's fix is to stop treating external resources as something owned by a trajectory or a task and instead schedule them at the action level, defined as a single atomic invocation with no interleaved generation. Two mechanics do the heavy lifting:
- Breakdown: release resources back to a shared pool after every action, while preserving the state of the underlying environment or service so it can be restored quickly on the next call.
- Pool: multiplex the freed resources across all actions of the same type, and elastically scale allocations up when a request is parallelizable.

Every action gets a vectorized cost across CPU, GPU, memory, bandwidth, and API quotas, plus an elasticity function that describes how its runtime shrinks when given more units of the key bottleneck resource. The scheduler is First-Come First-Served to avoid starving any single trajectory (a starved action can invalidate the whole rollout), and it uses a greedy eviction heuristic that repeatedly tries removing the last candidate to see whether reallocating its share to the survivors reduces total action completion time.
Two very different resource managers
CPUs and GPUs need different tricks. For CPUs, the team built an Allocate-on-Execution manager that manipulates a container's cgroup right before each docker.exec(), updating cpulimit and cpuset on the fly. Memory stays pinned to keep environment state warm. To make elasticity real, they also swap in pytest -n ${parallel_num} so test suites can actually use the extra cores they get allocated.
GPUs use Evict-on-Execution. Reward services stay in CPU memory by default, and when an action arrives, ARL-Tangram checks whether the requested service is already resident on the target GPUs. If not, it evicts a cached service using LRU and restores the requested one. Because many reward services never mutate their weights, eviction is a simple memory release rather than a full write-back. GPUs are grouped into power-of-two chunks (sizes 1, 2, 4, 8) to keep fragmentation manageable across common tensor-parallel configurations.
The numbers
On a testbed with 48 training GPU nodes, a 15-node CPU cluster and a 5-node reward GPU cluster, ARL-Tangram was compared against Kubernetes for CPU workloads and against SGLang and ServerlessLLM for GPU reward services:
- Average action completion time improved by up to 4.3x, with per-step training time dropping 1.4x for AI coding and 1.5x for DeepSearch.
- For AI coding at batch size 1536, Kubernetes hit control-plane timeouts, while ARL-Tangram absorbed the load with less than a 2x ACT increase over its own 128-batch baseline.
- For GPU reward services at batch size 2048, ARL-Tangram beat SGLang by 18.1x on average ACT, while ServerlessLLM failed outright.
- ARL-Tangram served 10 reward services using only 29% of the GPUs that the over-provisioned baseline required to hit the same ACT.
- System overhead stayed under 3% of execution time for CPU-heavy workloads, and around 25% (dominated by GPU service restoration) for GPU-heavy ones.
Why this matters beyond one paper
The system has already been used in production to train the MiMo series models, including MiMo-V2-Flash and the recent MiMo-V2.5 lineup, which lean heavily on Multi-Teacher On-Policy Distillation and large-scale agentic RL. Anyone running agentic RL at scale today is probably burning a large fraction of their reward-model GPUs on idle time, and the same is true of code-execution CPU fleets. Treating external tool calls as first-class scheduling units, rather than as opaque side-effects of the rollout loop, is the kind of infrastructure shift that tends to spread once one team publishes the numbers.
The paper is a systems contribution rather than an open-source release, and no ARL-Tangram code repository has been published so far. The ideas, however, translate cleanly to any RL framework that separates rollout from training, and the action-level abstraction is agnostic to whether the tool is a Python sandbox, a browser, or a reward model service.