← Latest papers
🤖 AI

Position: LLM Serving Needs Mathematical Optimization and Algorithmic Foundations, Not Just Heuristics

This position paper argues that LLM inference serving has outgrown generic heuristics and requires the development of mathematical optimization models and algorithmic foundations tailored to its unique characteristics to ensure provable performance guarantees across diverse workloads.

Original authors: Zijie Zhou

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

Original authors: Zijie Zhou

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 restaurant kitchen. This kitchen doesn't just cook burgers; it creates complex, multi-course meals based on orders that arrive one by one. The catch? You don't know how long each meal will take to cook, and the more the chef cooks, the more counter space the meal takes up, crowding out other orders.

This is exactly the situation with Large Language Models (LLMs) today. They are the "kitchens" powering search engines, coding assistants, and chatbots.

The paper argues that right now, these digital kitchens are running on guesswork and simple rules (heuristics). The author believes it's time to switch to mathematical precision and solid algorithmic foundations to make them faster, cheaper, and more reliable.

Here is the breakdown of the paper's argument using everyday analogies:

1. The Problem: "Good Enough" Rules Are Failing

Currently, systems like vLLM and SGLang (the software that runs these models) use old-school rules borrowed from general computing.

  • The Queue: If you have a line of customers, the kitchen just serves them in the order they arrived (First-Come, First-Served).
  • The Routing: If you have multiple chefs, the kitchen sends the next order to the chef with the shortest line, or just spins a wheel to pick one.
  • The Cleanup: If the counter gets full, the kitchen throws away the oldest item on the counter to make room for a new one.

The Paper's Point: These rules work fine for a standard burger joint. But LLMs are weird.

  • The "Growing" Meal: Unlike a burger that takes up the same space from start to finish, an LLM meal grows as it's cooked. Every word the AI generates takes up more memory.
  • The "Two-Phase" Cooking: The first part of the order (reading the prompt) is fast and requires a lot of brainpower (compute). The second part (generating the answer) is slow and requires a lot of memory bandwidth.
  • The Unknown: The kitchen doesn't know how long the meal will be until it's finished.

Because of these quirks, the old "shortest line" or "oldest item out" rules often cause chaos, leaving some chefs idle while others are overwhelmed, or causing the counter to run out of space unexpectedly.

2. The Solution: Bring in the Mathematicians

The author says we need to stop guessing and start using mathematical optimization. Think of this as hiring a master logistics planner who uses a super-computer to calculate the perfect way to run the kitchen, rather than just following a rulebook.

The paper highlights four specific areas where math can fix the kitchen:

  • Balancing the Chefs (Load Balancing):

    • Current Way: Send orders to the chef with the fewest tickets.
    • Math Way: Calculate exactly how much "counter space" and "brainpower" each order will need as it grows, and distribute them so no single chef ever gets stuck waiting for the slowest one. The paper cites a real system (DeepSeek) that uses Linear Programming (a type of math) to do this perfectly, saving time and money.
  • The Waiting Line (Scheduling):

    • Current Way: Serve the first person in line.
    • Math Way: Look at the line and realize, "That person ordered a 10-page essay, but the next person only wants a one-sentence joke." Serve the joke first! It clears the counter faster and lets more people eat. Math can predict which orders will finish quickly to keep the kitchen moving.
  • The Counter Space (Caching):

    • Current Way: Throw away the oldest item when the counter is full.
    • Math Way: Realize that throwing away a "high-resolution video" to make room for a "tiny thumbnail" is a bad deal. Re-making the video takes forever and costs a fortune. Math can calculate the "cost" of throwing things away and keep the expensive items on the counter.
  • Planning the Staff (Capacity Planning):

    • Current Way: Keep adding chefs when the line gets too long.
    • Math Way: Use formulas to know exactly how many chefs you need before you even open the doors, based on how many customers are expected. This prevents the kitchen from ever getting overwhelmed in the first place.

3. Why Not Just Stick with the Rules?

The paper addresses the skeptics who say, "The current rules work fine, why change?"

  • "It works at scale": The author admits the current rules work okay, but they are fragile. If a viral app suddenly sends a weird type of order, the kitchen might crash. Math provides a safety net (guarantees) that ensures the kitchen won't fail, even in the worst-case scenarios.
  • "Hardware changes too fast": The author argues that while the hardware (the ovens) changes, the logic of how to organize the kitchen remains the same. Math gives you a blueprint that works even if you swap the ovens.
  • "Systems engineering is more important": The author says math and engineering are partners. You can have the fastest oven in the world, but if your scheduling is bad, the oven sits idle. Math tells you how to keep the oven busy.

4. The Big Picture

The paper concludes that the field of LLM serving has outgrown its "childhood" of simple rules. It has matured into a complex system that demands adult supervision from mathematicians and algorithm experts.

By treating these problems as math puzzles rather than just engineering tweaks, we can get:

  1. Predictability: Knowing exactly how the system will behave.
  2. Efficiency: Saving massive amounts of energy and money.
  3. Reliability: Ensuring the system doesn't crash when things get crazy.

In short: Stop guessing. Start calculating. The future of AI serving isn't just about building bigger models; it's about building smarter, mathematically proven ways to run them.

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 →