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
481f5c4f
Commit
481f5c4f
authored
Feb 05, 2021
by
Rick Ho
Browse files
add functions to support checkpointing in megatron ddp
parent
79ccb7b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
fmoe/megatron.py
fmoe/megatron.py
+9
-0
No files found.
fmoe/megatron.py
View file @
481f5c4f
...
...
@@ -49,3 +49,12 @@ class DistributedDataParallel(DistributedGroupedDataParallel):
mp_group
=
mpu
.
get_model_parallel_group
(),
dp_group
=
mpu
.
get_data_parallel_group
()
)
def
state_dict
(
self
,
*
args
,
**
kwargs
):
return
self
.
module
.
state_dict
(
*
args
,
**
kwargs
)
def
state_dict_for_save_checkpoint
(
self
,
*
args
,
**
kwargs
):
return
self
.
module
.
state_dict_for_save_checkpoint
(
*
args
,
**
kwargs
)
def
load_state_dict
(
self
,
*
args
,
**
kwargs
):
return
self
.
module
.
load_state_dict
(
*
args
,
**
kwargs
)
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