Prompt caching is a discount, in both money and latency, on the part of your prompt that is identical from one call to the next. The provider keeps the already-processed prefix, and when your next request starts with exactly the same tokens it skips that work and bills the repeated portion at a reduced rate. For an app with a …
Read More »Model Optimization
Quantization for LLM Inference: What to Cut Without Breaking Quality
Quantization for LLM inference trades numeric precision for memory and memory bandwidth, and memory bandwidth is usually what you are paying for. Store weights in 8 or 4 bits instead of 16 and the same model fits on a smaller or fewer GPUs, loads faster, and often decodes faster too. The catch is that the rounding error lands somewhere, and …
Read More »KV Cache Explained for Builders Shipping LLM Apps
The KV cache is the short-term memory a transformer builds for every token it has already read, and it is the reason a 128k context window is a memory bill and not just a pricing tier. Once you can compute how many bytes one token costs, a surprising number of product questions answer themselves: why long chats slow down, why …
Read More »LLM Batching and Latency: Tradeoffs That Show Up in SLOs
Batching is the reason one GPU can serve fifty people at once, and also the reason your p99 sometimes looks like it belongs to a different product. The short version of LLM batching latency: every request you add to a batch makes the whole system more efficient and each individual request a little slower, and the curve is not linear. …
Read More »vLLM Serving Guide for Production LLM APIs
vLLM serving means running an open-weight model behind an HTTP server where the engine, not your application code, decides how concurrent requests share one GPU. You send OpenAI-style calls; vLLM schedules tokens, manages memory in pages, and streams the result back. If you have ever watched a hand-rolled Hugging Face generate() loop collapse at eight concurrent users, that scheduler is …
Read More »
AI Generated Apps AI Code Learning Technology