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

What happens to the total KV length > max-compacity length during response generation? #23

Open
PengWenChen opened this issue Oct 23, 2024 · 1 comment

Comments

@PengWenChen
Copy link

PengWenChen commented Oct 23, 2024

Hi, thanks for your great work!

It's impressive to compress the long prompt KVs into a constant length.
I'm wondering whether the scenario here also consider the case that generation responses > maximum compacity?

It always goes to ln127 only during prefilling stage, and during generation stage it always goes to ln131.
Is my understanding correct?
https://github.com/FasterDecoding/SnapKV/blob/main/snapkv/monkeypatch/mistral_hijack_4_37.py#L127-L133

@PengWenChen PengWenChen changed the title What happens to the total KV length > max-compacity length during generateion? What happens to the total KV length > max-compacity length during response generation? Oct 23, 2024
@WendyH1108
Copy link
Collaborator

Thanks for the question. Our method mainly focused on long-context sequence scenarios where input is usually much longer than output and benefited generation speed. We didn't consider the compression along generation stage. I believe other work like H2O also compress along generation.

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