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
evt_fugx1
dcu_megatron
Commits
bc3d72d1
Commit
bc3d72d1
authored
Apr 30, 2025
by
silencealiang
Browse files
fix bug
parent
bcd9442e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
dcu_megatron/core/transformer/transformer_block.py
dcu_megatron/core/transformer/transformer_block.py
+2
-1
No files found.
dcu_megatron/core/transformer/transformer_block.py
View file @
bc3d72d1
...
@@ -8,7 +8,8 @@ def transformer_block_init_wrapper(fn):
...
@@ -8,7 +8,8 @@ def transformer_block_init_wrapper(fn):
# mtp require seperate layernorms for main model and mtp modules, thus move finalnorm out of block
# mtp require seperate layernorms for main model and mtp modules, thus move finalnorm out of block
config
=
args
[
0
]
if
len
(
args
)
>
1
else
kwargs
[
'config'
]
config
=
args
[
0
]
if
len
(
args
)
>
1
else
kwargs
[
'config'
]
if
getattr
(
config
,
"mtp_num_layers"
,
0
)
>
0
:
mtp_layers
=
getattr
(
config
,
"mtp_num_layers"
,
None
)
if
isinstance
(
mtp_layers
,
int
)
and
mtp_layers
>
0
:
self
.
main_final_layernorm
=
self
.
final_layernorm
self
.
main_final_layernorm
=
self
.
final_layernorm
self
.
final_layernorm
=
None
self
.
final_layernorm
=
None
...
...
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