"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "bfd75056b0a080addafb7f3d7c9336d27b883a0e"
Unverified Commit 244a53e0 authored by Younes Belkada's avatar Younes Belkada Committed by GitHub
Browse files

[`NLLB-MoE`] Fix NLLB MoE 4bit inference (#27012)

fix NLLB MoE 4bit
parent cb45f71c
......@@ -417,7 +417,7 @@ class NllbMoeDenseActDense(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)
......
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