Skip to content

Commit

Permalink
Flash attn hotfix (#951)
Browse files Browse the repository at this point in the history
* use previous  arg

* use eager to use legacy attention that can be patched
  • Loading branch information
winglian committed Dec 13, 2023
1 parent 450e04d commit f1f60cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ def load_model(
model_config._attn_implementation = ( # pylint: disable=protected-access
"flash_attention_2"
)
else:
model_config._attn_implementation = ( # pylint: disable=protected-access
"eager"
)

try:
if cfg.is_llama_derived_model and not cfg.trust_remote_code and not cfg.gptq:
Expand Down

0 comments on commit f1f60cb

Please sign in to comment.