Engine-neutral observability for LLM inference: record scheduler, batching, and KV-cache behavior and explore it as an interactive timeline.
Project description
InferLens
Engine-neutral observability for LLM inference engines. Record what vLLM (and soon SGLang) is actually doing internally — scheduling, batching, KV-cache behavior — and explore it as an interactive timeline that answers "why was this request slow?"
Status: pre-alpha. The trace schema and vLLM collector are under active development. Nothing here is stable yet — including the trace format.
Why
Today's tooling for inference engines is bimodal: Grafana dashboards of aggregate metrics (too high-level to explain a single slow request) and kernel-level profiler traces (too low-level to see scheduler semantics). InferLens targets the missing middle layer:
- per-step scheduler state: queue depths, batch composition, preemptions
- KV-cache behavior: usage, prefix-cache hits, evictions
- per-request lifecycle: queued → prefill → decode, with token timings
…captured with a pip-installed plugin (no engine fork), written to a portable trace file, and rendered in a local viewer.
How it will work
vLLM ──(stat-logger plugin + KV events)──► trace file (.ilens.gz) ──► inferlens view
SGLang ──(collector, planned)───────────► one shared schema interactive timeline
pip install inferlens
inferlens record -o run.ilens.gz -- vllm serve Qwen/Qwen2.5-1.5B-Instruct # in development
inferlens info run.ilens.gz
inferlens view run.ilens.gz # in development
Development
uv sync
uv run pre-commit install
uv run pytest
See CONTRIBUTING.md for coding standards (Google style, DCO sign-off, vLLM-style PR conventions) and docs/TRACE_SPEC.md for the trace format.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inferlens-0.1.0.dev0.tar.gz.
File metadata
- Download URL: inferlens-0.1.0.dev0.tar.gz
- Upload date:
- Size: 81.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
764f5957348b49ec23839b12ff27faf76497b7a5b6980de7fadb8208aa5c1d5b
|
|
| MD5 |
3a3677f8032ffc36b2e4d8cf6f7c5d50
|
|
| BLAKE2b-256 |
c31d900cd53cda78ff17dc3cf9df4e63c29e51bad58c7f156b57637c506fd77a
|
File details
Details for the file inferlens-0.1.0.dev0-py3-none-any.whl.
File metadata
- Download URL: inferlens-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d955bb5643193ee5d81778ac089a1be014c9d45e932b2d7bfe9a65636203a7
|
|
| MD5 |
53bc59a4095aaf456716fb50ff8dbcad
|
|
| BLAKE2b-256 |
65802ed46b4648641fbb78c16cd5414583c292e4bcde60c454f43237bea36b33
|