← Latest papers
🤖 machine learning

BlendServe: Optimizing Offline Inference for Auto-regressive Large Models with Resource-aware Batching

BlendServe is a system that optimizes offline auto-regressive large model inference by introducing a resource-aware prefix tree to effectively combine resource overlapping and prefix sharing, thereby achieving up to a 1.44x throughput improvement over industry standards like vLLM and SGLang.

Original authors: Yilong Zhao, Shuo Yang, Kan Zhu, Lianmin Zheng, Baris Kasikci, Yang Zhou, Jiarong Xing, Ion Stoica

Published 2026-06-09
📖 4 min read☕ Coffee break read

Original authors: Yilong Zhao, Shuo Yang, Kan Zhu, Lianmin Zheng, Baris Kasikci, Yang Zhou, Jiarong Xing, Ion Stoica

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 run a massive, high-speed factory that builds custom robots (these are the AI models). Your job is to process thousands of orders (requests) to build these robots.

In the past, if you wanted to build robots quickly, you had to choose between two types of orders:

  1. The "Heavy Lifting" Orders: These require a lot of muscle (compute) but very little storage space. Think of them as orders to build a robot with a super-strong arm but no storage compartments.
  2. The "Heavy Storage" Orders: These require very little muscle but a massive amount of storage space. Think of them as orders to build a robot with a tiny arm but a giant warehouse inside it.

The Problem: The Factory Floor Bottleneck

Your factory has two main resources:

  • Muscle Machines (Compute): These are fast but get tired if they have to wait around.
  • Storage Shelves (Memory): These are huge but get clogged if they aren't used efficiently.

The Old Way (Naive Batching):
Previously, factories just took orders in the order they arrived. If you had a line of 10 "Heavy Lifting" orders, your Muscle Machines were working overtime, but your Storage Shelves were sitting empty and useless. Then, if the next 10 orders were "Heavy Storage," your Storage Shelves were packed, but your Muscle Machines were sitting idle, twiddling their thumbs.

This is like trying to fill a truck with only bricks, then only feathers. You can't fit as much as you could if you mixed them together. The truck (your computer chip) ends up half-empty half the time.

The New Problem:
There was another trick factories used called "Prefix Sharing." Imagine that many orders start with the exact same first step (like "Paint the robot blue"). If you do these orders one after another, you only paint the blue once and reuse that result. This saves a ton of time.

However, the "best" order to do these for sharing (doing all the "Paint Blue" orders together) often meant grouping all the "Heavy Lifting" orders together and all the "Heavy Storage" orders together. This ruined the "mixing" strategy, leaving your machines half-empty again.

The Solution: BlendServe

The authors of this paper created a system called BlendServe. Think of it as a super-smart factory manager who can rearrange the order of the work to get the best of both worlds.

1. The "Resource-Aware" Tree:
Instead of a simple line, BlendServe organizes all the orders into a giant family tree.

  • Branches: Groups orders that share the same starting steps (Prefix Sharing).
  • Labels: Every branch is labeled with how much "Muscle" vs. "Storage" it needs.

2. The "Dual Scanner" Algorithm:
This is the magic trick. The manager doesn't just walk down the line. They stand at both ends of the tree at the same time:

  • They grab a "Heavy Lifting" order from the left side.
  • They grab a "Heavy Storage" order from the right side.
  • They put them together in the same batch.

The Result:
Now, when the factory runs, the Muscle Machines are working hard while the Storage Shelves are being filled. They are helping each other. The truck is fully loaded with a perfect mix of bricks and feathers.

Why This Matters

The paper claims that by doing this clever mixing while still keeping the "shared steps" together, BlendServe can:

  • Speed up the factory by up to 44% compared to current top systems (like vLLM and SGLang).
  • Get 90% of the way to the theoretical "perfect" speed. Imagine the perfect speed is 100 mph; BlendServe gets you to 90 mph, whereas other systems might only get you to 60 or 70 mph.

The Catch (and how they solved it)

The paper admits that predicting exactly how long a "Heavy Storage" order will take is hard because AI generates text one word at a time. To fix this, BlendServe does a quick "test run" on a tiny sample of the orders to guess how long they will take, then uses those guesses to build the perfect mix. Even if the guess is slightly off, the system is robust enough to adjust on the fly.

In short: BlendServe is a smart scheduler that stops your computer from sitting idle. It mixes different types of AI tasks together so that your computer's brain and memory work in perfect harmony, making offline AI processing much faster and cheaper.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →