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

Open
opened 2026-10-29 21:06:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/sglang/pull/51
Author: @Copilot
Created: 5/26/2026
Status: 🔄 Open

Base: main ← Head: copilot/move-unified-sparse-kv


📝 Commits (1)

  • 6467cf5 feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang

📊 Changes

31 files changed (+5215 additions, -1 deletions)

View changed files

➕ docs/advanced_features/kv_cache_sparsity_engine-zh.md (+909 -0)
➕ docs/advanced_features/kv_cache_sparsity_engine.md (+867 -0)
📝 python/sglang/srt/layers/attention/base_attn_backend.py (+14 -1)
➕ python/sglang/srt/layers/kse/README.md (+313 -0)
➕ python/sglang/srt/layers/kse/__init__.py (+35 -0)
➕ python/sglang/srt/layers/kse/adapters/__init__.py (+8 -0)
➕ python/sglang/srt/layers/kse/adapters/flashattention_adapter.py (+130 -0)
➕ python/sglang/srt/layers/kse/adapters/flashinfer_adapter.py (+167 -0)
➕ python/sglang/srt/layers/kse/adapters/triton_adapter.py (+113 -0)
➕ python/sglang/srt/layers/kse/base_adapter.py (+50 -0)
➕ python/sglang/srt/layers/kse/base_policy.py (+93 -0)
➕ python/sglang/srt/layers/kse/config.py (+18 -0)
➕ python/sglang/srt/layers/kse/controller.py (+251 -0)
➕ python/sglang/srt/layers/kse/policies/__init__.py (+7 -0)
➕ python/sglang/srt/layers/kse/policies/quest.py (+258 -0)
➕ python/sglang/srt/layers/kse/policies/streaming_llm.py (+107 -0)
➕ python/sglang/srt/layers/kse/registry.py (+71 -0)
➕ python/sglang/srt/layers/kse/types.py (+48 -0)
📝 python/sglang/srt/model_executor/forward_batch_info.py (+5 -0)
📝 python/sglang/srt/model_executor/model_runner.py (+65 -0)

...and 11 more files

📄 Description

  • 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 #51

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/sglang/pull/51 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 5/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `copilot/move-unified-sparse-kv` --- ### 📝 Commits (1) - [`6467cf5`](https://github.com/kvcache-ai/sglang/commit/6467cf5b244b46751629a2dea6595c3a200518ee) feat(kse): port unified-sparse-kv KVCache Sparsity Engine from magicYang1573/sglang ### 📊 Changes **31 files changed** (+5215 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `docs/advanced_features/kv_cache_sparsity_engine-zh.md` (+909 -0) ➕ `docs/advanced_features/kv_cache_sparsity_engine.md` (+867 -0) 📝 `python/sglang/srt/layers/attention/base_attn_backend.py` (+14 -1) ➕ `python/sglang/srt/layers/kse/README.md` (+313 -0) ➕ `python/sglang/srt/layers/kse/__init__.py` (+35 -0) ➕ `python/sglang/srt/layers/kse/adapters/__init__.py` (+8 -0) ➕ `python/sglang/srt/layers/kse/adapters/flashattention_adapter.py` (+130 -0) ➕ `python/sglang/srt/layers/kse/adapters/flashinfer_adapter.py` (+167 -0) ➕ `python/sglang/srt/layers/kse/adapters/triton_adapter.py` (+113 -0) ➕ `python/sglang/srt/layers/kse/base_adapter.py` (+50 -0) ➕ `python/sglang/srt/layers/kse/base_policy.py` (+93 -0) ➕ `python/sglang/srt/layers/kse/config.py` (+18 -0) ➕ `python/sglang/srt/layers/kse/controller.py` (+251 -0) ➕ `python/sglang/srt/layers/kse/policies/__init__.py` (+7 -0) ➕ `python/sglang/srt/layers/kse/policies/quest.py` (+258 -0) ➕ `python/sglang/srt/layers/kse/policies/streaming_llm.py` (+107 -0) ➕ `python/sglang/srt/layers/kse/registry.py` (+71 -0) ➕ `python/sglang/srt/layers/kse/types.py` (+48 -0) 📝 `python/sglang/srt/model_executor/forward_batch_info.py` (+5 -0) 📝 `python/sglang/srt/model_executor/model_runner.py` (+65 -0) _...and 11 more files_ </details> ### 📄 Description - [x] Explore source branch (magicYang1573/sglang unified-sparse-kv) - [x] Identify 11 unique KSE commits and changed files - [x] Copy all new KSE files (docs, python module, tests) - [x] Apply modifications to existing files: - [x] `python/sglang/srt/layers/attention/base_attn_backend.py` - [x] `python/sglang/srt/model_executor/forward_batch_info.py` - [x] `python/sglang/srt/model_executor/model_runner.py` - [x] `python/sglang/srt/server_args.py` - [x] Run validation (CodeQL: 0 alerts) - [x] Create PR #51 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/sglang#51
No description provided.