Skip to content

Commit

Permalink
Update optimum/habana/transformers/models/mt5/modeling_mt5.py
Browse files Browse the repository at this point in the history
Co-authored-by: Yaser Afshar <yaser.afshar@intel.com>
  • Loading branch information
Gaurav7888 and yafshar authored Aug 5, 2024
1 parent 40438c8 commit 486eb63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions optimum/habana/transformers/models/mt5/modeling_mt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def gaudi_MT5Attention_forward(
"""
Copied from https://github.com/huggingface/transformers/blob/v4.40.2/src/transformers/models/mt5/modeling_mt5.py
Self-attention (if key_value_states is None) or attention over source sentence (provided by key_value_states).
The only differences are:
- add new args token_idx
"""
# Input is (batch_size, seq_length, dim)
# Mask is (batch_size, key_length) (non-causal) or (batch_size, key_length, key_length)
Expand Down

0 comments on commit 486eb63

Please sign in to comment.