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
bedaa47d
Commit
bedaa47d
authored
Mar 22, 2021
by
Jiezhong Qiu
Browse files
remove debug info
parent
6b5a34cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
fmoe/megatron.py
fmoe/megatron.py
+0
-6
No files found.
fmoe/megatron.py
View file @
bedaa47d
...
@@ -533,7 +533,6 @@ def merge_state_dict(state_dict_rank0, state_dict_local, fp16):
...
@@ -533,7 +533,6 @@ def merge_state_dict(state_dict_rank0, state_dict_local, fp16):
for
k
,
v
in
state_dict_local
.
items
():
for
k
,
v
in
state_dict_local
.
items
():
# megatron uses both dict and OrderedDict in its state_dict
# megatron uses both dict and OrderedDict in its state_dict
if
isinstance
(
v
,
(
OrderedDict
,
dict
)):
if
isinstance
(
v
,
(
OrderedDict
,
dict
)):
print_rank_last
(
"[merge model] go recursively to {}"
.
format
(
k
))
merge_model
(
state_dict_rank0
[
k
],
v
)
merge_model
(
state_dict_rank0
[
k
],
v
)
else
:
else
:
state_dict_rank0
[
k
]
=
v
state_dict_rank0
[
k
]
=
v
...
@@ -563,11 +562,6 @@ def merge_state_dict(state_dict_rank0, state_dict_local, fp16):
...
@@ -563,11 +562,6 @@ def merge_state_dict(state_dict_rank0, state_dict_local, fp16):
state_dict_rank0
[
"optimizer"
][
"fp32_from_fp16_params"
][
group_idx
][
state_dict_rank0
[
"optimizer"
][
"fp32_from_fp16_params"
][
group_idx
][
param_in_group_idx
param_in_group_idx
]
=
param
]
=
param
print_rank_last
(
"[merge fp32_from_fp16_params] copy parameter ({:d}, {:d})"
.
format
(
group_idx
,
param_in_group_idx
)
)
return
state_dict_rank0
return
state_dict_rank0
...
...
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