[Bugfix] Fix models and tests for transformers v5 (#33977)
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>
This commit is contained in:
committed by
GitHub
parent
51a7bda625
commit
85ee1d962b
@@ -236,7 +236,7 @@ class AudioFlamingo3ProcessingInfo(BaseProcessingInfo):
|
||||
)
|
||||
|
||||
def get_supported_mm_limits(self) -> Mapping[str, int | None]:
|
||||
return {"audio": None}
|
||||
return {"audio": 1}
|
||||
|
||||
|
||||
class AudioFlamingo3DummyInputsBuilder(
|
||||
|
||||
@@ -692,7 +692,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)
|
||||
image_token: str = hf_processor.image_token
|
||||
|
||||
return image_token * num_images
|
||||
|
||||
@@ -13,7 +13,7 @@ import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from einops import rearrange
|
||||
from transformers.image_processing_utils import BatchFeature
|
||||
from transformers.tokenization_utils import TensorType
|
||||
from transformers.utils import TensorType
|
||||
from typing_extensions import TypedDict, Unpack
|
||||
|
||||
from vllm.config import VllmConfig
|
||||
|
||||
@@ -230,8 +230,8 @@ class MiniMaxVL01ForConditionalGeneration(nn.Module, SupportsMultiModal, Support
|
||||
self.vision_feature_layer = config.vision_feature_layer
|
||||
self.vocab_size = config.text_config.vocab_size
|
||||
self.pad_token_id = -1
|
||||
if self.config.pad_token_id is not None:
|
||||
self.pad_token_id = self.config.pad_token_id
|
||||
if self.config.text_config.pad_token_id is not None:
|
||||
self.pad_token_id = self.config.text_config.pad_token_id
|
||||
|
||||
self.make_empty_intermediate_tensors = (
|
||||
self.language_model.make_empty_intermediate_tensors
|
||||
|
||||
Reference in New Issue
Block a user