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
chenpangpang
transformers
Commits
881c0df9
Unverified
Commit
881c0df9
authored
Jun 19, 2023
by
Xiaoyang Sun
Committed by
GitHub
Jun 19, 2023
Browse files
error bug on saving distributed optim state when using data parallel (#24108)
Update checkpoint_reshaping_and_interoperability.py
parent
ee88ae59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/megatron_gpt2/checkpoint_reshaping_and_interoperability.py
...egatron_gpt2/checkpoint_reshaping_and_interoperability.py
+1
-1
No files found.
src/transformers/models/megatron_gpt2/checkpoint_reshaping_and_interoperability.py
View file @
881c0df9
...
@@ -690,7 +690,7 @@ def convert_checkpoint_from_transformers_to_megatron(args):
...
@@ -690,7 +690,7 @@ def convert_checkpoint_from_transformers_to_megatron(args):
for
j
in
range
(
args
.
target_tensor_model_parallel_size
):
for
j
in
range
(
args
.
target_tensor_model_parallel_size
):
for
k
in
range
(
args
.
target_data_parallel_size
):
for
k
in
range
(
args
.
target_data_parallel_size
):
if
args
.
target_pipeline_model_parallel_size
==
1
:
if
args
.
target_pipeline_model_parallel_size
==
1
:
checkpoint_dir
=
f
"mp_rank_
{
j
:
02
d
}
_
{
i
:
03
d
}
"
checkpoint_dir
=
f
"mp_rank_
{
j
:
02
d
}
_
{
k
:
03
d
}
"
else
:
else
:
checkpoint_dir
=
f
"mp_rank_
{
j
:
02
d
}
_
{
i
:
03
d
}
_
{
k
:
03
d
}
"
checkpoint_dir
=
f
"mp_rank_
{
j
:
02
d
}
_
{
i
:
03
d
}
_
{
k
:
03
d
}
"
checkpoint_dir
=
os
.
path
.
join
(
release_dir
,
checkpoint_dir
)
checkpoint_dir
=
os
.
path
.
join
(
release_dir
,
checkpoint_dir
)
...
...
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