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
22e3c7e6
Commit
22e3c7e6
authored
Jun 05, 2020
by
mohammad
Browse files
added fp16 cross entropy loss option for gpt2
parent
acfe848e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
megatron/model/gpt2_model.py
megatron/model/gpt2_model.py
+1
-1
No files found.
megatron/model/gpt2_model.py
View file @
22e3c7e6
...
...
@@ -76,7 +76,7 @@ class GPT2Model(MegatronModule):
if
get_key_value
:
output
=
[
output
,
presents
]
if
labels
is
not
None
:
if
labels
is
None
:
return
output
else
:
loss
=
mpu
.
vocab_parallel_cross_entropy
(
output
,
labels
)
...
...
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