Anima icon indicating copy to clipboard operation
Anima copied to clipboard

attn impl to sdpa...

Open saa1028 opened this issue 5 months ago • 4 comments

new version of transfomer, no need to use BetterTransformer, try setting attn impl to sdpa... attn imp: <class 'transformers.models.llama.modeling_llama.LlamaSdpaAttention'>

saa1028 avatar Jan 24 '24 03:01 saa1028

I have the same issue

profintegra avatar Feb 01 '24 21:02 profintegra

Solution: in your python code, insert line: model.tokenizer.pad_token = model.tokenizer.eos_token before this line: input_tokens = model.tokenizer(input_text, ......

profintegra avatar Feb 01 '24 21:02 profintegra

I have same problem. Any updates on this?

ahmedbr avatar Feb 21 '24 08:02 ahmedbr

这个不是问题,和这里有关系max_new_tokens=20,如果是20,就要跑20次,如果是200,就要跑200次。。。 有点慢

leedahae340 avatar May 07 '24 08:05 leedahae340