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 <[email protected]>
  • Loading branch information
Gaurav7888 and yafshar authored Aug 5, 2024
1 parent 5aa891d commit 49a234e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion optimum/habana/transformers/models/mt5/modeling_mt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@

try:
from habana_frameworks.torch.hpex.normalization import FusedRMSNorm as FusedRMSNorm

has_fused_rms_norm = True
except ImportError:
has_fused_rms_norm = False
print("Not using HPU fused kernel for RMSNorm")
FusedRMSNorm = None

def gaudi_mt5_layernorm_forward(self, hidden_states):
"""
Expand Down

0 comments on commit 49a234e

Please sign in to comment.