Skip to content

latencypredictor: improve TPOT training accuracy#2509

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
tomatillo-and-multiverse:tpot-training-improvements
Mar 6, 2026
Merged

latencypredictor: improve TPOT training accuracy#2509
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
tomatillo-and-multiverse:tpot-training-improvements

Conversation

@kaushikmitr
Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to the TPOT (Tokens Per Output Token) latency prediction and training pipeline. The main changes focus on shifting TPOT training to occur once per request using a more accurate average, simplifying token count handling, and updating configuration options. These updates improve the reliability and maintainability of TPOT latency prediction and training.

TPOT Training and Prediction Pipeline Improvements:

  • TPOT training is now performed once per request in ResponseComplete, using the average TPOT calculated as (e2e latency - TTFT) divided by (tokens - 1), resulting in more accurate training data and simplifying the logic. (pkg/epp/framework/plugins/scheduling/scorer/predictedlatency/requestcontrol_hooks.go)
  • The per-token TPOT training logic and running average calculation have been removed from processTokenForLatencyPrediction, reducing complexity and avoiding redundant training entries. (pkg/epp/framework/plugins/scheduling/scorer/predictedlatency/latencypredictor_helper.go) [1] [2]

Configuration and Data Handling Updates:

  • Added a new TPOT_ZERO_TOKEN_COUNT setting in Settings, allowing configuration of whether the num_tokens_generated is set to zero during TPOT training data preparation. (latencypredictor/training_server.py) [1] [2]
  • Updated import paths to reference the correct latencypredictorasync package, ensuring proper integration with asynchronous latency prediction. (pkg/epp/framework/plugins/scheduling/scorer/predictedlatency/requestcontrol_hooks.go)

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 6, 2026

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 237c9f3
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69ab5d0c869e980008e9200c
😎 Deploy Preview https://deploy-preview-2509--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot requested a review from danehans March 6, 2026 23:02
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2026
@k8s-ci-robot k8s-ci-robot requested a review from kfswain March 6, 2026 23:02
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 6, 2026
Copy link
Copy Markdown
Contributor

@BenjaminBraunDev BenjaminBraunDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenjaminBraunDev, kaushikmitr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 743480f into kubernetes-sigs:main Mar 6, 2026
11 checks passed
RyanRosario pushed a commit to RyanRosario/gateway-api-inference-extension that referenced this pull request Mar 9, 2026
BizerNotNull pushed a commit to BizerNotNull/gateway-api-inference-extension that referenced this pull request Mar 15, 2026
elevran pushed a commit to llm-d/llm-d-inference-scheduler that referenced this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants