-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add KV-Cache int8 quant support #10354
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Yanyun Duan <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
This pull request has merge conflicts that must be resolved before it can be |
Would it be viable to hasten the review process? |
Add KV-Cache int8 quant support
Support
[layer_level]
and[group_level]
KV-Cache int8 quant.[layer_level]
use common scale factors for each layer.[group_level]
group the head_size according to group_size, with each group_size, the scaling factor of key/value corresponding to the same value.KV-Cache int8 quant (Click to Expand)
Get the scaling factor by calibration
Support to calibrate the KV-cache by datasets:
[examples/int8/calibrate.py]
calibrate and save to pth.[export_kv_params.py]
save scaling factors to json.Using KV-Cache int8