Skip to content

Commit

Permalink
Pass missing arguments to `SeamlessM4Tv2ConformerEncoderLayer.forward…
Browse files Browse the repository at this point in the history
…()` when gradient checkpointing is enabled (huggingface#31945)

* pass missing arguments when gradient checkpointing is enabled for SeamlessM4Tv2

* fix same bug in SeamlessM4Tv1

* pass args, not kwargs
  • Loading branch information
anferico authored and amyeroberts committed Jul 19, 2024
1 parent e2d3c41 commit d67a49a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transformers/models/seamless_m4t/modeling_seamless_m4t.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ def forward(
hidden_states,
attention_mask,
relative_position_embeddings,
output_attentions,
conv_attention_mask,
)
else:
layer_outputs = layer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@ def forward(
layer.__call__,
hidden_states,
attention_mask,
output_attentions,
conv_attention_mask,
)
else:
layer_outputs = layer(
Expand Down

0 comments on commit d67a49a

Please sign in to comment.