Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Feb 4, 2025
1 parent 4d96f42 commit f1d2e1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4459,7 +4459,8 @@ def test_flash_attn_2_can_dispatch_composite_models(self):
for name, submodule in model_fa2.named_modules():
class_name = submodule.__class__.__name__
if (
class_name.endswith("Attention")
"Attention" in class_name
and getattr(submodule, "config", None)
and submodule.config._attn_implementation == "flash_attention_2"
):
has_fa2 = True
Expand Down

0 comments on commit f1d2e1a

Please sign in to comment.