-
Notifications
You must be signed in to change notification settings - Fork 555
[v0.11.0] [P/D] force with_prefill true after allreduce in kv producer #3835
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
[v0.11.0] [P/D] force with_prefill true after allreduce in kv producer #3835
Conversation
Signed-off-by: liziyu <liziyu16@huawei.com>
Signed-off-by: liziyu <liziyu16@huawei.com>
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
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 fix issues related to prefill for the KV producer. The changes include moving a code block in _dummy_run to ensure with_prefill is set correctly before being used, and adding a check in save_kv_layer to only proceed if there are requests. The code movement in vllm_ascend/worker/model_runner_v1.py correctly fixes a bug. However, the change in vllm_ascend/distributed/mooncake_layerwise_connector.py introduces a critical AttributeError due to a typo. I've provided a comment with a suggested fix for this issue.
| **kwargs) -> None: | ||
| """MooncakeLayerwiseConnector does not save explicitly.""" | ||
| if self.kv_role == 'kv_producer': | ||
| if self.kv_role == 'kv_producer' and connector_metadata.request.keys(): |
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.
There's a typo in the attribute name. The MooncakeLayerwiseConnectorMetadata object has an attribute requests (plural), not request. This will raise an AttributeError at runtime.
Additionally, to check if the dictionary is not empty, you can use the dictionary directly in a boolean context, which is more Pythonic.
| if self.kv_role == 'kv_producer' and connector_metadata.request.keys(): | |
| if self.kv_role == 'kv_producer' and connector_metadata.requests: |
Signed-off-by: liziyu <liziyu16@huawei.com>
61c19e2 to
f7b64f8
Compare
What this PR does / why we need it?
force with_prefill true after allreduce in kv producer
Does this PR introduce any user-facing change?
How was this patch tested?