V0.18.0 fix#22
Merged
Merged
Conversation
The multimodal processor in bart.py broke under vLLM 0.18 in three places: - TextDataParser relied on MultiModalDataParser._is_empty, which was removed in 0.18. Replaced with inline emptiness checks for str and list. - create_encoder_prompt previously tokenized `prompt` as the encoder text. In 0.18 `inputs.prompt` passed to this method is the DECODER prompt text, not the encoder text (the encoder content lives in mm_data). The method now returns a single [0] placeholder token; _get_prompt_updates replaces it with the correct number of encoder token slots during rendering. - _call_hf_processor is now sometimes called with an already-tokenized decoder prompt (list[int]) instead of a str. Handle both cases when building result["input_ids"]. Adds tests/test_vllm_018_compat.py with three narrow unit tests covering each of these paths; no GPU required. Signed-off-by: David Schulmeister <dschulmeist@users.noreply.github.com>
Signed-off-by: NickLucche <nlucches@redhat.com>
Signed-off-by: NickLucche <nlucches@redhat.com>
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
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.
Fixes for bart based on #20, ensuring same output as v0.16.0