feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang#51
Draft
stmatengss with Copilot wants to merge 1 commit into
Draft
feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang#51stmatengss with Copilot wants to merge 1 commit into
stmatengss with Copilot wants to merge 1 commit into
Conversation
…ang1573/sglang Port all 11 commits from magicYang1573/sglang unified-sparse-kv branch: - Add KSE module: python/sglang/srt/layers/kse/ (config, controller, registry, types, base_adapter, base_policy, policies/quest, policies/streaming_llm, adapters/triton, adapters/flashattention, adapters/flashinfer) - Add KSE hooks to base_attn_backend.py (before/after_attention per layer) - Add KSE controller init to model_runner.py (init_kse_controller, before_forward, after_prefill hooks) - Add kse_controller field to ForwardBatch and propagate from model_runner - Add KSE server args (--enable-kse, --kse-policy, --kse-page-size, etc.) - Add documentation: docs/advanced_features/kv_cache_sparsity_engine*.md - Add tests: test/srt/kse/ Agent-Logs-Url: https://github.com/kvcache-ai/sglang/sessions/d21eb0eb-ea4f-4919-a371-975156c04e01 Co-authored-by: stmatengss <[email protected]>
Copilot created this pull request from a session on behalf of
stmatengss
May 26, 2026 08:12
View session
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.
python/sglang/srt/layers/attention/base_attn_backend.pypython/sglang/srt/model_executor/forward_batch_info.pypython/sglang/srt/model_executor/model_runner.pypython/sglang/srt/server_args.py