[HiCache]: Support DeepSeek v32 cpu offloading#17415
[HiCache]: Support DeepSeek v32 cpu offloading#17415xiezhq-hermann merged 7 commits intosgl-project:mainfrom
Conversation
Co-authored-by: 晟海 <huangtingwei.htw@antgroup.com> Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
cc4151c to
b6688cd
Compare
Summary of ChangesHello @hzh0425, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
/tag-and-rerun-ci |
There was a problem hiding this comment.
Code Review
This pull request adds support for CPU offloading for DeepSeek v3.2 by introducing NSATokenToKVPoolHost. The changes are well-structured, with the new class inheriting from a refactored and more extensible MLATokenToKVPoolHost. The inclusion of unit tests for the new functionality is a great practice. My review includes a couple of suggestions to improve code clarity and logging verbosity.
|
@huangtingwei9988 @xiezhq-hermann could you take a review |
…hicache/support_v32_cpu
# Conflicts: # python/sglang/srt/mem_cache/hiradix_cache.py
Co-authored-by: 晟海 <huangtingwei.htw@antgroup.com>
Co-authored-by: 晟海 <huangtingwei.htw@antgroup.com>


Motivation
Recently, there have been many requests for hicache to support DeepSeek v32:
Modifications
Added NSATokenToKVPoolHost to support CPU offloading.
Storage offloading will be supported in the next pull request.
Accuracy Tests
Launch command
gsm8k test command
python benchmark/gsm8k/bench_sglang.py --port 8000 --num-questions 500 --num-shots 48 --parallel 100First Time gsm8k
Flush device cache; retain CPU cache; second run of GSM8k test results.
The second run continuously triggers CPU load; here are some logs:

Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci