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

Is it possible to further improve the accuracy if k v are constants ? #108

Open
Zeqiang-Lai opened this issue Feb 14, 2025 · 3 comments
Open

Comments

@Zeqiang-Lai
Copy link

No description provided.

@jason-huang03
Copy link
Member

@Zeqiang-Lai What do you mean by kv to be constant? Can you show an example?

@Zeqiang-Lai
Copy link
Author

I have a network that calls a cross attention multiple times with different queries but the same k, v.

k, v = ...
for chunk_q in q:
   attention(chunk_q,k,v)

@jason-huang03
Copy link
Member

I think the speed can be faster (quantize k and v only once) but the accuracy cannot be improved.

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

2 participants