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

GitHub
AI Infra2025

Measures generative AI inference performance with token-level metrics (TTFT, inter-token latency), latency, and throughput under realistic traffic patterns. Provides a multiprocess engine, real-time TUI dashboard, extensible plugins, and integrations for telemetry and result uploads, aimed at inference benchmarking and capacity planning.

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub

Indexes full text of visited web pages and local files on a self‑hosted server so you can search your personal knowledge from a web UI, terminal, CLI, or an AI assistant. Runs without mandatory telemetry, offers a browser extension for automatic capture, and supports optional semantic search via a configurable embeddings endpoint.