winglian commited on
Commit
317fa25
1 Parent(s): 1e56b88

fix bf16 check when preprocessing data (#1140)

Browse files
Files changed (1) hide show
  1. src/axolotl/utils/config.py +5 -1
src/axolotl/utils/config.py CHANGED
@@ -182,7 +182,11 @@ def validate_config(cfg):
182
  if not cfg.bf16 and not cfg.bfloat16:
183
  LOG.info("bf16 support detected, but not enabled for this configuration.")
184
  else:
185
- if not cfg.merge_lora and (cfg.bf16 or cfg.bfloat16):
 
 
 
 
186
  raise ValueError(
187
  "bf16 requested, but AMP is not supported on this GPU. Requires Ampere series or above."
188
  )
 
182
  if not cfg.bf16 and not cfg.bfloat16:
183
  LOG.info("bf16 support detected, but not enabled for this configuration.")
184
  else:
185
+ if (
186
+ not cfg.merge_lora
187
+ and not cfg.is_preprocess
188
+ and (cfg.bf16 is True or cfg.bfloat16 is True)
189
+ ):
190
  raise ValueError(
191
  "bf16 requested, but AMP is not supported on this GPU. Requires Ampere series or above."
192
  )