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
834d6dd5
"src/vscode:/vscode.git/clone" did not exist on "800739361421dc559230faaec25ab6363f9ebf26"
Commit
834d6dd5
authored
Jan 08, 2021
by
Vijay Korthikanti
Browse files
minor fixes
parent
4b506832
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
megatron/model/language_model.py
megatron/model/language_model.py
+1
-1
megatron/model/transformer.py
megatron/model/transformer.py
+3
-0
No files found.
megatron/model/language_model.py
View file @
834d6dd5
...
...
@@ -595,7 +595,7 @@ class TransformerLanguageModelLastStage(TransformerLanguageModelBase):
return
super
(
TransformerLanguageModelLastStage
,
self
).
forward
(
hidden_states
,
enc_attention_mask
,
dec_language_input
=
(
dec_input_ids
,
dec_position_ids
),
dec_language_
model_
input
=
(
dec_input_ids
,
dec_position_ids
),
dec_attn_mask
=
dec_attn_mask
,
enc_dec_attn_mask
=
enc_dec_attn_mask
,
layer_past
=
layer_past
,
...
...
megatron/model/transformer.py
View file @
834d6dd5
...
...
@@ -673,6 +673,9 @@ class ParallelTransformer(MegatronModule):
else
:
hidden_states
=
hidden_states
.
transpose
(
0
,
1
).
contiguous
()
if
encoder_output
is
not
None
:
encoder_output
=
encoder_output
.
transpose
(
0
,
1
).
contiguous
()
if
self
.
checkpoint_activations
:
hidden_states
=
self
.
_checkpointed_forward
(
hidden_states
,
attention_mask
,
...
...
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