Skip to content

Commit

Permalink
fix: do not apply custom patch when sample_pack off
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoCode012 authored Oct 3, 2023
1 parent 43ea936 commit 93530b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def load_model(
# Note: This might overwrite previous additional_special_tokens
tokenizer.add_special_tokens({"additional_special_tokens": [MEM_TOKEN]})

if cfg.is_mistral_derived_model and cfg.flash_attention:
if cfg.is_mistral_derived_model and cfg.flash_attention and cfg.sample_packing:
from axolotl.monkeypatch.mistral_attn_hijack_flash import (
replace_mistral_attn_with_flash_attn,
)
Expand Down

0 comments on commit 93530b2

Please sign in to comment.