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
chenpangpang
transformers
Commits
b6f47b53
Unverified
Commit
b6f47b53
authored
Mar 02, 2023
by
Sourab Mangrulkar
Committed by
GitHub
Mar 02, 2023
Browse files
fsdp bf16 enable autocast (#21847)
parent
fb76994c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
src/transformers/trainer.py
src/transformers/trainer.py
+0
-3
No files found.
src/transformers/trainer.py
View file @
b6f47b53
...
...
@@ -618,9 +618,6 @@ class Trainer:
self
.
scaler
=
GradScaler
()
else
:
self
.
scaler
=
torch
.
cuda
.
amp
.
GradScaler
()
elif
self
.
fsdp
is
not
None
:
self
.
use_cuda_amp
=
False
self
.
amp_dtype
=
None
elif
args
.
half_precision_backend
==
"cpu_amp"
:
self
.
use_cpu_amp
=
True
self
.
amp_dtype
=
torch
.
bfloat16
...
...
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