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", "gemma-2-2b"], models_dir="/data/models",
    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.1

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.1
File Size Uploaded
velocityllm-0.4.1.tar.gz 6.5 MB Details

Built distribution (wheel)

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

Total release size: 13.1 MB

Release files / velocityllm-0.4.1.tar.gz

Download URL velocityllm-0.4.1.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
90f790d28b1fcf3ea7570089f4f1da2099ae5be828b24a78cd25b41b2aa9b82c
BLAKE2b-256 checksum
How to use checksums
df679993ebd7923f82db5dce0e791f4211e2c4388f7a9a65bbf3af485583a055
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.1-py3-none-any.whl

Download URL velocityllm-0.4.1-py3-none-any.whl
Size 6.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
df4ff1a825b2305b7ac6140258f415bbec399c04ea07c6d8a242524e2f64a32a
BLAKE2b-256 checksum
How to use checksums
393668ad3b9fcc00977ec21a0742f3b0efc4b60d459f1aecddedf11a9973b2d9
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

This release

0.4.1 This release

2 release files

0.4.0

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