← Latest papers
🤖 machine learning

Requests of a Feather Must Flock Together: Batch Size vs. Prefix Homogeneity in LLM Inference

This paper introduces Feather, a reinforcement learning-based prefix-aware scheduler that optimizes the trade-off between batch size and prefix homogeneity using a lightweight Chunked Hash Tree, achieving 2–10× higher LLM inference throughput by reducing KV cache access overhead compared to existing state-of-the-art schedulers.

Original authors: Saksham Rathi, Preeti, Mythili Vutukuru

Published 2026-05-08
📖 5 min read🧠 Deep dive

Original authors: Saksham Rathi, Preeti, Mythili Vutukuru

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 very busy, high-speed library where a single librarian (the GPU) is trying to answer thousands of questions from different people (requests) at the same time.

In the world of Large Language Models (LLMs), the librarian has to read a massive book of "context" (the Key-Value cache) for every single word they generate. The paper argues that the current way of organizing these questions is inefficient because it focuses too much on how many questions the librarian answers at once, rather than how similar those questions are.

Here is the story of their solution, Feather, broken down into simple concepts:

1. The Problem: The "Crowded Bus" vs. The "Family Group"

Currently, most systems try to pack as many people as possible onto a bus (a "batch") to make the trip efficient. They use a "First Come, First Served" rule.

  • The Issue: If you put 500 strangers on a bus, they all want to go to 500 different places. The driver has to stop at 500 different stops, constantly switching directions. This is chaotic and slow.
  • The Discovery: The authors found that if you take a smaller group of 100 people who all live on the same street (share a "prefix"), the driver can drive straight down that street without stopping. Even though the bus isn't full, the trip is much faster because the driver doesn't have to keep turning the wheel.

The Key Insight: It is better to have a smaller group of people going to the same place than a huge group of people going to different places. This is called Prefix Homogeneity.

2. The Old Way: The "Tree Climber"

Existing systems (like SGLang) try to find these groups by looking at a giant, complex family tree (a Radix Tree) to see who shares the same ancestors.

  • The Problem: Climbing this tree to find matches takes a lot of time and energy on the computer's "brain" (the CPU). In fact, the time spent climbing the tree was sometimes almost as long as the time the librarian spent actually answering the questions! It was like spending 10 minutes organizing the passengers just to drive for 10 minutes.

3. The Solution: "Feather"

The authors built a new scheduler called Feather that fixes both problems.

Part A: The "Chunked Hash Tree" (CHT) – The Smart Checklist

Instead of climbing the giant family tree, Feather uses a clever shortcut.

  • The Analogy: Imagine instead of checking every single letter of a person's name, you just check the first few "chunks" of their address.
  • How it works: Feather breaks the long text into small blocks (chunks) and gives each block a unique "fingerprint" (a hash). It keeps a simple list of which fingerprints are currently being used.
  • The Benefit: It can instantly see, "Oh, this new request has the same fingerprints as the group already on the bus." It does this so fast that the "CPU brain" barely breaks a sweat. It's like using a barcode scanner instead of reading a whole book to check a ticket.

Part B: The "Reinforcement Learning" (RL) – The Smart Dispatcher

Feather doesn't just find similar groups; it learns when to stop adding people to the bus.

  • The Dilemma: If you keep adding people to the bus, you might eventually have to add someone who lives on a different street. If you add them, the whole group becomes messy, and the speed drops.
  • The Learning: Feather acts like a smart dispatcher who has learned through trial and error: "If I add one more person, we might lose our speed. Let's send this bus now while it's still fast, and wait for the next group."
  • The Result: It dynamically decides the perfect moment to launch the batch, balancing between having a full bus and keeping everyone on the same street.

4. The Results: Speeding Up the Library

When the authors tested Feather:

  • Speed: It made the system 2 to 10 times faster than the current best methods when people were asking similar questions.
  • Safety: If the questions were all totally different (no shared streets), Feather didn't get confused; it just performed just as well as the old methods.
  • Efficiency: It reduced the "traffic jams" in the computer's memory, meaning the librarian didn't have to run back and forth as much to fetch the book pages.

Summary

Feather is a new way of organizing AI requests. Instead of stuffing as many requests as possible into a single batch, it groups similar requests together (like a family going to the same destination) and uses a super-fast, low-energy method to find those groups. It learns exactly when to stop adding people to the group to keep the trip smooth and fast.

The paper claims this approach significantly speeds up AI response times without needing expensive new hardware, simply by organizing the "traffic" smarter.

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 →