inflame
Where does your LLM inference latency live?
Feed it vLLM / TGI / Triton request traces; get a self-contained HTML report that shows, per request and fleet-wide, how wall time splits across tokenization → queue → prefill → decode → data io → network. Zero dependencies, stdlib only.
pip install inflame-trace
inflame report traces.jsonl -o report.html # flamegraph-style HTML
inflame summary traces.jsonl # terminal table
inflame formats # how to produce each input
The report has three layers:
- Where latency lives — one icicle bar: share of total wall time per phase.
- Slowest requests — a waterfall of stacked per-request bars, phases in request order; hover any segment for exact timings, hover the legend to isolate a phase.
- Phase percentiles — p50/p95/p99 per phase, as a table.
The terminal summary gives you the same phase split as a bar chart you can
paste into an incident channel.
Getting traces out of your stack
| Stack | How | Phases you get |
|---|---|---|
| vLLM | vllm serve MODEL --otlp-traces-endpoint http://collector:4318/v1/traces, collector writes a JSON/file export |
queue, prefill, decode |
| TGI | text-generation-launcher --json-output ... 2>&1 | tee tgi.log |
tokenization, queue, inference |
| Triton | tritonserver --trace-config mode=triton --trace-config triton,file=trace.json --trace-config rate=1 --trace-config level=TIMESTAMPS |
network, queue, data io, inference |
vLLM inputs are accepted as raw OTLP exports, JSON arrays, or JSONL of spans —
whatever your collector writes. Format is auto-detected; force it with
--format vllm|tgi|triton.
Reading the report
- queue dominating → batch scheduler is saturated: add replicas, cap concurrency upstream, or shrink max batch tokens.
- prefill dominating → long prompts: cache system prompts (prefix caching), trim context, or split prefill across GPUs.
- decode dominating → normal for long generations; compare decode tok/s against your quantization/kernel expectations — a drop here is where quantization overhead or a mis-tuned kernel shows up.
- data io / network visible at all → payloads are too fat (send token ids, not logits; compress embeddings).
Honest limitations
- TGI does not expose a prefill/decode split; its model compute is one
inferencephase (completion tokens are estimated fromtime_per_token). - vLLM's periodic
Avg prompt throughputstats log has no per-request data and is rejected with a pointer to the OTLP setup. - Triton phases describe the server's view (queue/compute/marshalling); for in-model phase splits use an ensemble that traces per step.
Demo
python3 scripts/make_demo.py # deterministic 240-request sample -> demo/index.html
Dev
python3 -m pytest -q # 60+ tests, no network, no deps
MIT.
Metadata
Release files for inflame-trace 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inflame_trace-0.1.0.tar.gz | 22.0 kB | With provenance | Details for inflame_trace-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inflame_trace-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for inflame_trace-0.1.0-py3-none-any.whl |
Total release size: 42.1 kB
Release files / inflame_trace-0.1.0.tar.gz
| Download URL | inflame_trace-0.1.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d586bd5b238d1b4e924aec7634c9ace65c48e535ce7081af81d6ac7666667cf0
|
|
BLAKE2b-256 checksum How to use checksums |
6c92370adc2d014f4dff95f389851b940e57f0bae9b74c2bdffb692012dbefd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 10, 2026.
Transparency logRelease files / inflame_trace-0.1.0-py3-none-any.whl
| Download URL | inflame_trace-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49142043f163566eb58f810f2011888a4e1f05958087b3973219e02d03415c5e
|
|
BLAKE2b-256 checksum How to use checksums |
3a6b2b45ce604628ce0ec9d46560cf948ad937eff9c2908e05eb069342937692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 10, 2026.
Transparency logSecurity for inflame-trace 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for inflame_trace-0.1.0.tar.gz
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 Aug 10, 2026.
Transparency logA 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.