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
697f05ba
Unverified
Commit
697f05ba
authored
Mar 08, 2024
by
Yun Dai
Committed by
GitHub
Mar 08, 2024
Browse files
fix typos in FSDP config parsing logic in `TrainingArguments` (#29189)
fix FSDP config
parent
608fa549
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/training_args.py
src/transformers/training_args.py
+2
-2
No files found.
src/transformers/training_args.py
View file @
697f05ba
...
...
@@ -1732,9 +1732,9 @@ class TrainingArguments:
os
.
environ
[
f
"
{
prefix
}
TRANSFORMER_CLS_TO_WRAP"
]
=
","
.
join
(
self
.
fsdp_config
[
"transformer_layer_cls_to_wrap"
]
)
prefetch_policy
=
self
.
fsdp_config
.
get
(
"
fsdp_
backward_prefetch"
,
"NO_PREFETCH"
)
prefetch_policy
=
self
.
fsdp_config
.
get
(
"backward_prefetch"
,
"NO_PREFETCH"
)
os
.
environ
[
f
"
{
prefix
}
BACKWARD_PREFETCH"
]
=
prefetch_policy
.
upper
()
os
.
environ
[
f
"
{
prefix
}
FORWARD_PREFETCH"
]
=
self
.
fsdp_config
.
get
(
"forward_prefe
c
t"
,
"false"
)
os
.
environ
[
f
"
{
prefix
}
FORWARD_PREFETCH"
]
=
self
.
fsdp_config
.
get
(
"forward_prefet
ch
"
,
"false"
)
os
.
environ
[
f
"
{
prefix
}
SYNC_MODULE_STATES"
]
=
self
.
fsdp_config
.
get
(
"sync_module_states"
,
"true"
)
os
.
environ
[
f
"
{
prefix
}
USE_ORIG_PARAMS"
]
=
self
.
fsdp_config
.
get
(
"use_orig_params"
,
"true"
)
...
...
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