Skip to content

Commit

Permalink
fix bf16 check when preprocessing data (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Jan 18, 2024
1 parent 1e56b88 commit 317fa25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/axolotl/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def validate_config(cfg):
if not cfg.bf16 and not cfg.bfloat16:
LOG.info("bf16 support detected, but not enabled for this configuration.")
else:
if not cfg.merge_lora and (cfg.bf16 or cfg.bfloat16):
if (
not cfg.merge_lora
and not cfg.is_preprocess
and (cfg.bf16 is True or cfg.bfloat16 is True)
):
raise ValueError(
"bf16 requested, but AMP is not supported on this GPU. Requires Ampere series or above."
)
Expand Down

0 comments on commit 317fa25

Please sign in to comment.