Skip to content

Commit

Permalink
remove copied from statement from Musicgen SDPA
Browse files Browse the repository at this point in the history
  • Loading branch information
ylacombe committed Jun 14, 2024
1 parent e559f25 commit 605df12
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/transformers/models/musicgen/modeling_musicgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ def _upad_input(self, query_layer, key_layer, value_layer, attention_mask, query
)


# Copied from transformers.models.bart.modeling_bart.BartSdpaAttention with Bart->Musicgen
class MusicgenSdpaAttention(MusicgenAttention):
def forward(
self,
Expand All @@ -572,7 +571,6 @@ def forward(
output_attentions=output_attentions,
)

# Ignore copy
if (
attention_mask is not None
and (attention_mask.mean(dim=[1, 2, 3]) <= torch.finfo(attention_mask.dtype).min).any()
Expand Down

0 comments on commit 605df12

Please sign in to comment.