fix fp16 / bf16 reset when using fp16 with bf16 auto

This commit is contained in:
Wing Lian
2025-05-03 18:34:39 -04:00
parent 52cab2aa5b
commit 372fd08548

View File

@@ -70,6 +70,9 @@ def resolve_dtype(cfg):
if cfg.fp16 is None and not cfg.float16:
cfg.fp16 = True
if cfg.fp16 and cfg.bf16 == "auto":
cfg.bf16 = False
if cfg.device == "mps":
cfg.load_in_8bit = False
cfg.tf32 = False