Guides
Task pages for when you already know why and need the steps. Each guide says when to use it, lists prerequisites, gives numbered steps with exact commands and a check for most steps, and ends with a troubleshooting table and references. Each one links back to the chapter that explains the reasons; where a chapter already gives the recipe, the guide uses the same values.
Setup
Porting
Profiling
Kernels
Training
Serving
vLLM-TorchTPU:
| Guide |
Use it when |
Why, in the Book |
| Serve a first model with vLLM-TorchTPU |
You need a first vllm serve endpoint and offline batch on a TPU VM, verified with a request |
Chapter 18 |
| Recipes for TPU v6e |
You serve on v6e and want a configuration sized for 32 GB chips |
Chapter 18 |
| Recipes for TPU v7x |
You serve on v7x and want the CI benchmark configuration for your model |
Chapter 18 |
| Run vLLM-TorchTPU on GKE |
A multi-host slice or disaggregated pools run as JobSets on GKE |
Chapter 18, Chapter 20 |
| Offline inference |
Batch outputs, a LoRA adapter or a vision-language model without a server |
Chapter 18 |
| Choose a parallelism layout |
A model needs several devices and you must pick TP, DP plus EP, PP or context parallelism |
Chapter 18 |
| Quantize weights and KV cache |
The model does not fit, KV runs out, or decode sits at the bandwidth floor |
Chapter 18 |
| Speculative decoding |
Decode latency matters more than peak throughput |
Chapter 18 |
| Serve across several TPU hosts |
A layout needs more devices than one host has |
Chapter 18 |
| Disaggregate prefill and decode |
Long prompts stall decodes, or prefill and decode want different layouts |
Chapter 18, Chapter 20 |
| Keep compiled programs across restarts |
Every start compiles for minutes, or you must prove nothing compiles after warmup |
Chapter 18 |
| Benchmark vLLM-TorchTPU |
You need TTFT, TPOT, throughput or accuracy numbers someone else can trust |
Chapter 18, Chapter 24 |
Profiling serving:
SGLang-TorchTPU:
llm-d
Start with the quickstart, then add the well-lit paths your traffic needs. Pages that cover paths with no TPU configuration in llm-d 1.0 say so in their opening paragraph and point to the TPU alternative.
Well-lit paths:
Operations:
| Guide |
Use it when |
Why, in the Book |
| Autoscale an llm-d pool |
Replicas should follow demand: in-flight, queue, tokens or SLO, with KEDA |
Chapter 21 |
| Batch and async serving |
Offline or background work should fill slack TPU capacity |
Chapter 21 |
| Roll out changes |
You change an image, flag, model, adapter or slice without dropping requests |
Chapter 21 |
| Cut pod startup |
New TPU pods take minutes to become Ready |
Chapter 21 |
| Manage traffic and tenants |
Priorities, fairness, several models or adapters share pools |
Chapter 21 |
| Observe a deployment |
Metrics, TPU exporter, PromQL, dashboards, alerts, traces and cost |
Chapter 21 |
| Validate a deployment |
Smoke test after every change; benchmark against the SLO |
Chapter 21 |
| Put an AI gateway in front |
One entry point for llm-d and external APIs (LiteLLM, Kong) |
Chapter 21 |
Correctness and evidence
Using a guide
Run the companion code's --cpu-smoke path on a laptop first where a guide offers one: it checks the method without a TPU, and every such command ends with a line you can compare (cpu-smoke: OK). Then run the TPU path. The references at the end of each guide name the public documentation behind its commands.