transformers: Add eager attention option to make Gemma-2 work properly (#6188)

This commit is contained in:
GralchemOz 2024-07-01 23:08:08 +08:00 committed by GitHub
parent 19a56dd538
commit 8a39f579d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 0 deletions

View file

@ -106,6 +106,7 @@ group.add_argument('--trust-remote-code', action='store_true', help='Set trust_r
group.add_argument('--force-safetensors', action='store_true', help='Set use_safetensors=True while loading the model. This prevents arbitrary code execution.')
group.add_argument('--no_use_fast', action='store_true', help='Set use_fast=False while loading the tokenizer (it\'s True by default). Use this if you have any problems related to use_fast.')
group.add_argument('--use_flash_attention_2', action='store_true', help='Set use_flash_attention_2=True while loading the model.')
group.add_argument('--use_eager_attention', action='store_true', help='Set attn_implementation= eager while loading the model.')
# bitsandbytes 4-bit
group = parser.add_argument_group('bitsandbytes 4-bit')