Angainor Development
commited on
Fix missing cfg.
Browse files
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
|
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")
|