Inference Latency
Time from request submission to the start of the model's response. For chat, this is "how quickly the model responds".
Two Components
- Time to First Token (TTFT) — delay until the first token response;
- Tokens per Second — rate of subsequent token generation.
Both are important for dialogue: the user waits for both the initial reaction and the full response.
What It Depends On
- model size and number of parameters;
- context size — longer contexts take longer to process;
- use of KV-cache and optimizations like Flash Attention;
- GPU load.
How to Reduce
- model quantization;
- speculative decoding;
- batching requests on the server;
- distillation into a smaller model.