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.
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 inflame_trace-0.1.0.tar.gz.
File metadata
- Download URL: inflame_trace-0.1.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d586bd5b238d1b4e924aec7634c9ace65c48e535ce7081af81d6ac7666667cf0
|
|
| MD5 |
707424aa2eeac95d1e8e3db3b6800fb6
|
|
| BLAKE2b-256 |
6c92370adc2d014f4dff95f389851b940e57f0bae9b74c2bdffb692012dbefd9
|
Provenance
The following attestation bundles were made for inflame_trace-0.1.0.tar.gz:
Publisher:
publish.yml on sophie-nguyenthuthuy/inflame
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inflame_trace-0.1.0.tar.gz -
Subject digest:
d586bd5b238d1b4e924aec7634c9ace65c48e535ce7081af81d6ac7666667cf0 - Sigstore transparency entry: 2405682141
- Sigstore integration time:
-
Permalink:
sophie-nguyenthuthuy/inflame@0a6fd7178ee450d5dfd5677a0b216d3f4b43755b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sophie-nguyenthuthuy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0a6fd7178ee450d5dfd5677a0b216d3f4b43755b -
Trigger Event:
push
-
Statement type:
File details
Details for the file inflame_trace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inflame_trace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49142043f163566eb58f810f2011888a4e1f05958087b3973219e02d03415c5e
|
|
| MD5 |
57fa2f2b066ea8019b63a3d3bdca5f62
|
|
| BLAKE2b-256 |
3a6b2b45ce604628ce0ec9d46560cf948ad937eff9c2908e05eb069342937692
|
Provenance
The following attestation bundles were made for inflame_trace-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on sophie-nguyenthuthuy/inflame
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inflame_trace-0.1.0-py3-none-any.whl -
Subject digest:
49142043f163566eb58f810f2011888a4e1f05958087b3973219e02d03415c5e - Sigstore transparency entry: 2405683412
- Sigstore integration time:
-
Permalink:
sophie-nguyenthuthuy/inflame@0a6fd7178ee450d5dfd5677a0b216d3f4b43755b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sophie-nguyenthuthuy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0a6fd7178ee450d5dfd5677a0b216d3f4b43755b -
Trigger Event:
push
-
Statement type: