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
Megatron-LM
Commits
be8de1b3
Commit
be8de1b3
authored
Mar 29, 2022
by
Lawrence McAfee
Browse files
fixed shared weight attribute for fp32.
parent
2c9ed910
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
megatron/optimizer/distrib_optimizer.py
megatron/optimizer/distrib_optimizer.py
+2
-0
No files found.
megatron/optimizer/distrib_optimizer.py
View file @
be8de1b3
...
...
@@ -237,6 +237,8 @@ class DistributedOptimizer(MixedPrecisionOptimizer):
shard_fp32_params_this_group
.
append
(
shard_model_param
)
mpu
.
copy_tensor_model_parallel_attributes
(
shard_model_param
,
model_param
)
if
hasattr
(
model_param
,
'shared'
):
shard_model_param
.
shared
=
model_param
.
shared
else
:
raise
TypeError
(
'Wrapped parameters must be one of '
...
...
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