Skip to content

Commit

Permalink
Fix inheritance.
Browse files Browse the repository at this point in the history
  • Loading branch information
visheratin committed Apr 16, 2024
1 parent 84020ff commit 5ce57fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/transformers/models/m2m_100/modeling_m2m_100.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def _get_unpad_data(attention_mask):
)


class M2M100FlashAttention2(nn.Module):
class M2M100FlashAttention2(M2M100Attention):
def __init__(
self,
embed_dim: int,
Expand All @@ -348,7 +348,6 @@ def __init__(
is_causal: bool = False,
config: Optional[M2M100Config] = None,
):
super().__init__()
self._flash_attn_uses_top_left_mask = not is_flash_attn_greater_or_equal_2_10()
self.embed_dim = embed_dim
self.num_heads = num_heads
Expand Down

0 comments on commit 5ce57fd

Please sign in to comment.