[FIX] Fix shape mismatch for swapped sequences when logprobs > 0#1971
[FIX] Fix shape mismatch for swapped sequences when logprobs > 0#1971derange-alembic wants to merge 2 commits intovllm-project:mainfrom
Conversation
|
This issue is also reported in #1847. |
Yard1
left a comment
There was a problem hiding this comment.
This looks good to me. cc @WoosukKwon @zhuohan123
|
This was fixed by #2186 |
| # Swapped seqs have output tokens. | ||
| output_tokens = sampling_metadata.seq_data[ | ||
| seq_ids[0]].output_token_ids | ||
| group_prompt_logprobs: PromptLogprobs = [None] | ||
| for token_id in prompt_tokens[1:]: | ||
| for token_id in prompt_tokens[1:] + output_tokens: |
There was a problem hiding this comment.
Why is output_tokens used for prompt logprobs?
|
For prompt_logprobs I think the issue still remains |
|
Hi, I've raised a new issue (#3032), as the codebase has changed since then, and the issue still persists. |
|
This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you! |
|
This pull request has merge conflicts that must be resolved before it can be |
…1971) Signed-off-by: Youlei Yang <youlei.yang@intel.com>
When the
logprobsof a sequence is set to be larger than 0 and it was swapped out using recomputation policy, the_get_logprobs()insampler.pywill encounterIndexError: shape mismatch: indexing tensors could not be broadcast together with shapesdue to the obliviousness of theoutput_token_ids.