mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
[SeamlessM4T
] fix copies with NLLB MoE int8 (#27018)
fix copies on newly merged model
This commit is contained in:
parent
244a53e0f6
commit
f9f27b0fc2
@ -1300,7 +1300,7 @@ class SeamlessM4TFeedForwardNetwork(nn.Module):
|
||||
if (
|
||||
isinstance(self.fc2.weight, torch.Tensor)
|
||||
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 = self.fc2(hidden_states)
|
||||
|
Loading…
Reference in New Issue
Block a user