From b9c1b45a0f2de7637e23bccd206f91d5ad88f9be Mon Sep 17 00:00:00 2001 From: Aman Gupta Karmani Date: Mon, 4 Sep 2023 17:43:52 -0400 Subject: [PATCH] log when xentropy is not found --- src/axolotl/monkeypatch/llama_attn_hijack_flash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/axolotl/monkeypatch/llama_attn_hijack_flash.py b/src/axolotl/monkeypatch/llama_attn_hijack_flash.py index 33de909719..7114d1d638 100644 --- a/src/axolotl/monkeypatch/llama_attn_hijack_flash.py +++ b/src/axolotl/monkeypatch/llama_attn_hijack_flash.py @@ -57,7 +57,7 @@ def replace_llama_attn_with_flash_attn(packed: Optional[bool] = False): CrossEntropyLoss, inplace_backward=True ) except ImportError: - pass + LOG.info("optimized flash-attention CrossEntropyLoss not found (run `pip install git+https://github.com/Dao-AILab/flash-attention.git#egg=xentropy_cuda_lib&subdirectory=csrc/xentropy`)" # Disable the transformation of the attention mask in LlamaModel as the flash attention