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
46d09af4
Unverified
Commit
46d09af4
authored
Aug 07, 2024
by
append-only
Committed by
GitHub
Aug 07, 2024
Browse files
enable xla fsdp (#32048)
* enable xla fsdp * add acceleration version check for xla fsdp
parent
7ad784ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/training_args.py
src/transformers/training_args.py
+1
-1
No files found.
src/transformers/training_args.py
View file @
46d09af4
...
...
@@ -1902,7 +1902,7 @@ class TrainingArguments:
warnings
.
warn
(
"`--xla_fsdp_grad_ckpt` is useful only when `--xla` is set to true."
)
# accelerate integration for FSDP
if
len
(
self
.
fsdp
)
>
0
and
not
self
.
fsdp_config
[
"xla"
]
:
if
len
(
self
.
fsdp
)
>
0
and
is_accelerate_available
(
"0.28.0"
)
:
os
.
environ
[
"ACCELERATE_USE_FSDP"
]
=
"true"
from
accelerate.utils.constants
import
(
FSDP_AUTO_WRAP_POLICY
,
...
...
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