From 79e205e8cdf7864b8b9f2d23c908b887f2f5badb Mon Sep 17 00:00:00 2001 From: Jyotirmoy Roy Date: Tue, 15 Sep 2026 12:05:13 +0530 Subject: [PATCH] [Doc] Clarify ITL vs TPOT Prometheus metrics (#55283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jyotirmoy Roy Signed-off-by: Cenab Batu Bora <40250311+cenab@users.noreply.github.com> Signed-off-by: Itay Alroy Signed-off-by: Rita Brugarolas Brufau Signed-off-by: Josiah Davis Signed-off-by: simondanielsson Signed-off-by: Nick Hill Signed-off-by: Simon Danielsson <70206058+simondanielsson@users.noreply.github.com> Signed-off-by: Julien Denize <40604584+juliendenize@users.noreply.github.com> Signed-off-by: Wei Zhao Signed-off-by: Wei Zhao <51183510+wzhao18@users.noreply.github.com> Signed-off-by: wzhao18 Signed-off-by: Matthew Wong Signed-off-by: Micah Williamson Signed-off-by: JiataiWang Signed-off-by: 子华 Signed-off-by: Colin McNamara Signed-off-by: Tyler Michael Smith Signed-off-by: Marceli Fylcek Signed-off-by: LearningMachine621 <147347705+LearningMachine621@users.noreply.github.com> Signed-off-by: jamesETsmith Signed-off-by: Cursor Signed-off-by: Yichao Zhu Signed-off-by: wangyicong Signed-off-by: Kushal <72650064+kushaldabbe@users.noreply.github.com> Signed-off-by: Tianyu Guo Signed-off-by: Summer Yang Signed-off-by: Lucas Wilkinson Signed-off-by: hungh Signed-off-by: wang.yuqi Signed-off-by: zhicheng Liu Signed-off-by: Andrii Skliar Signed-off-by: Alexander Salikov Signed-off-by: Luca Motz Signed-off-by: pmanczak Signed-off-by: Fadi Arafeh Signed-off-by: Julien Darve Signed-off-by: Bugen Zhao Signed-off-by: NickLucche Signed-off-by: Andreas Karatzas Signed-off-by: Andreas Karatzas Signed-off-by: khluu Signed-off-by: Kevin H. Luu Signed-off-by: Tony Lin Signed-off-by: Yongye Zhu Signed-off-by: Jee Jee Li Signed-off-by: andyluo7 Signed-off-by: zjy0516 Signed-off-by: JinYan Su <751080330@qq.com> Signed-off-by: nicole-lihui Signed-off-by: waizuichougou <2082431897@qq.com> Signed-off-by: waizuichougou <105572299+waizuichougou@users.noreply.github.com> Signed-off-by: zRzRzRzRzRzRzR Signed-off-by: 김재억 Signed-off-by: xiaoming <1259730330@qq.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Guy Stone Signed-off-by: Djordje Ramic Signed-off-by: Isotr0py Signed-off-by: yewentao256 Signed-off-by: Lucain Pouget Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com> Signed-off-by: Sören Dréano Signed-off-by: Chris Eastwood Signed-off-by: Andy Lo Signed-off-by: mgoin Signed-off-by: Chengcheng Pei <5881383+chengchengpei@users.noreply.github.com> Signed-off-by: Lyle Lai Signed-off-by: Vincent Signed-off-by: Giancarlo Delfin Signed-off-by: xawang Signed-off-by: Alec Flowers Signed-off-by: Fangzhou Ai Signed-off-by: Yizheng Jiao Signed-off-by: Tahsin Tunan Signed-off-by: Divakar Verma Signed-off-by: zhenwei-intel Signed-off-by: Biswa Panda Signed-off-by: LopezCastroRoberto Signed-off-by: Matthew Bonanni Signed-off-by: Lucas Wilkinson Signed-off-by: Matthew Bonanni Signed-off-by: Nicolò Lucchesi Signed-off-by: Canlin Signed-off-by: junuxyz <216036880+junuxyz@users.noreply.github.com> Signed-off-by: walterbm Signed-off-by: arcusbuilds Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com> Signed-off-by: Kunshang Ji Signed-off-by: Taneem Ibrahim Signed-off-by: JartX Signed-off-by: Clinton Thomas <1033162+KernelClint@users.noreply.github.com> Signed-off-by: Artem Perevedentsev Signed-off-by: Joe Cotant Signed-off-by: yangzeyu <532183776@qq.com> Signed-off-by: Ayushman Singh <40520701+ayush1399@users.noreply.github.com> Signed-off-by: Raphael Rialland Signed-off-by: Simon Veitner Signed-off-by: Tomas Ruiz Signed-off-by: patryk.saffer Signed-off-by: patryk.saffer Signed-off-by: PatrykSaffer Signed-off-by: Chao Lei Signed-off-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com> Signed-off-by: Ayushman Singh Signed-off-by: Markus Hartikainen Signed-off-by: Woosuk Kwon Signed-off-by: surajm20061998 Signed-off-by: Roger Wang Signed-off-by: Ylean <61880605+Woolgathererer@users.noreply.github.com> Signed-off-by: Juntian Liu Signed-off-by: Kebe Signed-off-by: linitra24 Signed-off-by: Shenglei Fu Signed-off-by: pavelzak Signed-off-by: fai Signed-off-by: Stu Cao Signed-off-by: <> Signed-off-by: Zhewen Li Signed-off-by: CedricHuang <38417461+CedricHwong@users.noreply.github.com> Signed-off-by: siyu Signed-off-by: Wang Zupeng Signed-off-by: Chaojun Zhang Signed-off-by: hotragn Signed-off-by: Isotr0py <2037008807@qq.com> Signed-off-by: specture724 Signed-off-by: lxy-alexander Signed-off-by: BWAAEEEK Signed-off-by: Jared Wen Signed-off-by: Chinmay Kulkarni Signed-off-by: jiang1.li Signed-off-by: Jared Wen Signed-off-by: Matthias Gehre Signed-off-by: liuqihao Signed-off-by: Martin Hickey Signed-off-by: jiangkuaixue123 Signed-off-by: Juan Pérez de Algaba Signed-off-by: reidliu41 Signed-off-by: Xiaozhen Bi Signed-off-by: shen-shanshan <467638484@qq.com> Signed-off-by: R Signed-off-by: Alex Signed-off-by: Ronald1995 Signed-off-by: arkohut <39525455+arkohut@users.noreply.github.com> Signed-off-by: Russell Bryant Signed-off-by: Orestis Zambounis <23146389+orestis-z@users.noreply.github.com> Signed-off-by: Orestis Zambounis Signed-off-by: Claude Signed-off-by: Orestis Zambounis Signed-off-by: Speculators Bot Signed-off-by: Speculators Bot Signed-off-by: zqlcode Signed-off-by: zql <37731799+zqlcode@users.noreply.github.com> Signed-off-by: Thillai Chithambaram Signed-off-by: ElizaWszola Signed-off-by: snordmann Signed-off-by: Ianniu <985683179yzy@gmail.com> Signed-off-by: Luossu Signed-off-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com> Signed-off-by: Shiyang Chen Signed-off-by: Fangzhou Ai Signed-off-by: Michele Campi Signed-off-by: xiaguan <751080330@qq.com> Signed-off-by: zhaoguochun1995 Signed-off-by: JohnQinAMD Signed-off-by: aoshen02 Signed-off-by: Liran Schour Signed-off-by: Liqian Lin Signed-off-by: wuhangxian <1391938827@qq.com> Signed-off-by: Yongye Zhu Signed-off-by: Miguel Garcia Signed-off-by: Mario <404mario@users.noreply.github.com> Signed-off-by: aoshen02 Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com> Co-authored-by: Cenab Batu Bora <40250311+cenab@users.noreply.github.com> Co-authored-by: Codex Co-authored-by: Itay Alroy <75032521+itayalroy@users.noreply.github.com> Co-authored-by: Tyler Michael Smith Co-authored-by: Rita Brugarolas Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Josiah Davis Co-authored-by: Simon Danielsson <70206058+simondanielsson@users.noreply.github.com> Co-authored-by: Nick Hill Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Shanshan Shen <467638484@qq.com> Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com> Co-authored-by: Wei Zhao <51183510+wzhao18@users.noreply.github.com> Co-authored-by: Wei Zhao Co-authored-by: Matt <156021403+mawong-amd@users.noreply.github.com> Co-authored-by: Micah Williamson Co-authored-by: Jiatai Wang Co-authored-by: OpenAI Codex Co-authored-by: shaohuaxi Co-authored-by: Claude Opus 5 (1M context) Co-authored-by: Colin McNamara Co-authored-by: Marceli Fylcek Co-authored-by: 焦恺文 <15529091557@163.com> Co-authored-by: James E T Smith Co-authored-by: Cursor Co-authored-by: YukioZzz Co-authored-by: Yicong Wang Co-authored-by: Kushal <72650064+kushaldabbe@users.noreply.github.com> Co-authored-by: Tianyu Guo Co-authored-by: Lucas Wilkinson Co-authored-by: Summer Yang Co-authored-by: Hung Hoang (黄兴) Co-authored-by: wang.yuqi Co-authored-by: Zhicheng Liu <2084597944@qq.com> Co-authored-by: Andrii Skliar Co-authored-by: Andrii Skliar Co-authored-by: Alexander Co-authored-by: lucamotz Co-authored-by: Cyrus Leung Co-authored-by: pmanczak Co-authored-by: Fadi Arafeh <115173828+fadara01@users.noreply.github.com> Co-authored-by: Li, Jiang Co-authored-by: JulienDarve <86800349+JulienDarve@users.noreply.github.com> Co-authored-by: Bugen Zhao Co-authored-by: Nicolò Lucchesi Co-authored-by: Andreas Karatzas Co-authored-by: Lucas Wilkinson Co-authored-by: Kevin H. Luu Co-authored-by: Tony Lin Co-authored-by: Yongye Zhu Co-authored-by: Jee Jee Li Co-authored-by: andyluo7 Co-authored-by: zjy0516 Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: JinYan Su <751080330@qq.com> Co-authored-by: Nicole LiHui 🥜 Co-authored-by: Chauncey Co-authored-by: waizuichougou <105572299+waizuichougou@users.noreply.github.com> Co-authored-by: Isotr0py <2037008807@qq.com> Co-authored-by: Isotr0py Co-authored-by: Yuxuan Zhang Co-authored-by: 김재억 Co-authored-by: labAxiaoming <34019940+labAxiaoming@users.noreply.github.com> Co-authored-by: Guy Stone Co-authored-by: djramic Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: Lucain Co-authored-by: Sören Dréano <71752785+SorenDreano@users.noreply.github.com> Co-authored-by: Chris Eastwood <106503529+eastwood-c@users.noreply.github.com> Co-authored-by: Andy Lo Co-authored-by: Misha Goin Co-authored-by: chengchengpei <5881383+chengchengpei@users.noreply.github.com> Co-authored-by: Lyle Lai Co-authored-by: mevince <26759093+mevince@users.noreply.github.com> Co-authored-by: Giancarlo Delfin <32987265+TheEpicDolphin@users.noreply.github.com> Co-authored-by: amd-xavierwang Co-authored-by: Alec <35311602+alec-flowers@users.noreply.github.com> Co-authored-by: Fangzhou Ai <31551580+Fangzhou-Ai@users.noreply.github.com> Co-authored-by: Fangzhou Ai Co-authored-by: Yizheng Jiao Co-authored-by: Tahsin Tunan Co-authored-by: Divakar Verma <137818590+divakar-amd@users.noreply.github.com> Co-authored-by: liuzhenwei Co-authored-by: Biswa Panda Co-authored-by: Woosuk Kwon Co-authored-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com> Co-authored-by: Matthew Bonanni Co-authored-by: Lucas Wilkinson Co-authored-by: Canlin Guo Co-authored-by: junuxyz <216036880+junuxyz@users.noreply.github.com> Co-authored-by: Walter Beller-Morales Co-authored-by: Flora Feng <4florafeng@gmail.com> Co-authored-by: Srijan Keshri Co-authored-by: Shengqi Chen Co-authored-by: Kunshang Ji Co-authored-by: Taneem Ibrahim Co-authored-by: JartX Co-authored-by: Clinton Thomas <1033162+KernelClint@users.noreply.github.com> Co-authored-by: Lucas Bourtoule <35483370+dhalf@users.noreply.github.com> Co-authored-by: Artem Perevedentsev Co-authored-by: jcotant-inferact Co-authored-by: Zeyu Yang <532183776@qq.com> Co-authored-by: Ayushman Singh <40520701+ayush1399@users.noreply.github.com> Co-authored-by: Raphaël Rialland <36076211+TQCB@users.noreply.github.com> Co-authored-by: Simon Veitner Co-authored-by: Tomas Ruiz Co-authored-by: PatrykSaffer Co-authored-by: patryk.saffer Co-authored-by: patryk.saffer Co-authored-by: Patryk Saffer Co-authored-by: Chao Lei Co-authored-by: Ayushman Singh Co-authored-by: Markus Hartikainen Co-authored-by: Jee Jee Li Co-authored-by: Suraj Co-authored-by: Kimi Code Co-authored-by: Roger Wang Co-authored-by: Ylean <61880605+Woolgathererer@users.noreply.github.com> Co-authored-by: Juntian Liu Co-authored-by: Kebe Co-authored-by: linitra24 Co-authored-by: Shenglei Fu <117230642+ShengleiFu@users.noreply.github.com> Co-authored-by: Pavel Zakharov Co-authored-by: stu-cao Co-authored-by: Stu Cao Co-authored-by: Zhewen Li Co-authored-by: Zhewen Li Co-authored-by: CedricHuang <38417461+CedricHwong@users.noreply.github.com> Co-authored-by: siyu Co-authored-by: Zupeng Wang Co-authored-by: Chaojun Zhang Co-authored-by: Hotragn Pettugani <103170876+Hotragn@users.noreply.github.com> Co-authored-by: Anjie Hou <149605198+specture724@users.noreply.github.com> Co-authored-by: Alexander Lee Co-authored-by: JooHo Lee <96564470+BWAAEEEK@users.noreply.github.com> Co-authored-by: Jared Wen Co-authored-by: Chinmay-Kulkarni-AMD Co-authored-by: Matthias Gehre Co-authored-by: BruceLoveDecimal <39156883+BruceLoveDecimal@users.noreply.github.com> Co-authored-by: liuqihao Co-authored-by: Martin Hickey Co-authored-by: jiangkuaixue123 Co-authored-by: Juan Pérez de Algaba <124347725+jperezdealgaba@users.noreply.github.com> Co-authored-by: Reid <61492567+reidliu41@users.noreply.github.com> Co-authored-by: Xiaozhen Bi Co-authored-by: Ganesh R Co-authored-by: AlexHuang Co-authored-by: Or Ozeri Co-authored-by: Kimi Code Co-authored-by: Ronald Co-authored-by: arkohut <39525455+arkohut@users.noreply.github.com> Co-authored-by: Russell Bryant Co-authored-by: Orestis Zambounis <23146389+orestis-z@users.noreply.github.com> Co-authored-by: Benjamin Chislett Co-authored-by: Orestis Zambounis Co-authored-by: Speculators Bot Co-authored-by: zql <37731799+zqlcode@users.noreply.github.com> Co-authored-by: zqlcode Co-authored-by: Thillai Chithambaram <79466435+thillai-c@users.noreply.github.com> Co-authored-by: Mark McLoughlin Co-authored-by: Samuel Nordmann Co-authored-by: ElizaWszola Co-authored-by: Zhiyao(Ian) Yu <105995086+Ianniu123@users.noreply.github.com> Co-authored-by: 鐘天楽 Co-authored-by: Jorge Gallego Feliciano Co-authored-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com> Co-authored-by: sychen52 <41452870+sychen52@users.noreply.github.com> Co-authored-by: Michele Campi <215741962+MicheleCampi@users.noreply.github.com> Co-authored-by: Sherlock Co-authored-by: zhaoguochun1995 <109069909+zhaoguochun1995@users.noreply.github.com> Co-authored-by: JohnQinAMD Co-authored-by: aoshen02 Co-authored-by: Bhushan Asati Co-authored-by: Megha Agarwal <19240983+meghaagr13@users.noreply.github.com> Co-authored-by: liranschour Co-authored-by: Liqian Lin Co-authored-by: wuhangxian <1391938827@qq.com> Co-authored-by: Yongye Zhu Co-authored-by: Miguel <60073809+migarci2@users.noreply.github.com> Co-authored-by: 404mario <18063257856@163.com> Co-authored-by: Mario <404mario@users.noreply.github.com> Co-authored-by: Sherlock Co-authored-by: cjackal <44624812+cjackal@users.noreply.github.com> --- docs/design/metrics.md | 23 ++- .../prometheus_grafana/grafana.json | 168 +++++++++++++++++- 2 files changed, 186 insertions(+), 5 deletions(-) diff --git a/docs/design/metrics.md b/docs/design/metrics.md index c7bc85756e..3d108890d7 100644 --- a/docs/design/metrics.md +++ b/docs/design/metrics.md @@ -33,7 +33,8 @@ In v1, an extensive set of metrics are exposed via a Prometheus-compatible `/met - `vllm:request_prompt_tokens` (Histogram) - Histogram of input prompt token counts. - `vllm:request_generation_tokens` (Histogram) - Histogram of generation token counts. - `vllm:time_to_first_token_seconds` (Histogram) - Time to first token (TTFT). -- `vllm:inter_token_latency_seconds` (Histogram) - Inter-token latency. +- `vllm:inter_token_latency_seconds` (Histogram) - Inter-token latency (time between consecutive streamed outputs). +- `vllm:request_time_per_output_token_seconds` (Histogram) - Per-request Time Per Output Token (TPOT). - `vllm:e2e_request_latency_seconds` (Histogram) - End-to-end request latency. - `vllm:request_prefill_time_seconds` (Histogram) - Request prefill time. - `vllm:request_decode_time_seconds` (Histogram) - Request decode time. @@ -49,7 +50,8 @@ The subset of metrics exposed in the Grafana dashboard gives us an indication of - `vllm:e2e_request_latency_seconds_bucket` - End to end request latency measured in seconds. - `vllm:prompt_tokens` - Prompt tokens. - `vllm:generation_tokens` - Generation tokens. -- `vllm:inter_token_latency_seconds` - Inter-token latency (Time Per Output Token, TPOT) in seconds. +- `vllm:inter_token_latency_seconds` - Inter-token latency in seconds, measured between consecutive streamed outputs. It approximates TPOT when each output contains exactly one token, but differs from request-level TPOT when an output contains multiple tokens or when aggregation weights differ. +- `vllm:request_time_per_output_token_seconds` - Per-request Time Per Output Token (TPOT) in seconds, computed as `(end-to-end latency - TTFT) / (number of output tokens - 1)`. It is recorded as zero for requests that generate no more than one token. - `vllm:time_to_first_token_seconds` - Time to First Token (TTFT) latency in seconds. - `vllm:num_requests_running` (also, `_swapped` and `_waiting`) - Number of requests in the RUNNING, WAITING, and SWAPPED states. - `vllm:kv_cache_usage_perc` - Percentage of used cache blocks by vLLM. @@ -63,6 +65,20 @@ The subset of metrics exposed in the Grafana dashboard gives us an indication of See [the PR which added this Dashboard](https://github.com/vllm-project/vllm/pull/2316) for interesting and useful background on the choices made here. +`vllm:inter_token_latency_seconds` records one sample per streamed output event +(the wall-clock gap between successive outputs), whereas +`vllm:request_time_per_output_token_seconds` is recorded once per finished request +as `(end-to-end latency - TTFT) / (number of output tokens - 1)`. These two +metrics differ when an output bundles multiple tokens (e.g. speculative +decoding) or when mean ITL and mean per-request TPOT are aggregated over +differing weights. See [Understanding the latency metrics](../benchmarking/cli.md#understanding-the-latency-metrics) +for the benchmark definitions. Requests that generate no more than one token +are recorded with a TPOT of zero, while `vllm bench serve` excludes them from +its TPOT statistics. Therefore, the Prometheus histogram and benchmark TPOT +statistics can differ. Use `vllm:request_time_per_output_token_seconds` for +request-level TPOT and `vllm:inter_token_latency_seconds` when you specifically +want the inter-output latency distribution. + ### Prometheus Client Library Prometheus support was initially added [using the aioprometheus library](https://github.com/vllm-project/vllm/pull/1890), but a switch was made quickly to [prometheus_client](https://github.com/vllm-project/vllm/pull/2730). The rationale is discussed in both linked PRs. @@ -238,8 +254,7 @@ statistics relating to that iteration: iteration. - The prefill intervals for any requests that completed prefill in this iteration. -- The inter-token intervals (Time Per Output Token, TPOT), for all - requests included in this iteration. +- The inter-token intervals, for all requests included in this iteration. - The Time-To-First-Token (TTFT) for any requests that completed prefill in this iteration. However, we calculate this interval relative to when the request was first received by the frontend diff --git a/examples/observability/prometheus_grafana/grafana.json b/examples/observability/prometheus_grafana/grafana.json index 1c89d45938..6144f2bfd3 100644 --- a/examples/observability/prometheus_grafana/grafana.json +++ b/examples/observability/prometheus_grafana/grafana.json @@ -318,7 +318,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "Inter token latency in seconds.", + "description": "Inter-token latency in seconds, measured between consecutive streamed outputs. It approximates TPOT when each output contains one token, but differs from request-level TPOT under speculative decoding or varying aggregation weights.", "fieldConfig": { "defaults": { "color": { @@ -479,6 +479,172 @@ "title": "Inter Token Latency", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Per-request Time Per Output Token (TPOT) in seconds, computed as (end-to-end latency - TTFT) divided by the number of output tokens minus one. Requests with no more than one output token are recorded as zero; vllm bench serve excludes these requests from its TPOT statistics.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "histogram_quantile(0.99, sum by(le) (rate(vllm:request_time_per_output_token_seconds_bucket{model_name=\"$model_name\"}[$__rate_interval])))", + "fullMetaSearch": false, + "includeNullMetadata": false, + "instant": false, + "legendFormat": "P99", + "range": true, + "refId": "A", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "histogram_quantile(0.95, sum by(le) (rate(vllm:request_time_per_output_token_seconds_bucket{model_name=\"$model_name\"}[$__rate_interval])))", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": false, + "instant": false, + "legendFormat": "P95", + "range": true, + "refId": "B", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "histogram_quantile(0.9, sum by(le) (rate(vllm:request_time_per_output_token_seconds_bucket{model_name=\"$model_name\"}[$__rate_interval])))", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": false, + "instant": false, + "legendFormat": "P90", + "range": true, + "refId": "C", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "histogram_quantile(0.5, sum by(le) (rate(vllm:request_time_per_output_token_seconds_bucket{model_name=\"$model_name\"}[$__rate_interval])))", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": false, + "instant": false, + "legendFormat": "P50", + "range": true, + "refId": "D", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(vllm:request_time_per_output_token_seconds_sum{model_name=\"$model_name\"}[$__rate_interval])\n/\nrate(vllm:request_time_per_output_token_seconds_count{model_name=\"$model_name\"}[$__rate_interval])", + "hide": false, + "instant": false, + "legendFormat": "Mean", + "range": true, + "refId": "E" + } + ], + "title": "Time Per Output Token (TPOT)", + "type": "timeseries" + }, { "datasource": { "type": "prometheus",