made a small change to a warning about fa2 for gemma2 models.
This commit is contained in:
parent
6b62550af1
commit
94ee105526
|
@ -37,7 +37,10 @@ def configure_attn_implementation(
|
||||||
if is_flash_attn_2_available():
|
if is_flash_attn_2_available():
|
||||||
require_version("transformers>=4.42.4", "To fix: pip install transformers>=4.42.4")
|
require_version("transformers>=4.42.4", "To fix: pip install transformers>=4.42.4")
|
||||||
require_version("flash_attn>=2.6.3", "To fix: pip install flash_attn>=2.6.3")
|
require_version("flash_attn>=2.6.3", "To fix: pip install flash_attn>=2.6.3")
|
||||||
|
|
||||||
|
if model_args.flash_attn != "fa2":
|
||||||
logger.warning("Gemma-2 should use flash attention 2, change `flash_attn` to fa2.")
|
logger.warning("Gemma-2 should use flash attention 2, change `flash_attn` to fa2.")
|
||||||
|
|
||||||
model_args.flash_attn = "fa2"
|
model_args.flash_attn = "fa2"
|
||||||
else:
|
else:
|
||||||
logger.warning("Gemma-2 should use eager attention, change `flash_attn` to disabled.")
|
logger.warning("Gemma-2 should use eager attention, change `flash_attn` to disabled.")
|
||||||
|
|
Loading…
Reference in New Issue