-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Add TTIT tracking array to RequestStateStats to trunk #28757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary: This allows us to track TTIT's internally at token generation time and with our own tracking instead of using Prometheus (vLLM's officially supported way to track TTIT) Furthermore, TTFT is saved to RequestStateStats but not TTIT <- weird discrepancy Test Plan: N/A (this only adds a field) Differential Revision: D86552981
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request aims to add tracking for inter-token latencies (TTIT) to RequestStateStats. The implementation correctly collects the latencies during token generation. However, I've found a critical issue: the collected inter_token_latencies are discarded when a request finishes, as they are not transferred from RequestStateStats to FinishedRequestStats. This makes the collected data unusable. My review includes a comment detailing how to fix this by updating FinishedRequestStats and the logic in update_from_finished_request. Additionally, this change lacks tests. Adding tests would have likely caught this issue and is crucial for verifying that metrics are collected and reported correctly.
| # list of ttit's | ||
| inter_token_latencies: list[float] = field(default_factory=list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inter_token_latencies are collected in RequestStateStats but are not transferred to FinishedRequestStats when a request completes. This means the collected latency data is lost when RequestState is discarded upon request completion.
To fix this, you should also add inter_token_latencies to the FinishedRequestStats dataclass and populate it in IterationStats.update_from_finished_request.
- Add the field to
FinishedRequestStats:
@dataclass
class FinishedRequestStats:
# ... existing fields
is_corrupted: bool = False
inter_token_latencies: list[float] = field(default_factory=list)- Populate it in
update_from_finished_request:
finished_req = FinishedRequestStats(
# ... existing assignments
is_corrupted=req_stats.is_corrupted,
inter_token_latencies=req_stats.inter_token_latencies,
)
Summary:
This allows us to track TTIT's at token generation time and fix a weird discrepancy whereTTFT is saved to RequestStateStats but not TTIT
Test Plan: N/A (this only adds a field)
Differential Revision: D86552981