LLM inference explained: from prompt to generated tokens
Understand LLM inference, prefill and decode, TTFT and TPOT, GPU memory, batching, and the measurements that matter for a serving system.
Read the introduction
Understand LLM inference, prefill and decode, TTFT and TPOT, GPU memory, batching, and the measurements that matter for a serving system.
Read the introduction
Learn how FP8 and INT8 KV cache quantization cuts GPU memory and decode traffic in vLLM and SGLang, how keys and values scale, and when to calibrate.
Understand how NVIDIA Triton Inference Server organizes model repositories, dynamic batching, ensembles, and vLLM or TensorRT-LLM backends in production.
Learn how FSM and CFG constrained decoding guarantee valid JSON schemas and tool calls in vLLM and SGLang using logit masks and jump-forward decoding.
Serve dozens of fine-tuned LoRA adapters from one base LLM GPU pool: calculate adapter memory, batch mixed-tenant requests, and isolate prefix caches.
Learn how torch.compile speeds up PyTorch LLM inference through operator fusion, why dynamic prompt lengths trigger guard recompilations, and how vLLM uses it.
Learn how GPU registers, shared memory, and HBM shape LLM decode latency, and how CUDA graphs remove CPU kernel-launch overhead in vLLM and SGLang.
Understand why prefill/decode disaggregation separates TTFT from TPOT, how NIXL/RDMA moves KV cache, and how KV-aware routing cuts redundant prefill.
Learn how DeepSeek Multi-Head Latent Attention compresses the KV cache into low-rank latent vectors, decouples RoPE, and absorbs projections during decode.
Reduce LLM inference latency with a practical decision guide. Diagnose bottlenecks, compare caching, batching, and quantization, and measure cost and quality.
Learn how mixture-of-experts inference works, why active parameters do not determine GPU memory, and how to benchmark MoE routing and parallelism.
Understand prefill vs decode, how they affect TTFT and TPOT, and when chunked prefill, prefix caching, or disaggregated serving can improve LLM latency.
Compare tensor, pipeline, and data parallelism for LLM inference. See GPU placement examples, memory caveats, communication costs, and a validation checklist.
Learn how LLM prefix caching reuses prompt KV state, when it reduces time to first token, how to design cacheable prompts, and how to measure the benefit.
Compare FlashAttention and PagedAttention: attention computation vs KV cache allocation, prefill vs decode, memory examples, and how LLM servers use both.
Estimate the GPU memory an LLM needs for weights and KV cache, how many requests fit on an L40S, H100, or H200, and when to quantize or add GPUs.
How AI cloud infrastructure for LLM inference fits together: GPUs, serving engines, Kubernetes, parallelism, routing, autoscaling, and cost per token.
AI inference is running a trained model on new data. Learn how it differs from training, how LLM inference works, what drives its cost, and where it runs.
Learn inference engineering step by step: prerequisites, LLM serving fundamentals, vLLM and SGLang, optimization, GPU infrastructure, and projects to build.
Learn how speculative decoding speeds up LLM inference, calculate the expected speedup from acceptance rate, and compare draft models, n-grams, and EAGLE.
Understand LLM quantization for inference: calculate weight memory, compare FP8, INT8, and INT4 formats, and choose between AWQ, GPTQ, and SmoothQuant.
Learn how continuous batching keeps GPUs busy, why it beats static batching for LLM serving, and how chunked prefill, paging, and batch limits affect latency.
Learn what TTFT, TPOT, inter-token latency, throughput, and goodput mean, how to calculate them correctly, and how to benchmark an LLM server with percentiles.
Learn what a KV cache stores, calculate memory for grouped-query attention, and understand batching, prefix reuse, paging, and quantization limits.
Run a pinned vLLM server with Qwen3, send an authenticated chat request, understand memory settings, and troubleshoot your first deployment.
Compare vLLM and SGLang using attributed benchmark results, latency tradeoffs, and a repeatable method for choosing an inference server.