Inference 101, lesson 13
Serving engines: the software between model and chip
Between the model and the chip sits software that decides who goes next, hands out memory and shares each read of the model. This lesson shows what a serving engine does, and why the same chip serves far more people with a good one.
Every example below changes to fit what you pick. The businesses are made up for teaching.
The picture, one step at a time
Each box is one stage. The picture lights up as you scroll.
What a serving engine does, from the queue to the answer
1Taking requests
Requests arrive from many people at once and wait in a line.
2Scheduling
Deciding which requests go on the chip in this step, and which wait for the next.
3Handing out memory
Giving each conversation's notes small pages of memory as it grows, and taking them back when it ends.
4One read, many answers
Writing the next token for every request on the chip from a single read of the model.
5Reusing work
Spotting a start it has read before and keeping its notes, instead of reading it again.
6Sending tokens back
Streaming each new token to the right person as soon as it is written.
The engine runs the service. The model and the chip do not.
Step 1 of 7
The software between the model and the chip
A model is a big file of numbers. It cannot serve anyone by itself. A serving engine is the software that loads it onto the chips, takes requests, decides their order, hands out memory, and sends the answers back. Think of a restaurant: the recipes are the model and the ovens are the chips, but the kitchen manager runs the service. Where the picture breaks: a cook works on one dish at a time, while the engine moves every order forward in the same step.
The vLLM docs (read 29 November 2026) call it "a fast and easy-to-use library for LLM inference and serving".
Step 2 of 7
Scheduling: who goes on the chip this step
The engine works in steps. Each step writes one token for every request on the chip. When a request finishes, it leaves, and one from the line takes its place at the very next step. Older systems made the whole group wait for the slowest request before letting anyone new in. Joining at every step means short answers are not stuck behind long ones. This is the continuous batching of lesson 6, and the engine is what runs it.
vLLM's docs call this "continuous batching". NVIDIA's TensorRT-LLM calls it in-flight batching, which it says "eliminates wait times by dynamically managing request execution" (both read 29 November 2026).
Why let a request join at every step, not only when a whole group finishes?
Step 3 of 7
Handing out memory in pages
Each conversation keeps notes in the chip's memory (lesson 3), and the notes grow with every token. Nobody knows in advance how long an answer will be. Older systems reserved room for the longest possible answer, and most of it sat empty. The fix borrowed an old idea from computers: hand out memory in small pages, one at a time, as each conversation grows. Picture a cloakroom with numbered hooks, instead of a whole rail kept for every guest.
The vLLM paper (Kwon and others, 2023) found that in earlier systems only 20.4% to 38.2% of the memory set aside for these notes held real notes. Its paged approach, PagedAttention, is "analogous to the virtual memory in operating systems" and wastes almost none.
Step 4 of 7
One read, many answers
Lesson 2 showed why sharing a read of the model is where the cost falls, and lesson 6 covered batching in depth. The engine is what actually does the sharing. And because paging wastes less memory, more conversations fit on the chip at once, so each read of the model serves more people.
With paging and better scheduling together, the vLLM paper reports 2 to 4 times the throughput of the leading systems it tested, at the same delay for each user.
Step 5 of 7
Reusing work
Many requests start the same way: the same instructions, the same documents. An engine can keep the notes from a start it has already read and use them again, so the shared part is not read twice. Lesson 7 explains how providers charge for this. Here, the point is that the engine is where it happens.
SGLang's paper calls its method RadixAttention, built "for KV cache reuse", and reports up to 6.4 times the throughput of other systems on its tests. vLLM's docs list "prefix caching" too (read 29 November 2026).
Step 6 of 7
The engines you will hear about
vLLM and SGLang are open engines for big servers with many users. TensorRT-LLM is NVIDIA's own, for its GPUs. llama.cpp is built to run with little set-up on all kinds of hardware, from a laptop to a server, and Ollama wraps local running into a simple app. Lesson 14 uses those last two.
The people who maintain vLLM formed a company, Inferact, backed by a16z (announced 22 January 2026). The creators of SGLang formed RadixArk, backed by Accel (announced 5 May 2026). Both backers' announcements say the companies will keep supporting the open projects.
Step 7 of 7
What this means for you
If you use AI for answering customers through an API, the provider runs the engine, and you only see the speed and the price. If you rent a GPU yourself (lesson 5), the engine is your choice. The same chip can serve far more people with a good engine than with a plain one, so pick and tune the engine before you rent more chips.
Your rented GPU turns users away while its memory is half empty. What do you look at first?
Which job of the engine is that?
Here are four things you might notice when AI is served for your business. Sort each one into the part of the engine's work that explains it.
1A customer asking a one-line question gets an answer straight away, even though someone else's long reply is still being written.
2Every chat starts with the same two pages of shop rules, and the engine stops reading them afresh each time.
3After changing the serving software, the same chip holds twice as many chats at once.
4Fifty customers are chatting at once, and the chip reads the model once per step for all of them.
0 of 4 right so far, 4 to go.
What a serving engine does
This is what you keep: the engine's jobs on one card, and where to look when a chip serves fewer people than it should.
What a serving engine does
- It takes requests from many people and keeps them in a line.
- It schedules in steps: a finished request leaves and a waiting one joins at the next step.
- It hands out memory in small pages as each conversation grows, so little sits empty.
- It writes the next token for everyone on the chip from one read of the model.
- It keeps the notes from a shared start and reuses them, so the same text is not read twice.
- Big servers often run vLLM, SGLang or NVIDIA's TensorRT-LLM. One machine at home often runs llama.cpp or Ollama.
Before you buy or rent more chips, check the engine: it decides how many people one chip can serve.
Next: Lesson 14: Running a model on your own machine. How much memory a model needs, the tools that run it, and what you gain and give up by keeping it at home.