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

[Tracking Issue] Checklist for 8-bit KV-Cache improments #742

Open
5 tasks
yzh119 opened this issue Jan 17, 2025 · 0 comments
Open
5 tasks

[Tracking Issue] Checklist for 8-bit KV-Cache improments #742

yzh119 opened this issue Jan 17, 2025 · 0 comments

Comments

@yzh119
Copy link
Collaborator

yzh119 commented Jan 17, 2025

  • As discussed in How to use low bit KV Cache  #721, we should generalize tensorwise qk_scale, v_scale to headwise qk_scale and v_scale. For the original tensorwise qk_scale and v_scale scalar input, we should repeat them for all heads to get headwise scale tensors.
  • We should apply v_scale inside the kernel rather than outside (
    out *= v_scale
    ) because v might be using low-precision data types, as suggested by @nandor .
  • It's a known issue that our cuda-core based fp8 decoding kernel is slow and we should always select use_tensor_cores for 8bit KV-Cache.
  • We should also enable int-8 KV-Cache, with headwise qk_scale/v_scale, int-8 KV-Cache can also get desirable performance, and the wheel size is under control in JIT mode.
  • Support fused-quantization append_kv_cache kernels to apply quantization together with appending data to KV-Cache.
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

1 participant