Unverified Commit f9f27b0f authored by Arthur's avatar Arthur Committed by GitHub
Browse files

[`SeamlessM4T`] fix copies with NLLB MoE int8 (#27018)

fix copies on newly merged model
parent 244a53e0
...@@ -1300,7 +1300,7 @@ class SeamlessM4TFeedForwardNetwork(nn.Module): ...@@ -1300,7 +1300,7 @@ class SeamlessM4TFeedForwardNetwork(nn.Module):
if ( if (
isinstance(self.fc2.weight, torch.Tensor) isinstance(self.fc2.weight, torch.Tensor)
and hidden_states.dtype != self.fc2.weight.dtype and hidden_states.dtype != self.fc2.weight.dtype
and self.fc2.weight.dtype != torch.int8 and (self.fc2.weight.dtype != torch.int8 and self.fc2.weight.dtype != torch.uint8)
): ):
hidden_states = hidden_states.to(self.fc2.weight.dtype) hidden_states = hidden_states.to(self.fc2.weight.dtype)
hidden_states = self.fc2(hidden_states) hidden_states = self.fc2(hidden_states)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment