From 52852404c869d7be291b386073baca850f69aaef Mon Sep 17 00:00:00 2001 From: DarkSharpness <76582120+DarkSharpness@users.noreply.github.com> Date: Fri, 20 Feb 2026 23:20:29 +0800 Subject: [PATCH] [Fix] DO NOT skip save_kv_cache for dllm (#19020) --- python/sglang/srt/layers/attention/flashinfer_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/attention/flashinfer_backend.py b/python/sglang/srt/layers/attention/flashinfer_backend.py index 1a0127468..841fbb791 100644 --- a/python/sglang/srt/layers/attention/flashinfer_backend.py +++ b/python/sglang/srt/layers/attention/flashinfer_backend.py @@ -812,7 +812,7 @@ class FlashInferAttnBackend(AttentionBackend): or layer.attn_type == AttentionType.ENCODER_ONLY ): causal = False - if save_kv_cache and layer.attn_type == AttentionType.ENCODER_ONLY: + if not self.is_dllm_model and layer.attn_type == AttentionType.ENCODER_ONLY: save_kv_cache = False if self.forward_metadata.extend_no_prefix: