Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/sglang/srt/mem_cache/unified_radix_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,12 @@ def cache_unfinished_req(self, req: Req, chunked: bool = False, **kwargs) -> Non
if cl is not None:
effective_cache_len = min(effective_cache_len, cl)

if envs.SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS.get():
# swa_evicted_seqlen is a raw-token length, but under EAGLE the insert key is
# bigram-indexed, so SWA would carve tombstones at the wrong offset (#34653).
if (
envs.SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS.get()
and not self.tree_core.is_eagle
):
for comp in self._components_tuple:
comp.free_out_of_window_slots(
req, effective_cache_len - 1, insert_params
Expand Down
Loading