inference/research
verifiedhigh · 0.94updated 2026-10-04

TGI batch forward-duration histogram (prefill/decode split)

text-generation-inference · histogram

Fields

id
metric-exposures/w3m-text-generation-inference-tgi-batch-forward-duration
Metric name
tgi_batch_forward_duration
Metric type
histogram
Unit
seconds
Exposure
prometheus
Endpoint
:9000/metrics
Histogram buckets
0.00010.000150.0002250.00033750.000506250.000759380.001139060.001708590.002562890.003844340.00576650.008649760.012974630.019461950.029192930.043789390.065684080.098526130.147789190.221683780.332525670.498788510.748182761.122274151.683411222.525116833.787675245.681512878.522269312.7834039519.1751059228.7626588843.1439883364.7159824997.07397374
Labels
method
Enabled by default
yes
Phase scoped
yes
notes
TGI main, router/src/server.rs plus backends/v3/src/{backend,queue,lib}.rs, read 2026-10-04. On by default: the Prometheus recorder is built unconditionally with PrometheusBuilder and an HTTP listener on prometheus_port, default 9000, so nothing has to be opted into. Label keys are method (prefill|decode) on the batch families, err on tgi_request_failure, and reason on tgi_batch_concat - there are no model or engine labels, so every series is fleet-wide. method in {prefill, decode}. This label is the reason TGI is worth knowing about: it is the only engine here that lets you compare prefill and decode batch cost directly as two series of one metric, rather than reconstructing the split from separate metric names.

Notes

TGI main, router/src/server.rs plus backends/v3/src/{backend,queue,lib}.rs, read 2026-10-04. On by default: the Prometheus recorder is built unconditionally with PrometheusBuilder and an HTTP listener on prometheus_port, default 9000, so nothing has to be opted into. Label keys are method (prefill|decode) on the batch families, err on tgi_request_failure, and reason on tgi_batch_concat - there are no model or engine labels, so every series is fleet-wide. method in {prefill, decode}. This label is the reason TGI is worth knowing about: it is the only engine here that lets you compare prefill and decode batch cost directly as two series of one metric, rather than reconstructing the split from separate metric names.

Cross-references