---
cited_by:
  - '[[thoughts/inference/architectures#5-four-things-called-replay|README §5]]'
  - '[[thoughts/inference/architectures#6-reading-order|README §6]]'
  - '[[thoughts/inference/deepseek-v4.1-state#32-swa-bounded-replay-encoder-side-56227-scheduler|dsv41 §3.2]]'
  - '[[thoughts/inference/deepseek-v4.1-serving#4-pr-reading-order|dsv41 §4]]'
  - '[[thoughts/inference/replayssm#4-which-models-use-it|replayssm §4]]'
date: '2026-11-11'
kind: pr
local:
  - file:///Users/aarnphm/workspace/vllm/vllm/v1/core/sched/scheduler.py
  - file:///Users/aarnphm/workspace/vllm/vllm/v1/attention/backends/mla/sparse_swa.py
  - file:///Users/aarnphm/workspace/vllm/vllm/v1/attention/backends/mla/compressor_utils.py
  - file:///Users/aarnphm/workspace/vllm/vllm/v1/kv_cache_interface.py
  - file:///Users/aarnphm/workspace/vllm/vllm/v1/core/kv_cache_manager.py
merged: '2026-09-18'
number: 56227
source:
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/models/deepseek_v41/nvidia/model_state.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/v1/core/sched/scheduler.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/v1/attention/backends/mla/sparse_swa.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/v1/attention/backends/mla/compressor_utils.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/v1/kv_cache_interface.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/models/deepseek_v41/attention.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/models/deepseek_v41/common/ops/cache_utils.py
  - https://github.com/vllm-project/vllm/blob/1dc2d854c12099f1f08233c886368a8c7baf430f/vllm/v1/core/kv_cache_manager.py
state: merged
tags:
  - vllm
  - vllm-pr
  - new-architectures
title: '#56227 [Feat][Model] Support encoder-side SWA-bounded replay for DeepSeek-V4.1-Flash'
topic: new-architectures
url: https://github.com/vllm-project/vllm/pull/56227
created: '2026-11-11'
modified: '2026-11-11'
published: '2026-11-11'
pageLayout: default
slug: hinterland/papers/maps/prs/56227
permalink: https://aarnphm.xyz/hinterland/papers/maps/prs/56227.md
generator:
  quartz: v4.6.0
  hostedProvider: Cloudflare
  baseUrl: aarnphm.xyz
full: https://aarnphm.xyz/llms-full.txt
---
DeepSeek-V4.1 keeps a 128-token sliding-window (SWA) KV cache per layer beside its prefix-cacheable compressed MLA and indexer caches. Storing that window for prefix caching and KV connectors costs more than it saves, so this implements… · full dump: [[thoughts/inference/vllm-prs/56227|#56227]]

