mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 14:17:28 +00:00
transformers: Add eager attention option to make Gemma-2 work properly (#6188)
This commit is contained in:
parent
19a56dd538
commit
8a39f579d8
5 changed files with 7 additions and 0 deletions
|
|
@ -146,6 +146,9 @@ def huggingface_loader(model_name):
|
|||
if shared.args.force_safetensors:
|
||||
params['force_safetensors'] = True
|
||||
|
||||
if shared.args.use_eager_attention:
|
||||
params['attn_implementation'] = 'eager'
|
||||
|
||||
config = AutoConfig.from_pretrained(path_to_model, trust_remote_code=shared.args.trust_remote_code)
|
||||
|
||||
if 'chatglm' in model_name.lower():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue