[BugFix] wire make_empty_intermediate_tensors on AyaVision and Voxtral (#43118)
Signed-off-by: Keyi Li <likey6688@gmail.com> Co-authored-by: Keyi Li <likey6688@gmail.com>
This commit is contained in:
@@ -358,6 +358,10 @@ class AyaVisionForConditionalGeneration(nn.Module, SupportsMultiModal, SupportsP
|
|||||||
architectures=["Cohere2ForCausalLM"],
|
architectures=["Cohere2ForCausalLM"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.make_empty_intermediate_tensors = (
|
||||||
|
self.language_model.make_empty_intermediate_tensors
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dtype(self):
|
def dtype(self):
|
||||||
return next(self.parameters()).dtype
|
return next(self.parameters()).dtype
|
||||||
|
|||||||
@@ -349,6 +349,10 @@ class VoxtralForConditionalGeneration(
|
|||||||
dim=config.text_config.hidden_size,
|
dim=config.text_config.hidden_size,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.make_empty_intermediate_tensors = (
|
||||||
|
self.language_model.make_empty_intermediate_tensors
|
||||||
|
)
|
||||||
|
|
||||||
def get_mm_mapping(self) -> MultiModelKeys:
|
def get_mm_mapping(self) -> MultiModelKeys:
|
||||||
"""Get module prefix for multimodal models to filter LoRA modules."""
|
"""Get module prefix for multimodal models to filter LoRA modules."""
|
||||||
return MultiModelKeys.from_string_field(
|
return MultiModelKeys.from_string_field(
|
||||||
|
|||||||
Reference in New Issue
Block a user