LLM Serving Cost and Latency Tradeoffs
Running a large language model in production forces a choice between cheaper-but-slower and faster-but-pricier setups, and that choice depends heavily on what the model is being used for.
Serving a large language model in production — for example, summarizing earnings call transcripts or classifying news headlines for a trading signal — costs money and time for every request, and those two costs pull in opposite directions. A bigger, more capable model tends to produce better answers but is slower and more expensive per query; a smaller or more heavily compressed model responds faster and cheaper but with lower accuracy. Firms have to pick a point on this tradeoff based on what the application actually needs.
The choice matters differently depending on use case. A real-time trading signal that needs to react to breaking news within seconds cannot tolerate a slow model, even a highly accurate one, because a correct answer that arrives too late is worthless. An overnight research summary of hundreds of filings, by contrast, can use a larger, slower, more accurate model since there's no urgency, and the cost per query matters more when running at that scale.
Serving an LLM means trading off model size and accuracy against response speed and cost per query — the right point on that tradeoff depends on whether the application needs answers in seconds (favoring smaller, faster models) or can wait (favoring larger, more accurate ones).
Worked example. A firm needs to classify the sentiment of thousands of news headlines per minute for a trading signal. Using its most accurate large model would cost $0.02 per headline and take 800 milliseconds to respond — too slow and too expensive at that volume. Switching to a smaller, distilled version of the same model drops the cost to $0.001 per headline and the latency to 50 milliseconds, at a small accuracy cost the firm measures and decides is acceptable given how much faster the signal can now act on breaking news.
Related concepts
Practice in interviews
Further reading
- Pope et al., Efficiently Scaling Transformer Inference (2022)