Back to rankings

GeeeekExplorer/nano-vllm

Python

Nano vLLM

inferencellmpytorchtransformerdeep-learningnlp
Star Growth
Stars
14.6k
Forks
2.3k
Weekly Growth
Issues
30
10k
Jun 2025Oct 2025Mar 2026Jul 2026
ArtifactsPyPIpip install nano-vllm
README

GeeeekExplorer%2Fnano-vllm | Trendshift

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

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

Model Download

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

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:

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

Star History Chart

Related repositories
vllm-project/vllm

A high-throughput and memory-efficient inference and serving engine for LLMs

PythonPyPIApache License 2.0gptllm
vllm.ai
86.8k19.6k
ggml-org/whisper.cpp

Port of OpenAI's Whisper model in C/C++

C++MIT Licenseopenaispeech-to-text
51.9k5.8k
deepspeedai/DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

PythonPyPIApache License 2.0deep-learningpytorch
deepspeed.ai
42.7k4.9k
hpcaitech/ColossalAI

Making large AI models cheaper, faster and more accessible

PythonPyPIApache License 2.0deep-learninghpc
colossalai.org
41.4k4.5k
ggerganov/whisper.cpp

Port of OpenAI's Whisper model in C/C++

C++MIT Licenseopenaispeech-to-text
38.3k4k
google-ai-edge/mediapipe

Cross-platform, customizable ML solutions for live and streaming media.

C++Apache License 2.0mediapipec-plus-plus
ai.google.dev/edge/mediapipe
36.2k6.1k
microsoft/DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

PythonPyPIdeep-learningpytorch
deepspeed.ai
36.2k4.2k
sgl-project/sglang

SGLang is a high-performance serving framework for large language models and multimodal models.

PythonPyPIApache License 2.0cudainference
sglang.io
30.6k7.3k
SYSTRAN/faster-whisper

Faster Whisper transcription with CTranslate2

PythonPyPIMIT Licensedeep-learninginference
24.4k2k
Tencent/ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform

C++Otherinferencehigh-preformance
23.6k4.5k
stas00/ml-engineering

Machine Learning Engineering Open Book

PythonPyPICreative Commons Attribution Share Alike 4.0 Internationalpytorchslurm
stasosphere.com/machine-learning/
18.4k1.2k
gvergnaud/ts-pattern

🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.

TypeScriptnpmMIT Licensepattern-matchingtypescript
15.1k170