Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastMoE
Commits
bc8e8181
Commit
bc8e8181
authored
Jan 27, 2021
by
Rick Ho
Browse files
fix expert number
parent
761b4ffc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fmoe/moe.py
fmoe/moe.py
+1
-1
No files found.
fmoe/moe.py
View file @
bc8e8181
...
@@ -43,7 +43,7 @@ class FFFN(nn.Module):
...
@@ -43,7 +43,7 @@ class FFFN(nn.Module):
world_size
=
world_size
)
world_size
=
world_size
)
self
.
h4toh
=
FMoE
(
num_expert
,
d_hidden
,
d_model
,
self
.
h4toh
=
FMoE
(
num_expert
,
d_hidden
,
d_model
,
world_size
=
world_size
)
world_size
=
world_size
)
self
.
gate
=
nn
.
Linear
(
d_model
,
num_expert
)
self
.
gate
=
nn
.
Linear
(
d_model
,
num_expert
*
world_size
)
self
.
layer_norm
=
nn
.
LayerNorm
(
d_model
)
self
.
layer_norm
=
nn
.
LayerNorm
(
d_model
)
self
.
bias
=
torch
.
nn
.
parameter
.
Parameter
(
torch
.
zeros
(
d_model
,
self
.
bias
=
torch
.
nn
.
parameter
.
Parameter
(
torch
.
zeros
(
d_model
,
dtype
=
torch
.
float32
))
dtype
=
torch
.
float32
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment