AIAny
AI Infra2025
Icon for item

Nano-vLLM

Reimplements the vLLM inference engine from scratch in ~1,200 lines of readable Python, matching its offline throughput on small models. Prefix caching, tensor parallelism, torch.compile, and CUDA graphs are all kept legible.

Introduction

Production LLM serving engines have grown into tens of thousands of lines, which makes them excellent to deploy and nearly impossible to read. Nano-vLLM is the counter-bet: a DeepSeek engineer's from-scratch rewrite that keeps the throughput-critical tricks of vLLM but fits the whole engine in roughly 1,200 lines you can actually finish reading.

What Sets It Apart
  • The same optimizations that make vLLM fast — prefix caching, tensor parallelism, torch.compile, and CUDA graphs — are all present, just unobfuscated, so the code doubles as an annotated map of how modern inference engines work.
  • Throughput is competitive, not a toy: on an RTX 4070 Laptop running Qwen3-0.6B over 256 sequences it clocks ~1,434 tokens/s versus vLLM's ~1,361, so the brevity costs nothing on this workload.
  • It is deliberately offline-only, which is why it stays small — there is no online-serving scheduler, no API server, and no continuous-batching front end to wade through.
Who It's For

Great fit if you want to see how paged attention, prefix caching, and CUDA-graph capture actually fit together, or if you need a hackable base to prototype an inference idea without forking a 50k-line repo. Look elsewhere if you need production serving — multi-tenant scheduling, streaming HTTP APIs, broad model coverage, and battle-tested edge-case handling all live in full vLLM, and that is the right tool when you are shipping rather than learning.

Information

  • Websitegithub.com
  • OrganizationsDeepSeek
  • AuthorsGeeeekExplorer
  • Published date2025/06/09

Categories

More Items

Enables RL post-training with million-token prompts under a fixed GPU budget by evaluating shared prompt state without autograd, retaining only minimal model state, and replaying short response branches; instantiated as GRPO and demonstrated on Qwen3.6-27B and GLM-5.2 up to multi-million token execution.

GitHub
AI Infra2026

Defines OpenTelemetry semantic conventions for generative AI telemetry — spans, metrics, and events for GenAI clients, the Model Context Protocol (MCP), and provider-specific integrations. Includes YAML models, human-readable docs, and reference implementations to standardize observability across GenAI deployments.

GitHub
AI Infra2024

Provides a lightweight build platform for HIP and ROCm that supports building ROCm, PyTorch, and JAX from source, multi-architecture nightly releases, and integrated CI/CD and developer tooling for Linux and Windows.