Tokens Per Second (TPS) is a key throughput metric that measures the number of output tokens a language model serving system can generate per second. It is a direct indicator of inference speed and system efficiency, calculated by dividing the total tokens generated by the total wall-clock time for a request or batch. Higher TPS translates to lower latency for end-users and reduced inference cost for a fixed workload, as the same computational resources produce more output in less time. It is the primary benchmark for comparing the raw performance of different hardware, model optimizations, and serving engines.
Glossary
Tokens Per Second (TPS)

What is Tokens Per Second (TPS)?
Tokens Per Second (TPS) is the fundamental metric for measuring the raw generation speed of a Large Language Model (LLM) during inference.
TPS is heavily influenced by underlying inference optimization techniques. Factors like batch size, KV Cache efficiency, model quantization (e.g., GPTQ, AWQ), and advanced serving methods like continuous batching in engines such as vLLM directly determine achievable throughput. For engineering leaders, monitoring and optimizing TPS is essential for cost and resource management, as it dictates the required compute footprint to meet service-level agreements (SLAs). It is often analyzed alongside tail latency (P95/P99) to ensure consistent performance under load.
Key Factors Influencing TPS
Tokens Per Second (TPS) is not a fixed specification but a dynamic performance metric shaped by a complex interplay of hardware, software, and workload characteristics. Understanding these factors is essential for capacity planning and cost optimization.
Hardware: GPU Architecture & Memory Bandwidth
The physical accelerator is the primary determinant of peak TPS. Key specifications include:
- Compute Cores (CUDA/Stream Processors): Dictate raw parallel processing power for matrix multiplications.
- Memory Bandwidth (GB/s): The speed at which model weights and the KV cache can be read into on-chip memory; often the bottleneck for large models.
- VRAM Capacity: Limits the maximum model size and batch size that can be loaded. High TPS requires keeping the computational units saturated, which is constrained by how quickly data can be fed to them.
Example: An NVIDIA H100 with 1,979 GB/s memory bandwidth and dedicated Transformer Engine cores will achieve significantly higher TPS than an A100 (1,555 GB/s) for the same model.
Model Architecture & Size
The neural network's design imposes fundamental computational constraints.
- Parameter Count: Larger models (e.g., 70B vs. 7B) have more weights to load and compute, reducing TPS for a given hardware setup.
- Attention Mechanism: Standard quadratic-complexity attention is more demanding than efficient variants like FlashAttention or grouped-query attention (GQA).
- Context Window Length: Longer sequences increase the size of the KV Cache, consuming more memory bandwidth and computation during decoding.
The relationship is inverse: TPS ∝ 1 / (Model Size × Sequence Length).
Inference Serving Optimizations
Software-level techniques that maximize hardware utilization.
- Continuous Batching: Groups multiple user requests (of varying lengths) into a single batch, dynamically updating it as requests finish, maximizing GPU utilization.
- PagedAttention (vLLM): Manages the KV Cache in non-contiguous memory blocks, drastically reducing fragmentation and waste, allowing for larger effective batch sizes.
- Model Quantization: Using INT8 or GPTQ/AWQ (4-bit) reduces the memory footprint and bandwidth requirements of weights, directly increasing potential TPS.
- Speculative Decoding: Uses a small draft model to propose token sequences, verified in parallel by the main model, reducing the number of costly large model runs.
Workload Characteristics: Request Pattern
How users interact with the system defines the achievable TPS.
- Batch Size: The number of requests processed simultaneously. Larger batches improve GPU utilization but increase time to first token (TTFT).
- Output Token Length: Generating longer responses increases the total computational work per request, reducing the overall request throughput.
- Traffic Concurrency & Distribution: Steady, high-concurrency traffic allows for optimal batching. Sparse, bursty traffic leads to poor GPU saturation and lower effective TPS.
- Prompt Complexity: Longer, more complex input prompts increase the computational cost of the initial prefill phase before token generation begins.
System Overhead & Network Latency
Infrastructure inefficiencies that cap realized TPS.
- Cold Starts: The latency and throughput penalty when a new server instance must load a model into GPU memory before serving requests.
- Host-to-Device Data Transfer: Time spent moving prompts from CPU/RAM to GPU VRAM.
- Inter-Node Communication: In tensor or pipeline parallel deployments, network latency between GPUs can become a bottleneck.
- Scheduling & Queueing Delays: Overhead from the serving framework (e.g., TorchServe, Triton) and load balancers in routing and preparing requests.
The TPS-Cost-Latency Trade-off
Maximizing TPS is not an isolated goal; it exists within a critical trilemma with cost and latency.
- High TPS via Large Batches: Increases throughput and lowers cost per token but raises Tail Latency (P99) for individual users.
- Low Latency Prioritization: Requires smaller batches or even no batching, maximizing responsiveness for a single user but drastically reducing overall TPS and increasing cost.
- Optimization Target: Engineering teams must configure their serving systems (batch size, autoscaling rules) based on the Service Level Objective (SLO)—whether it's minimizing cost, maximizing throughput, or guaranteeing low-latency user experiences.
TPS vs. Latency: A Critical Distinction
A comparison of the throughput metric Tokens Per Second (TPS) and the responsiveness metric latency, highlighting their distinct roles in performance evaluation and cost management for LLM serving.
| Metric / Characteristic | Tokens Per Second (TPS) | Latency (Time to First Token / Per-Token) |
|---|---|---|
Primary Definition | The rate of output token generation, measured in tokens/second. | The time delay between sending a request and receiving a response, measured in milliseconds or seconds. |
What It Measures | System throughput and batch processing efficiency. | End-user perceived responsiveness and interactivity. |
Primary Influence on | Total cost of inference for a given workload. | User experience and application feel (e.g., chat responsiveness). |
Key Optimization Target | Maximizing GPU utilization (e.g., via continuous batching). | Minimizing idle compute time and serial bottlenecks. |
Relationship to Batch Size | Generally increases with larger batch sizes. | Generally increases with larger batch sizes due to queuing. |
Typical Trade-off | Higher TPS often comes at the cost of increased latency. | Lower latency often requires smaller batches, reducing TPS. |
Critical for Workload Type | Batch processing, offline tasks, high-volume background jobs. | Interactive applications, real-time chat, user-facing APIs. |
Direct Cost Correlation | High. Higher TPS processes more tokens per dollar of compute. | Indirect. Lower latency may require premium hardware or underutilized resources, increasing cost per token. |
Monitoring Percentile | Average or peak throughput is typically sufficient. | Tail latency (P95, P99) is critical for quality of service guarantees. |
Primary Techniques for Optimizing TPS
Optimizing Tokens Per Second (TPS) requires a multi-faceted approach targeting computational efficiency, memory management, and system architecture. These techniques directly reduce inference cost and latency while improving user experience.
Model Quantization & Compression
Reducing the numerical precision of model weights and activations decreases memory bandwidth requirements and accelerates computation.
- INT8/FP8 Quantization: Using 8-bit integers or floats instead of 16-bit (FP16) or 32-bit (FP32) can double theoretical TPS by enabling faster matrix operations on supported hardware.
- GPTQ & AWQ: Advanced 4-bit post-training quantization methods that minimize accuracy loss. A 4-bit quantized model requires 1/4 of the original GPU memory, allowing larger batch sizes or the use of smaller, cheaper GPUs for the same model, directly boosting TPS per dollar. Quantization is often the first step in any TPS optimization pipeline.
Hardware-Aware Serving & Parallelism
Matching the model architecture to the underlying hardware is essential for peak TPS.
- Tensor Parallelism: Splits individual model layers across multiple GPUs. Essential for serving models larger than a single GPU's memory (e.g., 70B+ parameter models). While it introduces communication overhead, it's the only way to serve such models at all.
- Optimized Kernels: Using framework-specific optimized kernels (e.g., FlashAttention for faster attention computation, fused operators) reduces core computational latency.
- Right-Sizing Instances: Selecting the optimal cloud GPU instance (e.g., A100 80GB vs. H100) based on model size, batch size, and latency targets to maximize TPS per dollar.
System-Level Traffic Management
TPS is a system-level metric, not just a model-level one. Infrastructure decisions have a major impact.
- Autoscaling: Dynamically adding or removing model inference pods based on request queue length to handle traffic spikes without over-provisioning.
- Load Shedding & Rate Limiting: Proactively rejecting low-priority requests during overload to protect the system's ability to serve high-priority requests at target TPS and latency (P99).
- Optimized Cold Starts: Using techniques like pre-warming instances or snapshotting loaded models to minimize the latency penalty when scaling out, ensuring consistent TPS for all users.
Frequently Asked Questions
Tokens Per Second (TPS) is a critical performance and cost metric for Large Language Model inference. These questions address its technical definition, influencing factors, and its role in production system design and financial planning.
Tokens Per Second (TPS) is a throughput metric that quantifies the number of output tokens a language model inference system can generate per second. It is measured by dividing the total number of tokens produced in a completed inference job by the total wall-clock time elapsed from the start of the first token's generation to the end of the last token's generation. This measurement is distinct from hardware-level metrics like FLOPS, as it encompasses the entire software serving stack, including prefill (processing the input prompt) and decode (autoregressively generating output tokens) phases, as well as system overhead. In production, TPS is often reported as an average across many requests under a specific load, with P95 and P99 TPS (tail latency equivalents) being crucial for understanding worst-case performance.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Tokens Per Second (TPS) is a core throughput metric, but understanding its relationship to other cost and performance concepts is critical for infrastructure planning.
Cost Per Token
Cost per token is the fundamental unit economics metric for LLM inference, calculated by dividing the total expense of a generation task by the number of tokens processed. It is directly influenced by TPS: a higher TPS for a given hardware setup lowers the cost per token by amortizing fixed compute costs over more output. This metric is essential for forecasting budgets and comparing the efficiency of different model serving configurations.
- Primary Drivers: Model size, quantization level, cloud instance cost, and achieved TPS.
- Calculation: (Instance Cost per Hour / Tokens Generated per Hour).
- Use Case: A CTO uses cost per token to decide between a faster, more expensive instance (high TPS, potentially lower cost/token at high load) and a slower, cheaper one.
Tail Latency (P95/P99)
Tail latency, measured at the 95th or 99th percentile (P95/P99), represents the worst-case response times experienced by a small fraction of user requests. It has an inverse relationship with TPS in a loaded system. Aggressive optimization for maximum average TPS (e.g., through very large batch sizes) can increase queueing delays and variability, degrading tail latency. Engineering for consistent user experience requires balancing high TPS with predictable, low tail latency.
- Trade-off: Maximizing TPS can sometimes increase latency variance.
- Monitoring: Critical for SLA compliance in user-facing applications.
- Impact: A chatbot with high TPS but poor P99 latency will feel sluggish to some users, harming perceived performance.
Continuous Batching
Continuous batching (or in-flight batching) is an advanced inference optimization technique that dramatically improves TPS. Instead of waiting for a full batch of requests to finish, it dynamically inserts new requests into a running batch as soon as GPU resources free up from completed sequences. This eliminates the idle time present in static batching, leading to significantly higher GPU utilization and token throughput, especially for workloads with variable-length prompts and generations.
KV Cache
The KV (Key-Value) Cache is a memory optimization for transformer decoder blocks that is fundamental to achieving high TPS during autoregressive generation. It stores computed key and value tensors for previously processed tokens, preventing their recalculation on each new generation step. Efficient management of the KV cache is critical: its memory footprint grows with batch size and sequence length, directly limiting concurrent requests and thus potential TPS. Techniques like PagedAttention (used in vLLM) optimize this memory usage.
vLLM & PagedAttention
vLLM is a high-throughput LLM serving engine that employs the PagedAttention algorithm to optimize memory management for the KV Cache. PagedAttention treats the KV cache as non-contiguous, paged blocks in memory—similar to virtual memory in an operating system. This drastically reduces memory fragmentation and waste, allowing for much larger effective batch sizes and higher concurrency. The result is a significant increase in achieved TPS compared to naive serving systems, especially for long sequences.
Model Quantization
Model quantization is a compression technique that reduces the numerical precision of a model's weights and activations (e.g., from 16-bit to 8-bit or 4-bit integers). This directly boosts TPS by:
- Reducing memory bandwidth pressure, allowing faster weight loading.
- Enabling the use of specialized integer compute units on modern GPUs.
- Allowing larger batch sizes to fit in the same GPU memory.
Methods like GPTQ (post-training) and AWQ (activation-aware) are used to apply quantization with minimal accuracy loss, making high TPS serving on cost-effective hardware feasible.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us