Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

Apache-2.0

Metadata

Release files for inferlens 0.1.0.dev0

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

Source distribution (sdist)

Source distribution for inferlens 0.1.0.dev0
File Size Uploaded Provenance Actions
inferlens-0.1.0.dev0.tar.gz 81.7 kB Without provenance Details for inferlens-0.1.0.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inferlens 0.1.0.dev0
File Interpreter ABI Platform Actions
inferlens-0.1.0.dev0-py3-none-any.whl Python 3 none any Details for inferlens-0.1.0.dev0-py3-none-any.whl

Total release size: 94.5 kB

Release files / inferlens-0.1.0.dev0.tar.gz

Download URL inferlens-0.1.0.dev0.tar.gz
Size 81.7 kB
Tags Source
SHA-256 checksum
How to use checksums
764f5957348b49ec23839b12ff27faf76497b7a5b6980de7fadb8208aa5c1d5b
BLAKE2b-256 checksum
How to use checksums
c31d900cd53cda78ff17dc3cf9df4e63c29e51bad58c7f156b57637c506fd77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / inferlens-0.1.0.dev0-py3-none-any.whl

Download URL inferlens-0.1.0.dev0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75d955bb5643193ee5d81778ac089a1be014c9d45e932b2d7bfe9a65636203a7
BLAKE2b-256 checksum
How to use checksums
65802ed46b4648641fbb78c16cd5414583c292e4bcde60c454f43237bea36b33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Security for inferlens 0.1.0.dev0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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