pipeline() is for prototyping
A pipeline() call re-tokenizes per request, allocates per request, can't share KV cache across requests, and gives you no control over batching. For one user it's fine. For ten concurrent users it's a stack of pipeline objects fighting over a single GPU.
What an inference server adds
- Continuous batching — new requests join the in-flight batch every step instead of waiting for the previous one to finish.
- PagedAttention / KV cache management — the engine page-faults attention tensors so your GPU memory holds many short conversations instead of a few long ones.
- Streaming — SSE or token-by-token response from the very first server response.
- Quantization at serve time — AWQ / GPTQ / bnb / fp8 / int4 selectable at startup.
- Health, metrics, model management —
/health,/metrics,/infoendpoints baked in.
Starting fresh? Start with vLLM
HF's first-party server, text-generation-inference (TGI), has been in maintenance mode since December 2025: HF now accepts only minor fixes and recommends vLLM or SGLang going forward. A TGI service that already runs well has no reason to be torn out today, but vLLM is the default for new deployments, and this track treats TGI as the existing asset you need to read and operate.