Conversation
TobyMint
requested review from
ByronHsu,
HaiShaw,
ShangmingCai,
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
hzh0425,
ispobock,
merrymercy,
sogalin,
xiezhq-hermann and
yizhang2077
as code owners
July 14, 2026 01:54
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
TobyMint
force-pushed
the
dsv4-decode-radix-cache-mtp-support
branch
2 times, most recently
from
July 15, 2026 03:41
70dbe33 to
3e51bd4
Compare
5 tasks
TobyMint
force-pushed
the
dsv4-decode-radix-cache-mtp-support
branch
from
July 24, 2026 10:45
3e51bd4 to
82c284d
Compare
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
…free, full match Co-authored-by: zhangxiaolei <zhangxiaolei123456@users.noreply.github.com>
…le_piecewise_cuda_graph attribute
…urns prompt snapshot
Match the radix-cache eviction margin: keep enough SWA before the page-aligned insert boundary for the cached key to contain a complete window. `seq_len - 1` is the last committed position. Backport of sgl-project#27770 commit 0bca294.
- Add _release_matched_prefix_lock: unified lock release with swa_prefix_lock_released tracking to avoid double-freeing SWA locks - Add _reclaim_swa_tail_capacity: proactively evict SWA cache entries before allocation to avoid unnecessary admission failures - Call dec_swa_lock_only after prefix match: retain only full-attention lock when decode will transfer fresh SWA tail - Replace inline dec_lock_ref calls with _release_matched_prefix_lock - Recalculate swa_allocatable_tokens via _swa_tail_allocatable_token_budget instead of simple decrement to account for page rounding and eviction - Count swa_evictable_size in SWA admission budget - Hoist uses_swa_tail/swa_tail_len in _pre_alloc and reclaim SWA capacity - Fix resume_retracted_reqs to recalculate SWA budget Backport of sgl-project#27770 commit 6543121.
- test_swa_tail_len_keeps_page_aligned_matchable_window: verify the insertion margin keeps a full SWA window inside the cached key - test_swa_admission_counts_evictable_capacity: SWA budget includes evictable radix-cache entries - test_reclaim_swa_tail_capacity_page_rounds: page-rounding in SWA capacity reclaim triggers correct eviction - test_reclaim_swa_tail_capacity_fails_before_allocation: RuntimeError when SWA eviction cannot satisfy the required capacity - Update test_pop_preallocated_rechecks_budget_after_lock for new dec_swa_lock_only + swa_prefix_lock_released flow - Add swa_available_size mock in test_hisparse_allocator Backport of sgl-project#27770 commits 0bca294 and 6543121.
_uses_dsv4_decode_radix_cache() already guarantees the pool is a DeepSeekV4TokenToKVPool, so compression_ratios always exists. Drop the getattr fallback to fail fast instead of silently degrading to an empty list.
page_size, is_eagle (BasePrefixCache) and cache_protected_len, swa_evicted_seqlen (Req) are always-initialized standard attributes. Drop getattr fallbacks in _maybe_insert_dsv4_decode_radix_prompt so real init bugs surface instead of silently using defaults. force_radix_leaf_creation stays getattr'd: it is a runtime-armed flag that only DS-V4 donation sets, so it is legitimately absent on most reqs.
TobyMint
force-pushed
the
dsv4-decode-radix-cache-mtp-support
branch
from
July 27, 2026 03:53
82c284d to
0539913
Compare
41 tasks
|
@TobyMint hello, can this support Dspark? |
5 tasks
lizhigong1988
pushed a commit
to HYGON-AI/sglang-das
that referenced
this pull request
Aug 27, 2026
…ject/sglang#31097; 2. SGLANG_ENABLE_UNIFIED_RADIX_TREE=1 & SGLANG_ENABLE_UNIFIED_RADIX_TREE=1 & --disaggregation-decode-enable-radix-cache should be enable in D
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.
Motivation
PR #27770 (by Ishan Dhanani) added device-only SWA decode radix cache support on the unified radix tree, but explicitly blocked DeepSeek-V4 due to its C128 compression and DSA indexer specifics. This PR removes that guard and adds full DeepSeek-V4 decode radix cache support by porting zhangxiaolei's DS-V4 patch series to the upstream API.
Co-authored-by: zhangxiaolei zhangxiaolei123456@users.noreply.github.com
Accuracy Tests
MMLU (200 examples) on DeepSeek-V4-Flash with decode radix cache enabled:
Speed Tests
Shared-prefix benchmark (256 requests, 8 groups, 8192-token system prompts) on 8x NVIDIA H20 (PD disaggregation, NIXL transfer):
Checklist
CI States
Latest PR Test (Base): ❌ Run #30235651399
Latest PR Test (Extra): ❌ Run #30235651325