Skip to content

feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang#51

Draft
stmatengss with Copilot wants to merge 1 commit into
mainfrom
copilot/move-unified-sparse-kv
Draft

feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang#51
stmatengss with Copilot wants to merge 1 commit into
mainfrom
copilot/move-unified-sparse-kv

Conversation

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
  • Explore source branch (magicYang1573/sglang unified-sparse-kv)
  • Identify 11 unique KSE commits and changed files
  • Copy all new KSE files (docs, python module, tests)
  • Apply modifications to existing files:
    • python/sglang/srt/layers/attention/base_attn_backend.py
    • python/sglang/srt/model_executor/forward_batch_info.py
    • python/sglang/srt/model_executor/model_runner.py
    • python/sglang/srt/server_args.py
  • Run validation (CodeQL: 0 alerts)
  • Create PR feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang #51

…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]>
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

Successfully merging this pull request may close these issues.

2 participants