Skip to content

Commit f362ebf

Browse files
committed
Undo DeepSpeed config change
1 parent 16e0082 commit f362ebf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

deepspeed_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"enabled": false,
88
"opt_level": "O2"
99
},
10-
"bf16": {
10+
"bfloat16": {
1111
"enabled": true
1212
},
1313
"zero_optimization": {

scripts/build_deepspeed_config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@
134134
help="""Whether to train in 16-bit/mixed-precision mode.
135135
Mutually exclusive with --amp""")
136136

137-
p = parser.add_argument_group("Half-precision training (bf16)")
138-
p.add_argument("--bf16", dest="bf16", action="store_true",
137+
p = parser.add_argument_group("Half-precision training (bfloat16)")
138+
p.add_argument("--bfloat16", dest="bfloat16", action="store_true",
139139
default=False,
140-
help="""Whether to train in 16-bit bf16 mode. Mutually
140+
help="""Whether to train in 16-bit bfloat16 mode. Mutually
141141
exclusive with --amp and --fp16. Requires hardware
142142
support""")
143143

@@ -258,8 +258,8 @@
258258
d["scheduler"] = scheduler
259259

260260
# 16-bit training
261-
if(sum([args.amp, args.fp16, args.bf16]) > 1):
262-
raise ValueError("Only one of --fp16, --amp, or --bf16 can be enabled")
261+
if(sum([args.amp, args.fp16, args.bfloat16]) > 1):
262+
raise ValueError("Only one of --fp16, --amp, or --bfloat16 can be enabled")
263263

264264
if(args.amp):
265265
amp = {}
@@ -270,10 +270,10 @@
270270
fp16 = {}
271271
fp16["enabled"] = args.fp16
272272
d["fp16"] = fp16
273-
elif(args.bf16):
274-
bf16 = {}
275-
bf16["enabled"] = args.bf16
276-
d["bf16"] = bf16
273+
elif(args.bfloat16):
274+
bfloat16 = {}
275+
bfloat16["enabled"] = args.bfloat16
276+
d["bfloat16"] = bfloat16
277277

278278
# Activation checkpointing
279279
ac = {}

0 commit comments

Comments
 (0)