GeeeekExplorer/nano-vllm

Python

Nano vLLM

inferencellmpytorchtransformerdeep-learningnlp
스타 성장
스타
15.4k
포크
2.6k
주간 성장
+103
이슈
32
10k15k
2025년 6월2025년 11월2026년 4월2026년 9월
아티팩트PyPI
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

관련 저장소
vllm-project/vllm

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

PythonPyPIApache License 2.0gptllm
vllm.ai
91.4k22k
ultralytics/yolov5

Ultralytics YOLOv5 in PyTorch for object detection, instance segmentation, classification, training, and export.

PythonPyPIGNU Affero General Public License v3.0yolov5object-detection
docs.ultralytics.com/yolov5/
58k17.5k
ggml-org/whisper.cpp

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

C++MIT Licenseopenaispeech-to-text
53.6k6.1k
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
43.1k5k
hpcaitech/ColossalAI

Making large AI models cheaper, faster and more accessible

PythonPyPIlibraryApache License 2.0deep-learninghpc
colossalai.org
41.4k4.5k
google-ai-edge/mediapipe

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

C++libraryApache License 2.0mediapipec-plus-plus
ai.google.dev/edge/mediapipe
36.9k6.2k
sgl-project/sglang

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

PythonPyPIApache License 2.0cudainference
sglang.io
35.7k8.7k
SYSTRAN/faster-whisper

Faster Whisper transcription with CTranslate2

PythonPyPIMIT Licensedeep-learninginference
25.3k2.1k
Tencent/ncnn

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

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

Machine Learning Engineering Open Book

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

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

TypeScriptnpmlibraryMIT Licensepattern-matchingtypescript
15.1k171
NVIDIA/TensorRT

NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.

C++libraryApache License 2.0tensorrtnvidia
developer.nvidia.com/tensorrt
13.3k2.4k