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
473449d8
Commit
473449d8
authored
Dec 31, 2024
by
wxj
Browse files
Update transformer.py, 添加torch.compile
parent
50fe58fa
Pipeline
#2184
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
megatron/legacy/model/transformer.py
megatron/legacy/model/transformer.py
+1
-0
No files found.
megatron/legacy/model/transformer.py
View file @
473449d8
...
@@ -1213,6 +1213,7 @@ class ParallelTransformerLayer(MegatronModule):
...
@@ -1213,6 +1213,7 @@ class ParallelTransformerLayer(MegatronModule):
return
retriever_output
,
norm_input
,
norm_output
return
retriever_output
,
norm_input
,
norm_output
@
torch
.
compile
(
mode
=
"max-autotune-no-cudagraphs"
)
def
forward
(
self
,
hidden_states
,
attention_mask
,
def
forward
(
self
,
hidden_states
,
attention_mask
,
encoder_output
=
None
,
enc_dec_attn_mask
=
None
,
encoder_output
=
None
,
enc_dec_attn_mask
=
None
,
retriever_input
=
None
,
retriever_input
=
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