forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 134
Prepare sin/cos buffers for rope outside model forward #566
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bf8e714 to
efaddfa
Compare
michalkuligowski
approved these changes
Nov 29, 2024
efaddfa to
8fb04d1
Compare
Author
|
Let's not merge yet, I've found some problems with TP=2 with fp8 |
Author
|
Actually, it looks like this problem also occurs on habana_main |
8fb04d1 to
cd2fdd3
Compare
aeeb21d to
fd9c667
Compare
fd9c667 to
785fc70
Compare
mswiniarsk
approved these changes
Dec 4, 2024
vivekgoe
pushed a commit
that referenced
this pull request
Jan 2, 2025
#566 breaks long-contexts + LoRA flow. This assumes caching sin-cos buffer for first decoder layer is sufficient to handle all cases, which is not the applicable for long-context + LoRA. This PR ignores `_prepare_cos_sin` call prior to HpuModelAdapter forward in long-context + LoRA flow.
michalkuligowski
pushed a commit
that referenced
this pull request
Jan 7, 2025
Error reported in https://jira.habana-labs.com/browse/SW-212516 Found two recent merged PR breaks down Spec Decode functionality: 1. #491 overrides existing workerwrapperBase design for speculative decoding. ``` if model_runner_cls is not None: ModelRunnerClass = model_runner_cls ``` is not needed since we now use codes as below for init model_runner_cls to follow upstream design. ``` if model_runner_cls is not None: self.model_runner = model_runner_cls(self.model_runner) ``` 2. #566 is not working in Spec Decode Eagle mode Due to input tensors is now different to the pre-assumption that decode_fwd only provide one token per seq. Spec Decode provides multiple candidates tokens as q. To fix that, added a new ENV - "**VLLM_COS_SIN_RECOMPUTE**=true", need to use it to trigger recompute to cos and sin for spec decode. --------- Signed-off-by: Chendi.Xue <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moving sin/cos buffers preparation for rope outside model forward boosts performance by getting rid
of unneccessary gather and memcopy ops before rope