Angainor Development commited on
Commit
a808bf9
·
unverified ·
1 Parent(s): 79e2a6f

Fix missing cfg.

Browse files
Files changed (1) hide show
  1. src/axolotl/utils/models.py +1 -1
src/axolotl/utils/models.py CHANGED
@@ -96,7 +96,7 @@ def load_model(
96
  )
97
 
98
  if cfg.is_llama_derived_model and cfg.flash_attention:
99
- if cfg.device not in ["mps", "cpu"] and inference is False:
100
  from axolotl.flash_attn import replace_llama_attn_with_flash_attn
101
 
102
  logging.info("patching with flash attention")
 
96
  )
97
 
98
  if cfg.is_llama_derived_model and cfg.flash_attention:
99
+ if cfg.device not in ["mps", "cpu"] and not cfg.inference:
100
  from axolotl.flash_attn import replace_llama_attn_with_flash_attn
101
 
102
  logging.info("patching with flash attention")