TEMPO: Makespan-Aware Expert-Parallel Load Balancing Across Memory- and Compute-Bound Regimes
TEMPO introduces a makespan-aware expert-parallel load balancing dispatcher that models non-linear expert execution times across memory- and compute-bound regimes to dynamically optimize token distribution, achieving up to 15.5% throughput gains and significant latency reductions in mixed-regime scenarios where traditional linear-count-based methods fail.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are running a massive, high-speed pizza delivery service for a city that never sleeps. You have a fleet of identical delivery drivers (the GPUs) and a central kitchen with hundreds of different specialty chefs (the "experts" in an AI model). Every time a customer orders a pizza, the system has to decide which chefs work on it and which driver takes the finished pie. In the world of Artificial Intelligence, specifically with a type of model called a "Mixture-of-Experts" (MoE), this is exactly what happens. These models are like giant brains made of thousands of smaller, specialized sub-brains. When the AI thinks, it doesn't use its whole brain at once; it picks a few specific experts to handle the job.
The big challenge is keeping the whole team moving at the same speed. If one driver gets stuck with a huge, complicated order while everyone else is idle, the whole delivery is delayed. The time it takes to finish a batch of orders is determined by the slowest person in the group. For years, the standard rule for balancing this workload was simple: "Just split the number of orders evenly." If you have 100 orders, give 10 to each of your 10 drivers. This seemed logical, like sharing a pile of apples equally. But what if some apples are heavy rocks and others are light feathers? Or what if the kitchen has a rule where picking up a new chef takes a fixed amount of time, no matter how many pizzas they make? The old rules assumed that time was always directly tied to the number of orders. This paper asks: what if that assumption is wrong?
The researchers behind this paper, working at KlingAI, discovered that the old "count the orders" rule is actually a trap. They found that in modern AI hardware, the time it takes to process an expert isn't just about how many tokens (words or data chunks) it sees. It's a two-faced beast. Sometimes, the time is dominated by the sheer effort of loading the expert's "recipe" (weights) from the memory bank, which takes a fixed amount of time regardless of how small the order is. Other times, once the recipe is loaded, the time grows linearly with the number of orders. The old methods, which only looked at the number of orders, were missing the hidden cost of loading the recipe. They were trying to balance a pile of feathers and rocks by counting them, not weighing them.
To fix this, the team built a new dispatcher called TEMPO (Time-modeled Expert-Parallel Optimization). Instead of just counting tokens, TEMPO acts like a smart traffic controller that understands the physics of the kitchen. It uses a special "cost model" that measures exactly how long it takes to load a chef's recipe and how long it takes to cook the pizza. It realizes that if you have a "cold" expert (one that hasn't been used in a while), splitting its tiny order across two drivers is a disaster because you have to pay the "loading fee" twice. But if you have a "hot" expert with a mountain of orders, splitting it is fine.
The paper shows that TEMPO doesn't just guess; it calculates the perfect balance for every single batch of requests in milliseconds. They tested this on real AI models and found that the old methods were often 15% slower or caused significant delays for the last few customers in a line. TEMPO, however, keeps the line moving smoothly. It's like switching from a rule that says "everyone gets the same number of apples" to a rule that says "everyone gets the same amount of work," taking into account that some apples are heavy and some chefs are slow to wake up.
The researchers were very careful to show exactly where this new method works and where it doesn't. They proved that if the "hot" experts are so numerous that the system is just overwhelmed by the sheer volume of data (the "compute-bound" regime), the old token-counting method is actually fine. But in the real world, where some experts are busy and others are resting, and where the "loading fee" is high, TEMPO shines. They even mapped out a "phase diagram," which is like a weather map for AI traffic, predicting exactly when the new method will save time and when the old method is good enough.
In the end, this paper isn't just about a faster algorithm; it's about changing how we think about balancing work in AI. It teaches us that in the complex, high-speed world of modern AI, you can't just count things. You have to understand the hidden costs of moving data and the specific shape of the work. By measuring the actual time it takes to do the job rather than just counting the items, TEMPO makes AI models faster, more efficient, and ready to handle the massive demands of the future. It turns a chaotic kitchen into a well-oiled machine, ensuring that no driver is left waiting while the pizza sits under the heat lamp.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.