Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nano-vllm

> 数据库
Open source

Nano vLLM

14.8K stars0 likes2 views
WebsiteGitHub

About

Nano vLLM

Nano-vLLM

A lightweight vLLM implementation built from scratch.

Key Features

  • 🚀 Fast offline inference - Comparable inference speeds to vLLM
  • 📖 Readable codebase - Clean implementation in ~ 1,200 lines of Python code
  • ⚡ Optimization Suite - Prefix caching, Tensor Parallelism, Torch compilation, CUDA graph, etc.

Installation

bash
pip install git+https://github.com/GeeeekExplorer/nano-vllm.git

Model Download

To download the model weights manually, use the following command:

bash
huggingface-cli download --resume-download Qwen/Qwen3-0.6B \
  --local-dir ~/huggingface/Qwen3-0.6B/ \
  --local-dir-use-symlinks False

Quick Start

See example.py for usage. The API mirrors vLLM's interface with minor differences in the LLM.generate method:

python
from nanovllm import LLM, SamplingParams
llm = LLM("/YOUR/MODEL/PATH", enforce_eager=True, tensor_parallel_size=1)
sampling_params = SamplingParams(temperature=0.6, max_tokens=256)
prompts = ["Hello, Nano-vLLM."]
outputs = llm.generate(prompts, sampling_params)
outputs[0]["text"]

Benchmark

See bench.py for benchmark.

Test Configuration:

  • Hardware: RTX 4070 Laptop (8GB)
  • Model: Qwen3-0.6B
  • Total Requests: 256 sequences
  • Input Length: Randomly sampled between 100–1024 tokens
  • Output Length: Randomly sampled between 100–1024 tokens

Performance Results:

Inference Engine Output Tokens Time (s) Throughput (tokens/s)
vLLM 133,966 98.37 1361.84
Nano-vLLM 133,966 93.41 1434.13

Star History

Issues· 98 open

View all issuesOpen on GitHub
  • #279

    Prompt longer than the whole KV cache blocks the queue and crashes with assert scheduled_seqs

    Updated Sep 30, 2026
  • #274

    [Bug] scheduler: `assert scheduled_seqs` crashes engine when decode runs out of KV-cache blocks

    Updated Sep 14, 2026
  • #261

    [Bug] nano-vllm cannot start on Windows

    Updated Sep 1, 2026
  • #187

    Potential TP correctness issue: BlockManager capacity may rely on per-rank local KV-cache estimation

    Updated Aug 26, 2026
  • #246

    Tensor parallel shared-memory RPC lacks worker acknowledgement and can corrupt commands

    Updated Jun 25, 2026
  • #245

    Low inference speed in A100 PCIE GPU

    Updated Jun 20, 2026
  • #244

    Lightweight Go load-balancing proxy for nano-vllm

    Updated Jun 17, 2026
  • #240

    [Bug] may_append allocates new block one token too late, causing KV cache write to unallocated block

    Updated Jun 9, 2026
  • #230

    Documentation Enhancement Suggestion

    Updated May 12, 2026
  • #228

    [change] Int8 KV Cache + Async Pipeline + Head-major reordering for 22% Throughput Boost

    Updated May 8, 2026

> Tags

Pythondeep-learninginferencellmnlp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库