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

[Feat]: quantized KV cache and flash attention #79

Open
mseri opened this issue Nov 3, 2024 · 0 comments
Open

[Feat]: quantized KV cache and flash attention #79

mseri opened this issue Nov 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mseri
Copy link

mseri commented Nov 3, 2024

Description
Flash attention and quantized kv stores are both supported by llama.cpp.

These features allow for much larger contexts with drastically reduced memory footprints. These could be quite convenient for the limited resources on the phone.

Quantized kv cache, with q8, means half of the memory for the context with barely any effect on the quality (q4 is 1/4 memory but you notice degradation in my tests).

The feature could be implemented adding two optional parameters: a checkbox for flash attention (required for the KV quantization) and a dropdown to select a quantization for both the k and v store, f16 — (current) default, f8 and f4.

@mseri mseri added the enhancement New feature or request label Nov 3, 2024
@mseri mseri changed the title [Feat]: quantized KV cache and/or flash attention [Feat]: quantized KV cache and flash attention Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant