-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Bugfix] StatLoggers: cache spec decode metrics when they get collected. #6645
[Bugfix] StatLoggers: cache spec decode metrics when they get collected. #6645
Conversation
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge). To run full CI, you can do one of these:
🚀 |
The root cause of this issue is we have two logging intervals and they are unlikely to align. I'm wondering whether we could keep just one logging interval to make the process simple. Specifically, record raw spec decode metrics (e.g. number of accepted tokens, etc) every step, and only process them (e.g. compute system efficiency) every logging interval, similar to number of generated tokens and decoding throughput. |
@comaniac I think that the I agree in principle that a simpler approach might make sense but unsure of the performance implications. I was also wondering if there is at least a subset of spec decode metrics that we could collect at each step directly from CPU (e.g., based on the info we are already copying from device to host). |
Thanks for catching this, seems somehow this regressed without me noticing. Some thoughts:
screenshot below showing my original latency measurement, it took 130µs to do every time |
Per offline discussion we could let this PR in first and revisit in the future if there are more features that also introduce a separate intervals. Meanwhile, a unit test for this would be great. |
Will write a test later today |
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
/ready |
Added a test to catch this, and also verified that it fails on main currently. |
Failing test will be resolved by #6690 |
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com> Signed-off-by: Alvant <alvasian@yandex.ru>
…ed. (vllm-project#6645) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
Fixes #6643
From issue:
This PR caches the spec decode metrics inside the loggers, so that they will generally always get logged, and we don't need to rely to the stats getting collected at precisely the right moment.
I guess an alternative solution could be to enforce that the signal to collect the spec decoding metrics coincides with the signal to log the output somehow (it would actually need to be triggered a bit before we log output due to async implementation) but that sounds unnecessarily complex to me.
cc @cadedaniel @njhill