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
de64c444
Commit
de64c444
authored
Mar 10, 2025
by
dongcl
Browse files
bug fix
parent
9daa400a
Pipeline
#2465
passed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
megatron/core/transformer/transformer_block.py
megatron/core/transformer/transformer_block.py
+1
-2
No files found.
megatron/core/transformer/transformer_block.py
View file @
de64c444
...
...
@@ -185,7 +185,6 @@ class TransformerBlock(MegatronModule):
self
.
post_layer_norm
=
post_layer_norm
self
.
pre_process
=
pre_process
self
.
post_process
=
post_process
self
.
num_nextn_predict_layers
=
num_nextn_predict_layers
# Dictionary to store CUDA graphs. Number of items in the dictionary = len(self.layers).
# Item `i` in the dictionary is a list of `N` CUDA graphs for layer 'i' where N is the
# number of microbatches. Multiple CUDA graphs per layer is required to support
...
...
@@ -225,7 +224,7 @@ class TransformerBlock(MegatronModule):
self
.
num_layers_per_pipeline_rank
=
len
(
self
.
layers
)
self
.
tp_only_amax_red
=
config
.
tp_only_amax_red
# mtp require seperate layernorms for main model and mtp modules, thus move finalnorm out of block
self
.
move_final_norm_out_of_block
=
getattr
(
config
,
num_nextn_predict_layers
,
0
)
>
0
self
.
move_final_norm_out_of_block
=
getattr
(
config
,
"
num_nextn_predict_layers
"
,
0
)
>
0
def
_build_layers
(
self
):
# Transformer layers.
...
...
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