Unverified Commit 94de8715 authored by Phúc H. Lê Khắc's avatar Phúc H. Lê Khắc Committed by GitHub
Browse files

[Misc] allow specify is_mm_prefix_lm in hf_config (#34215)

parent e042d7e6
...@@ -1119,6 +1119,9 @@ class ModelConfig: ...@@ -1119,6 +1119,9 @@ class ModelConfig:
@cached_property @cached_property
def is_mm_prefix_lm(self) -> bool: def is_mm_prefix_lm(self) -> bool:
"""Whether to use bidirectional attention for mm positions.""" """Whether to use bidirectional attention for mm positions."""
if hasattr(self.hf_config, "is_mm_prefix_lm"):
return bool(self.hf_config.is_mm_prefix_lm)
# fallback to list of known models
MM_PREFIX_LM_MODELS = ( MM_PREFIX_LM_MODELS = (
"gemma3", "gemma3",
"molmo2", "molmo2",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment