Commit f362ebff authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Undo DeepSpeed config change

parent 16e0082f
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"enabled": false, "enabled": false,
"opt_level": "O2" "opt_level": "O2"
}, },
"bf16": { "bfloat16": {
"enabled": true "enabled": true
}, },
"zero_optimization": { "zero_optimization": {
......
...@@ -134,10 +134,10 @@ p.add_argument("--fp16", dest="fp16", action="store_true", default=False, ...@@ -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. help="""Whether to train in 16-bit/mixed-precision mode.
Mutually exclusive with --amp""") Mutually exclusive with --amp""")
p = parser.add_argument_group("Half-precision training (bf16)") p = parser.add_argument_group("Half-precision training (bfloat16)")
p.add_argument("--bf16", dest="bf16", action="store_true", p.add_argument("--bfloat16", dest="bfloat16", action="store_true",
default=False, default=False,
help="""Whether to train in 16-bit bf16 mode. Mutually help="""Whether to train in 16-bit bfloat16 mode. Mutually
exclusive with --amp and --fp16. Requires hardware exclusive with --amp and --fp16. Requires hardware
support""") support""")
...@@ -258,8 +258,8 @@ if(args.scheduler is not None): ...@@ -258,8 +258,8 @@ if(args.scheduler is not None):
d["scheduler"] = scheduler d["scheduler"] = scheduler
# 16-bit training # 16-bit training
if(sum([args.amp, args.fp16, args.bf16]) > 1): if(sum([args.amp, args.fp16, args.bfloat16]) > 1):
raise ValueError("Only one of --fp16, --amp, or --bf16 can be enabled") raise ValueError("Only one of --fp16, --amp, or --bfloat16 can be enabled")
if(args.amp): if(args.amp):
amp = {} amp = {}
...@@ -270,10 +270,10 @@ elif(args.fp16): ...@@ -270,10 +270,10 @@ elif(args.fp16):
fp16 = {} fp16 = {}
fp16["enabled"] = args.fp16 fp16["enabled"] = args.fp16
d["fp16"] = fp16 d["fp16"] = fp16
elif(args.bf16): elif(args.bfloat16):
bf16 = {} bfloat16 = {}
bf16["enabled"] = args.bf16 bfloat16["enabled"] = args.bfloat16
d["bf16"] = bf16 d["bfloat16"] = bfloat16
# Activation checkpointing # Activation checkpointing
ac = {} ac = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment