Skip to main content

VelocityLLM

SLA-aware dynamic scheduling for LLM serving on vLLM. VelocityLLM sits in front of your model, decides how many requests the GPU should run at once, and keeps latency inside the promise you set. It ships with a terminal benchmark so you can see the difference on your own hardware.

Install

pip install velocityllm            # scheduler, benchmark, simulated engine
pip install "velocityllm[gpu]"     # adds vLLM for real models on an NVIDIA GPU

Python 3.11 or newer.

Compare static and dynamic scheduling on your models

Put each model in its own folder under ./models, then:

velocityllm bench --models-dir ./models --requests 100 --repeats 3 --sla-ms 8000

Every model is served twice, once with a fixed batch size (static) and once with VelocityLLM (dynamic), under the same traffic. The table shows p50, p95 and p99 latency, tokens per second and the share of requests answered inside the SLA, with the change against static on a line of its own. Results are saved as CSV and JSON in ./velocity_bench/latest.

Pick models and policies explicitly:

velocityllm bench --models-dir ./models --only qwen2.5-1.5b,llama-3.2-1b,gemma-2-2b --policies static,dynamic,smart
velocityllm bench --model qwen=/data/qwen2.5-1.5b --model llama=/data/llama-3.2-1b
velocityllm bench --mock --models-dir ./models      # no GPU, simulated engine

Use it from Python

import velocityllm

rows = velocityllm.benchmark(
    {"qwen2.5-1.5b": "/data/qwen2.5-1.5b", "gemma-2-2b": "/data/gemma-2-2b"},
    requests=100, repeats=3, sla_ms=8000,
)
for r in rows:
    print(r["model"], r["policy"], r["p50"], r["p95"], r["p99"], r["tokens_per_sec"])

Serve a model

velocityllm serve --policy dynamic --model-path /data/qwen2.5-1.5b --sla-ms 8000
velocityllm serve --mock                                  # try it without a GPU
velocityllm loadgen --url http://localhost:8000/generate --num-requests 100 --concurrency 100 --pattern flood

Policies: static (fixed concurrency baseline), dynamic (SLA-aware admission with an adaptive concurrency limit) and smart (token-aware, KV-cache-aware, explains every decision).

Arena dashboard

velocityllm arena --models-dir ./models

Opens the web dashboard where you pick a model, a user count and an SLA and watch the policies run side by side.

Metadata

Release files for velocityllm 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for velocityllm 0.4.0
File Size Uploaded
velocityllm-0.4.0.tar.gz 6.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for velocityllm 0.4.0
File Interpreter ABI Platform
velocityllm-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 MB

Release files / velocityllm-0.4.0.tar.gz

Download URL velocityllm-0.4.0.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a89a136551408b1e8eeb78ceb3147312e4317020258469465bce2621fea7497f
BLAKE2b-256 checksum
How to use checksums
15f6b91fa6f59e87c6171ca043b365e64ca6b74698a9dd90ec4edd58ea56a8bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / velocityllm-0.4.0-py3-none-any.whl

Download URL velocityllm-0.4.0-py3-none-any.whl
Size 6.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4d3a3faf5104138568fa4988727e87bf47af904cf4b6ec9f12db61376ad68579
BLAKE2b-256 checksum
How to use checksums
38498a8748d0e63eebe93ed9f9748b2f4c733219e99d217339e2ef3ed7d160a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page