Support all interleaved layer types (#28485)

Signed-off-by: Yong Hoon Shin <yhshin@meta.com>
This commit is contained in:
Yong Hoon Shin 2025-11-12 22:57:20 -10:00 committed by GitHub
parent 5c9ad138d5
commit 11ac9ddd03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -472,8 +472,7 @@ def is_interleaved(config: PretrainedConfig) -> bool:
"""
text_config = config.get_text_config()
if layer_types := getattr(text_config, "layer_types", None):
interleaved_types = {"full_attention", "sliding_attention"}
return interleaved_types.issubset(layer_types)
return len(set(layer_types)) > 1
return False