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
c0cfcc47
Commit
c0cfcc47
authored
Feb 26, 2021
by
Rick Ho
Browse files
fix rank of megatron dp
parent
593feab2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
fmoe/megatron.py
fmoe/megatron.py
+4
-1
No files found.
fmoe/megatron.py
View file @
c0cfcc47
...
@@ -84,7 +84,10 @@ class MegatronMLP(FMoETransformerMLP):
...
@@ -84,7 +84,10 @@ class MegatronMLP(FMoETransformerMLP):
world_size
=
world_size
,
mp_group
=
group
,
world_size
=
world_size
,
mp_group
=
group
,
expert_dp_comm
=
'none'
if
args
.
distributed_experts
else
'dp'
)
expert_dp_comm
=
'none'
if
args
.
distributed_experts
else
'dp'
)
self
.
hidden_size
=
args
.
hidden_size
self
.
hidden_size
=
args
.
hidden_size
self
.
rank
=
args
.
rank
if
args
.
distributed_experts
:
self
.
rank
=
args
.
rank
else
:
self
.
rank
=
0
self
.
sigma
=
args
.
init_method_std
self
.
sigma
=
args
.
init_method_std
self
.
num_layers
=
args
.
num_layers
self
.
num_layers
=
args
.
num_layers
self
.
reset_parameters
()
self
.
reset_parameters
()
...
...
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