GeeeekExplorer/nano-vllm
Nano vLLM
Featured achievements
The project's latest awards
#2 Repository of the month
#4 Repository of the month
#4 Repository of the month
🚀 A Lightweight vLLM Clone Built for Speed and Simplicity
Nano-vLLM reimplements vLLM's core inference pipeline from scratch, aiming for comparable performance in a fraction of the code.
Nano-vLLM is a compact, from-scratch reimplementation of vLLM, designed to deliver fast offline LLM inference with a clean, readable codebase. Built in about 1,200 lines of Python, it targets developers and researchers who want to understand or extend the inference stack without the overhead of a large framework.
✨ Highlights
- Fast offline inference: Achieves throughput comparable to vLLM on the same hardware.
- Readable codebase: Clean implementation condensed into roughly 1,200 lines of Python.
- Prefix caching: Reduces redundant computation for repeated context prefixes.
- Tensor Parallelism: Distributes model layers across multiple GPUs.
- Torch compilation: Leverages torch.compile for optimized execution.
- CUDA graph: Captures and replays GPU kernels to minimize launch overhead.
- vLLM-compatible API: Mirrors vLLM's interface with minor differences in
LLM.generate.
💡 Why it matters
Instead of wrapping or forking vLLM, Nano-vLLM rebuilds the engine from scratch, making the internals approachable for learning and experimentation. Its small footprint and vLLM-compatible API make it a practical choice for projects that need speed without the complexity of the full stack.
#LLM #Inference #PyTorch #DeepLearning #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
A high-throughput and memory-efficient inference and serving engine for LLMs
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
🧑🏫 60+ Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠
🧑🏫 60+ Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠
DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.