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
OpenFold
Commits
9f558178
Commit
9f558178
authored
Mar 29, 2022
by
Gustaf Ahdritz
Browse files
Fix DeepSpeed config builder
parent
47f1d66a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
scripts/build_deepspeed_config.py
scripts/build_deepspeed_config.py
+9
-9
No files found.
scripts/build_deepspeed_config.py
View file @
9f558178
...
...
@@ -134,10 +134,10 @@ p.add_argument("--fp16", dest="fp16", action="store_true", default=False,
help
=
"""Whether to train in 16-bit/mixed-precision mode.
Mutually exclusive with --amp"""
)
p
=
parser
.
add_argument_group
(
"Half-precision training (bf
loat
16)"
)
p
.
add_argument
(
"--bf
loat
16"
,
dest
=
"bf
loat
16"
,
action
=
"store_true"
,
p
=
parser
.
add_argument_group
(
"Half-precision training (bf16)"
)
p
.
add_argument
(
"--bf16"
,
dest
=
"bf16"
,
action
=
"store_true"
,
default
=
False
,
help
=
"""Whether to train in 16-bit bf
loat
16 mode. Mutually
help
=
"""Whether to train in 16-bit bf16 mode. Mutually
exclusive with --amp and --fp16. Requires hardware
support"""
)
...
...
@@ -258,8 +258,8 @@ if(args.scheduler is not None):
d
[
"scheduler"
]
=
scheduler
# 16-bit training
if
(
sum
([
args
.
amp
,
args
.
fp16
,
args
.
bf
loat
16
])
>
1
):
raise
ValueError
(
"Only one of --fp16, --amp, or --bf
loat
16 can be enabled"
)
if
(
sum
([
args
.
amp
,
args
.
fp16
,
args
.
bf16
])
>
1
):
raise
ValueError
(
"Only one of --fp16, --amp, or --bf16 can be enabled"
)
if
(
args
.
amp
):
amp
=
{}
...
...
@@ -270,10 +270,10 @@ elif(args.fp16):
fp16
=
{}
fp16
[
"enabled"
]
=
args
.
fp16
d
[
"fp16"
]
=
fp16
elif
(
args
.
bf
loat
16
):
bf
loat
16
=
{}
bf
loat
16
[
"enabled"
]
=
args
.
bf
loat
16
d
[
"bf
loat
16"
]
=
bf
loat
16
elif
(
args
.
bf16
):
bf16
=
{}
bf16
[
"enabled"
]
=
args
.
bf16
d
[
"bf16"
]
=
bf16
# Activation checkpointing
ac
=
{}
...
...
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