[Bugfix] Fix models and tests for transformers v5#33977
[Bugfix] Fix models and tests for transformers v5#33977DarkLight1337 merged 8 commits intovllm-project:mainfrom
Conversation
Signed-off-by: raushan <raushan@huggingface.co>
There was a problem hiding this comment.
Code Review
This pull request updates the codebase to be compatible with transformers v5. The changes primarily involve adapting models and processors to new APIs, including variable renames, function signature modifications, and adjustments to attribute access paths. Most of these changes are straightforward and necessary for the upgrade. However, I've identified a critical issue in vllm/transformers_utils/processors/ovis2_5.py where the removal of return_tensors="np" from a preprocess call is likely to cause a runtime error. A fix has been suggested for this issue. The other changes appear correct and well-implemented.
| @@ -692,7 +698,7 @@ class HunYuanVLDummyInputsBuilder(BaseDummyInputsBuilder[HunYuanVLProcessingInfo | |||
| def get_dummy_text(self, mm_counts: Mapping[str, int]) -> str: | |||
| num_images = mm_counts.get("image", 0) | |||
|
|
|||
| hf_processor = self.info.get_hf_processor() | |||
| hf_processor = self.info.get_hf_processor(typ=HunYuanVLProcessor) | |||
There was a problem hiding this comment.
| hf_processor = self.info.get_hf_processor(typ=HunYuanVLProcessor) | |
| hf_processor = self.info.get_hf_processor(HunYuanVLProcessor) |
Prefer passing by positional args
There was a problem hiding this comment.
The test failed when positional arg was used
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Signed-off-by: Raushan Turganbay <raushan.turganbay@alumni.nu.edu.kz>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
Documentation preview: https://vllm--33977.org.readthedocs.build/en/33977/ |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: raushan <raushan@huggingface.co>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: raushan <raushan@huggingface.co>
Head branch was pushed to by a user without write access
Signed-off-by: raushan <raushan@huggingface.co> Signed-off-by: Raushan Turganbay <raushan.turganbay@alumni.nu.edu.kz> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: raushan <raushan@huggingface.co> Signed-off-by: Raushan Turganbay <raushan.turganbay@alumni.nu.edu.kz> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
As per title, related to #30566. All changes are v4 compatible as well, should be compatible
@hmellor