"vscode:/vscode.git/clone" did not exist on "4fc708f98c9c8d5cb48e8a2639e3f7a21c65802f"
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