"docs/vscode:/vscode.git/clone" did not exist on "d0e30771c2995360fcfcdc5099d4a45284499e2f"
Unverified Commit a31fcc55 authored by Rick Ho's avatar Rick Ho Committed by GitHub
Browse files

Merge pull request #151 from laekov/revert-150-patch-1

Revert "convert input to same type as weight for mixed precision training"
parents 3a0eb3e6 f1a6e6fd
......@@ -63,14 +63,14 @@ class FMoELinear(nn.Module):
self.bias = nn.Parameter(torch.zeros(num_expert, out_feat))
else:
self.register_parameter("bias", None)
self.reset_parameters()
def forward(self, inp, fwd_expert_count):
r"""
Call MOE function
"""
x = MOELinear.apply(inp.type_as(self.weight), fwd_expert_count, self.weight, self.bias)
x = MOELinear.apply(inp, fwd_expert_count, self.weight, self.bias)
return x
def extra_repr(self) -> str:
......
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