Fix Transformers backend compatibility check (#15290)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-03-31 18:27:07 +01:00
committed by GitHub
parent 9a2160fa55
commit d4bfc23ef0

View File

@@ -36,10 +36,7 @@ def is_transformers_impl_compatible(
mod = module or getattr(transformers, arch, None)
if mod is None:
return False
if hasattr(mod, "supports_backend"):
return mod.is_backend_compatible()
else:
return mod._supports_flex_attn
return mod.is_backend_compatible()
def resolve_transformers_fallback(model_config: ModelConfig,