183 viewsAsked at 2 companies
How to measure throughput vs latency in LLM serving?
AI answer
Throughput and latency are key metrics when evaluating the performance of LLM serving (Large Language Model).
- Latency — the response time of the model to a single request, usually measured in milliseconds or seconds. It includes the time to process the request, generate a response, and transfer data.
- Throughput — the number of requests the model can handle per unit of time (e.g., requests per second).
To measure:
-
Latency
- Send a single request to the model and measure the time from sending to receiving the response.
- For a more accurate assessment, make several requests and take the average or a percentile (e.g., 95th).
-
Throughput
- Run load testing with parallel requests.
- Measure the total number of successfully processed requests over a fixed period.
It is important to note that increasing load can cause latency to grow due to queues and resource limitations.
To optimize serving, it is common to balance between latency and throughput, for example, by batching requests, caching, or scaling infrastructure.
Also asked at VK Cloud
- What types of tokenization do you know? Pros and cons of each.
- What is retrieval with a hybrid score (dense + sparse) and why combine them?
- What is RAG? Can you tell me?
- What are ONNX, TorchScript, TensorRT, OpenVINO in serving tasks?
- Сравните Qdrant, Milvus, Weaviate, Pinecone, pgvector по фичам и характеристикам.
Similar questions
- What are typical bottlenecks in LLM serving?
- What metrics do you know for evaluating an LLM system as a whole?
- What should be monitored in ML/LLM services: from infrastructure, resources, and quality points of view?
- Did you measure tokens and latency per pass to estimate the solution's cost?
- What problems arise in batched inference of LLM with varying query lengths?