mini-vllm
A minimal implementation of vLLM's core ideas: PagedAttention and continuous batching.
Installation
pip install mini-vllm
Requirements: Python 3.10+, CUDA-capable GPU
Quick Start
from mini_vllm import LLMEngine
# Initialize the engine
engine = LLMEngine(
model_name="meta-llama/Llama-3.2-1B",
block_size=16,
num_gpu_blocks=100
)
# Add a request
req_id = engine.add_request("The meaning of life is")
# Generate tokens
while True:
outputs = engine.step()
if not outputs:
break
# Check if generation is complete
if req_id in outputs:
print(outputs[req_id])
Benchmarks
Hardware: NVIDIA A100 (Modal)
Model: meta-llama/Llama-3.2-1B
Max tokens per request: 50
Prompt: "The meaning of life is"
mini-vllm Performance
| Batch Size | Duration | Total Tokens | Throughput |
|---|---|---|---|
| 1 | 4.59s | 50 | 10.90 tokens/sec |
| 4 | 1.01s | 250 | 248.48 tokens/sec |
| 16 | 1.20s | 1050 | 872.23 tokens/sec |
Comparison with vLLM
| Batch Size | mini-vllm | vLLM | Ratio (vLLM/mini) |
|---|---|---|---|
| 1 | 10.90 tokens/sec | 213.73 tokens/sec | 19.6x |
| 4 | 248.48 tokens/sec | 977.46 tokens/sec | 3.9x |
| 16 | 872.23 tokens/sec | 3510.41 tokens/sec | 4.0x |
References
Metadata
Release files for mini-vllm 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mini_vllm-0.1.1.tar.gz | 109.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mini_vllm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 121.1 kB
Release files / mini_vllm-0.1.1.tar.gz
| Download URL | mini_vllm-0.1.1.tar.gz |
|---|---|
| Size | 109.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ea441eebf39642db295b3c60052dacc555f46b72a8cdc71e2d345e0f129bbe5
|
|
BLAKE2b-256 checksum How to use checksums |
ff741a19976949f5ca7509c5af0b9ccb3576ffceb89bb6421ec3fd3ee29b33c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 28, 2025.
Transparency logRelease files / mini_vllm-0.1.1-py3-none-any.whl
| Download URL | mini_vllm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90c83ef9da5251e97164d0fe1e60963f39af02b8562753bc19dd81aff8c187df
|
|
BLAKE2b-256 checksum How to use checksums |
2a66377e95f3ac22046f4d76747808a5f0a374e19f30dd05c03f6c23b93ae801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 28, 2025.
Transparency log