Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attn impl to sdpa... #107

Open
saa1028 opened this issue Jan 24, 2024 · 4 comments
Open

attn impl to sdpa... #107

saa1028 opened this issue Jan 24, 2024 · 4 comments

Comments

@saa1028
Copy link

saa1028 commented Jan 24, 2024

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

@profintegra
Copy link

I have the same issue

@profintegra
Copy link

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

@ahmedbr
Copy link

ahmedbr commented Feb 21, 2024

I have same problem. Any updates on this?

@leedahae340
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants