feat(server): support KV Flash with same-backend target layer split#391
Open
weicj wants to merge 2 commits into
Open
feat(server): support KV Flash with same-backend target layer split#391weicj wants to merge 2 commits into
weicj wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
3 issues found across 20 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends KV Flash bounded KV residency to same-backend target layer split, so split targets can use a pool-sized KV cache instead of allocating full-context KV on every shard. The same-backend path is wired for Qwen35, Gemma4, and Laguna.
Changes
KvFlashPagerthrough same-backend layer-split prefill/decode paths, including Qwen35 DFlash verify.Notes
--target-devices hip:0,hip:1 --target-layer-split 1,1, andDFLASH_KVFLASH=1024; the request returned a valid OpenAI-compatible response.--target-devices hip:0,hip:1 --target-layer-split 1,1, andDFLASH_KVFLASH=512; the server auto-aligned shards to[0,14)+[14,35)and returned a valid OpenAI-compatible response.--target-devices hip:0,hip:1 --target-layer-split 1,1, andDFLASH_KVFLASH=512; the pool was raised to 768 tokens for the SWA tail requirement and the request returned a valid OpenAI-compatible response.