0%
LLM Inference and Serving: GPUs, Batching, and Cost
How Inference Works
Hardware and Memory
Making Inference Fast
Multi Model Routing and Cascades
Most products start with one model for everything. As traffic grows, it becomes clear that many requests do not need the largest, most expensive model, while some need more than a small model can give. Using several models, and choosing among them per request, can cut cost substantially while keeping quality where it matters. This lesson covers why multi model setups pay off, how routers choose a model, how cascades escalate from cheap to expensive, how to evaluate these systems and how to run them in production.
Requests vary in difficulty
Real traffic is a mix. Some requests are simple, such as rephrasing a sentence, classifying a support ticket or answering a common question. Others are hard, such as multi step reasoning, complex code generation or nuanced writing. A frontier model handles both well, but at a high price per token. A small model handles the simple ones nearly as well at a fraction of the cost, and fails on the hard ones. If most traffic is simple, serving all of it with the frontier model spends money on capability that is not needed.
The price gap between models
Prices per million tokens differ by one to two orders of magnitude between the smallest and largest models from the same provider, and self hosted small models can be cheaper still. Latency differs too: small models produce tokens faster and start sooner. This gap is the opportunity. If a router can send seventy percent of traffic to a model that costs a tenth as much, without noticeable quality loss, the blended cost falls by more than half. Even modest routing accuracy can produce large savings because the gap is so wide.
Quality is task dependent
Model rankings depend on the task. A model that leads on coding benchmarks may lag on summarization in a particular domain, and a small model fine tuned on your data can beat a much larger general model on your specific task. Multi model setups let each task use the model that serves it best, not just the cheapest model that is good enough. This matters for products with distinct features, such as a writing assistant that also extracts structured data, where different features have different best models.
Latency and availability benefits
Beyond cost, multiple models help with latency and reliability. Routing simple requests to a fast small model gives users quicker responses for common actions. Having several models available, from different providers or self hosted, provides fallbacks when one is degraded or rate limited. A product that depends on a single model inherits every outage and price change of that model; a product that can switch has more control.
Kinds of multi model systems
Three patterns recur. Static assignment maps each feature or task to a fixed model chosen by evaluation, which is simple and often captures most of the benefit. Routing chooses a model per request based on its content, using a classifier or rules. Cascades try a cheap model first and escalate to a stronger one only when the cheap answer looks inadequate. These can be combined, for example static assignment per feature with a cascade inside the hardest feature.
Costs of complexity
Multiple models add work. Each model needs evaluation, prompt tuning, monitoring and a plan for version changes. Prompts written for one model may need adjustment for another. Routing logic must be built, tested and maintained, and routing errors create inconsistent quality that users notice. The benefit must outweigh these costs, which is usually true at significant scale and often not true for small products where a single good model is simplest.
A worked blended cost example
Consider a product that serves ten million requests a month, each averaging one thousand input tokens and three hundred output tokens. Suppose the frontier model costs ten times as much per token as a capable small model. If every request goes to the frontier model, the monthly bill is ten units per request times ten million requests. If seventy percent of requests are routed to the small model and thirty percent stay on the frontier model, the blended cost per request is seven tenths of one unit plus three tenths of ten units, which is 3.7 units. That is a saving of sixty three percent. Even if the router is imperfect and sends forty percent to the frontier model, the cost is 4.6 units, still less than half. This arithmetic is why multi model setups attract attention as soon as inference becomes a large line item.
Where the savings come from
The savings depend on three numbers: the price ratio between models, the share of traffic that can safely use the cheaper model, and the overhead of making the decision. A wide price ratio and a large easy share produce big savings. A narrow ratio, such as two models within a factor of two in price, leaves little room, and the complexity may not be worth it. Overhead includes the router call, any verifier call, and repeated calls in cascades. Estimating all three before building anything gives a realistic ceiling on the benefit and helps decide whether to invest.
Measuring difficulty in your traffic
Before deciding on a multi model design, it helps to measure how much of your traffic is easy. A practical method is to sample a few thousand real requests, answer each with both a small and a large model, and have a judge or human raters mark whether the small answer is acceptable. The share of acceptable small answers is an upper bound on what a perfect router could move. If it is ninety percent, a multi model design has large potential. If it is twenty percent, the product is mostly hard requests, and a single strong model may be the right choice, with effort better spent elsewhere.
Small models keep getting better
The capability of small models rises quickly. A task that needed a frontier model a year ago may now be handled well by a model a tenth the size. This trend favors designs that make it easy to move traffic to cheaper models as they improve. Teams that built evaluation sets and routing infrastructure can capture each improvement within days by re running evaluations and adjusting assignments. Teams locked into one model must do that work from scratch each time, which often means they do not do it at all and keep overpaying.
Fine tuned specialists
A common pattern pairs a general frontier model with one or more fine tuned small models for high volume, narrow tasks. Classification of support tickets, extraction of fields from invoices and rewriting text into a house style are good candidates: the task is well defined, labeled examples exist or can be created, and volume is high enough that per token savings add up. The specialist often matches or beats the general model on its task at a small fraction of the cost and with lower latency, while the general model handles the open ended remainder.
When one model is the right answer
Not every product should use several models. Early products with modest traffic benefit more from fast iteration on prompts and features than from cost optimization. Products whose traffic is mostly hard requests gain little from routing. Products with strict consistency requirements may prefer one model so every answer has the same voice and behavior. The decision should be revisited as traffic grows, because the balance between complexity and savings shifts as the inference bill grows from a rounding error into a major cost.
Before building a per request router, assign each feature the cheapest model that passes its evaluation. This simple step often delivers most of the savings with little risk.