improve mimax-m2 rmsnorm precision (#12186)
This commit is contained in:
@@ -122,7 +122,7 @@ class MiniMaxM2RMSNormTP(nn.Module):
|
||||
|
||||
# Normalize and apply local weight shard
|
||||
x = x * torch.rsqrt(variance + self.variance_epsilon)
|
||||
x = x.to(orig_dtype) * self.weight
|
||||
x = (x * self.weight).to(orig_dtype)
|
||||
|
||||
return x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user