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 263a42f commit f35c52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/habana/transformers/models/mt5/modeling_mt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def gaudi_MT5Stack_forward(

# layer_outputs is a tuple with:
# hidden-states, key-value-states, (self-attention position bias), (self-attention weights), (cross-attention position bias), (cross-attention weights)
if use_cache is False:
if not use_cache:
layer_outputs = layer_outputs[:1] + (None,) + layer_outputs[1:]

hidden_states, present_key_value_state = layer_outputs[:2]
Expand Down

0 comments on commit f35c52b

Please sign in to comment.