{
  "source_file": "0930",
  "source_platform": "Ghost",
  "author": "Louis-François Bouchard / What's AI",
  "title_listed": "DeepSeek V4.1 Flash: Smaller KV Cache, Cheaper Writing Drafts",
  "keywords": "",
  "domain": "大模型算法",
  "content_type": "深度技术解析",
  "is_paid_flag": "否",
  "url": "https://www.louisbouchard.ai/deepseek-v41-flash-kv-cache-writing-benchmark/",
  "publish_date": "2026-09",
  "corpus_stage": "",
  "notes": "",
  "id": "3ac6bd5dc190",
  "collected_at": "2026-10-02T12:28:19",
  "title": "DeepSeek V4.1 Flash: Smaller KV Cache, Cheaper Writing Drafts",
  "body_markdown": "The short version\nDeepSeek V4.1 Flash combines a causal encoder-decoder, shared sparse attention state, FP4 main KV caching, and bounded replay to reduce inference overhead.\nOur writing snapshot makes default effort a promising low-cost drafting option, with limits on ranking and cost comparisons.\nV4.1’s global KV cache is about one quarter of V4 Flash’s; this is not total model memory.\nDefault effort averaged 43 seconds and $0.007744 per writing draft in our September 10 snapshot.\nCompare usable output and editing time on your own evaluations before paying for more reasoning.\nDeepSeek V4.1 Flash averaged 43 seconds and less than a cent per script draft in our writing benchmark. That is the result that changed my shortlist for writing at scale. The paper explains why the model deserves attention from engineers building long-running agents, too.\nIts backbone has 552 billion parameters, almost twice V4 Flash’s 284 billion. Yet its global KV cache uses about a quarter of the memory per token. The team made a larger model and reduced one of the costs that grows with the conversation.\nI’m Louis-François, CTO and co-founder of Towards AI. We turn engineers into AI engineers who build and ship AI products. Our new book,\nAI Engineering For Production\n, launches November 10, 2026. This model is a useful case study in the kind of tradeoffs those products require.\nWhy the cache matters for agents\nAn agent adds tool calls, results, and messages to its conversation. The next request needs that history. A reusable prefix cache can avoid recomputing attention state for the unchanged part, although providers may still charge for cached input. The remaining suffix still needs processing.\nThe KV cache stores keys and values used by attention. It lets a model reuse earlier computation while generating new tokens. It is one part of inference memory, alongside model weights and other working state. It does not contain everything the model knows or explain how it understands language.\nLong contexts make this cache expensive to store and move. DeepSeek V4.1 targets that pressure with three related changes: less prompt computation, more sharing of global attention state, and fewer persistent local snapshots. The details come from DeepSeek’s technical report, especially sections 2.2, 2.3, and 3.2.1–3.2.2.\nRead the report\n.\nWhat actually changed over V4 Flash\nV4 Flash already used compressed sparse attention. Encoder-decoder architectures and cross-layer cache reuse also have prior research behind them. V4.1’s contribution is the particular design and deployment strategy described in this report.\nMechanism\nWhat V4.1 changes\nPrompt processing\nA causal encoder-decoder split lets most prompt tokens traverse only the encoder stack.\nAttention state\nCSA2 shares more global KV state and indexing work across layers.\nCache precision\nThe main global KV cache moves from FP8 to FP4. V4’s indexer already used FP4.\nPersistent storage\nBounded replay reconstructs local attention state instead of retaining all local snapshots long term.\nProcess most of the prompt through 20 layers\nThe network has 20 encoder layers and 20 decoder layers. The decoder derives its global keys and values from the encoder’s final output, rather than requiring each prompt token to traverse all decoder layers to build that global state. It still needs layer-specific local attention state, rebuilt by replaying a 128-token window.\nThat is why the model activates about 8 billion parameters during prefill and 16 billion during generation. The nearly halved prefill computation refers to avoiding most decoder processing within this architecture. It is not a measured promise that every request takes half as long as V4 Flash.\nThe report cites earlier work including\nYOCO\n. V4.1 introduces this arrangement relative to V4 Flash while building on earlier encoder-decoder and cache-sharing research.\nThe report’s architecture diagram, shown at 05:35 in the source video.\nShare the cache and the search work\nIn the reported configuration, four of the 40 layers create fresh global KV state. Most other layers reuse it; the first two layers use only sliding-window attention. CSA2 also shares some indexer state and selected positions across layers.\nCSA2 operating modes, shown at 06:33 in the source video.\nSparse attention selects 512 global entries alongside a local 128-token window. The decoder’s first global indexing layer scans the visible context and creates a candidate pool of up to 16,384 positions. Later indexing layers search that pool, while some layers reuse a previous selection. This reduces repeated search work. The first scan still depends on context length.\nThe main KV cache also moves from FP8 to FP4, with overhead for quantization scales. Together, these changes bring global cache storage from 3,514 to 890 bytes per token. A million-token global cache is about 0.89 GB. That number excludes the model weights and other memory needed to run it.\nHierarchical sparse indexing, shown at 07:25 in the source video.\nRebuild local state when needed\nV4.1’s deployment strategy avoids keeping all per-layer sliding-window snapshots long term. Encoder snapshots can live briefly in host memory for active sessions. When needed state is absent, bounded replay reconstructs an approximation using a short cached suffix. Decoder sliding-window state is rebuilt during prefill rather than kept in the prefix cache.\nThe approximation matters. Replaying 128 tokens does not reconstruct every layer’s exact original state. DeepSeek reports negligible quality impact in its testing and acknowledges possible edge cases, without publishing a dedicated numerical ablation for this approximation.\nCombined with the smaller global cache, the deployment analysis reports roughly one eighth of V4 Flash’s persistent KV footprint. That is a cache-storage result. Application cost still depends on the workload, provider, cache hits, and generated tokens.\nWhere performance still has limits\nV4.1 Flash supports image and text input, text output, and contexts up to one million tokens. The report lists a 552B backbone plus a separate 196B Engram parameter component. Its mixture-of-experts design activates a small part of the backbone for each token.\nThe paper’s agentic results are strong on several suites. DeepSWE rises from 54.4 for V4 Flash to 74.2 for V4.1 Flash, a 19.8 percentage-point improvement. Opus 5 scores 74.0 and GPT-5.6 Sol 73.0 in that table. But Terminal-Bench 4.0 shows a clear gap: 31.2 for V4.1, versus 51.8 for Opus 5 and 39.9 for Sol. These are reported evaluations under the paper’s setup, not a guarantee for your agent.\nThe paper also estimates how decoding computation grows with context length. It shows roughly 25% more precision-weighted FLOPs per decoded token at a million-token context than at 4K. That is an engineering result about computation, not a latency or API-price measurement.\nThe report’s decode-compute curve, shown at 09:15. FLOPs describe computation, not API prices or measured latency.\nWhat our writing benchmark measured\nOur September 10 snapshot covers 148 model configurations, 10 writing tasks, and five drafts per configuration per task. Three model judges score anonymized drafts against the same detailed editorial rubric. The benchmark asks whether a model can follow the instructions and write educational scripts in our voice. It does not measure every kind of writing.\nModel and setting\nRubric score / 100\nAverage USD per draft\nAverage seconds\nDeepSeek V4.1 Flash, default\n87.13\n$0.0077\n43.1\nDeepSeek V4.1 Flash, max\n86.75\n$0.0124\n74.6\nKimi K3\n88.19\n$0.2598\n234.3\nClaude Opus 5, max\n88.76\n$0.2927\n131.7\nClaude Fable 5.1, max\n89.71\n$3.1525\n622.5\nRegenerated from the September 10 benchmark snapshot. Exact values appear in the table above.\nCosts are the repository’s token-based averages. DeepSeek and Kimi use recorded OpenRouter usage; Claude Code runs use measured output with API-equivalent pricing, not subscription charges. Timings include provider and harness differences. These numbers describe that snapshot, not a standing price quote.\nFor this comparison, I regrouped the snapshot to keep the highest-Elo configuration of each model, including ultra. DeepSeek places seventh in that view. Its max and default entries rank 22nd and 24th among all 148 configurations. Elo is computed from task-level comparisons, so its order can differ from the average rubric score. Nearby positions have overlapping confidence intervals.\nThat is why I would not turn a close score into “matches Fable.” Fable still leads this board. DeepSeek offers a useful cost tradeoff for drafts a person will edit.\nStart with high, then test max\nDeepSeek’s API exposes low, high, and max reasoning effort, with high as the default.\nThe thinking-mode documentation\ndescribes the mapping.\nIn our writing test, max cost about 60% more and took about 73% longer than default. Their Elo confidence intervals overlap, so the result does not establish a quality advantage for max or prove the settings equivalent. Two max drafts also hit the original 32K output cap. Extra reasoning consumes output budget that may be needed for the script itself.\nMeasured averages and 95% bootstrap Elo intervals for the two effort settings.\nFor outlines and first drafts, I would start at high and measure the editing still required. If max consistently reduces that work on your own tasks, the extra time and tokens may be worth it. The paper’s effort curves concern its own evaluation mix; our writing result should not be generalized to difficult reasoning tasks.\nBefore using it in an application\nWe switched our academy’s AI Tutor to V4.1 after running our own evaluations and tests. That is the process I would repeat for another product: test the task, measure failures and editing, then compare cost and latency.\nFor existing Pro users, DeepSeek announced that\ndeepseek-v4-pro\nrequests will route to V4.1 Flash from September 14, 2026, at 04:00 UTC, until V4.1 Pro launches. An alias is not a guarantee of an unchanged model. Check your provider’s versioning options and rerun evaluations before relying on the migration.\nOfficial API release notice\n.\nThe model’s strongest case in my writing workflow is a low-cost first pass. When the words are the final product, I still care about the quality gap and the time I spend correcting it. The useful number is how much work the finished draft saves me.\nFAQ\nWhat is new in DeepSeek V4.1 Flash?\nRelative to V4 Flash, the report introduces a causal encoder-decoder design, CSA2 cache and indexing reuse, FP4 for the main global KV cache, and bounded replay for local attention state. Sparse attention and encoder-decoder research predate this model.\nDoes DeepSeek V4.1 Flash fit in 1 GB of memory?\nNo. At 890 bytes per token, a million-token global KV cache is about 0.89 GB. That excludes the model weights, local state, and other memory required for inference.\nShould I use high or max reasoning effort?\nHigh is the API default. In our September 10 writing test, default and max had overlapping Elo confidence intervals, while max cost about 60% more and took about 73% longer. Test the settings on your own tasks before choosing.\nHow much did DeepSeek V4.1 Flash cost per script?\nDefault averaged $0.007744 per draft and max $0.012425 in the benchmark snapshot. These are token-based costs for the tested provider and rates, not guaranteed prices for every script or subscription charges.\nHow did DeepSeek V4.1 Flash rank in the writing benchmark?\nGrouping all effort settings under each model and keeping the highest Elo places V4.1 Flash seventh in this comparison. Its max and default configurations rank 22nd and 24th among 148 configurations. Nearby Elo confidence intervals overlap.\nIs V4.1 Flash prefill always twice as fast as V4 Flash?\nNo. The reported compute saving comes from processing most prompt tokens through the encoder without traversing the full decoder. That architectural result does not guarantee half the latency of V4 Flash for every request.",
  "metadata": {
    "title": "DeepSeek V4.1 Flash: Smaller KV Cache, Cheaper Writing Drafts",
    "description": "How DeepSeek V4.1 Flash reduces KV cache memory, what changed over V4 Flash, and what our writing benchmark measured for quality, cost, and effort.",
    "keywords": null,
    "author": "Louis-François Bouchard",
    "og:site_name": "Louis-François Bouchard, aka What's AI",
    "og:locale": "en_US",
    "og:locale:alternate": "fr_CA",
    "og:type": "article",
    "og:title": "DeepSeek V4.1 Flash: Smaller KV Cache, Cheaper Writing Drafts",
    "og:description": "How DeepSeek V4.1 Flash reduces KV cache memory, what changed over V4 Flash, and what our writing benchmark measured for quality, cost, and effort.",
    "og:url": "https://www.louisbouchard.ai/deepseek-v41-flash-kv-cache-writing-benchmark/",
    "og:image": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/global-kv-cache-01m03s.webp",
    "og:image:secure_url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/global-kv-cache-01m03s.webp",
    "og:image:alt": "Global KV cache per token falls from 3,514 bytes in V4 Flash to 890 bytes in V4.1 Flash, as shown in the technical report.",
    "twitter:card": "summary_large_image",
    "twitter:site": "@Whats_AI",
    "twitter:creator": "@Whats_AI",
    "twitter:title": "DeepSeek V4.1 Flash: Smaller KV Cache, Cheaper Writing Drafts",
    "twitter:description": "How DeepSeek V4.1 Flash reduces KV cache memory, what changed over V4 Flash, and what our writing benchmark measured for quality, cost, and effort.",
    "twitter:image": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/global-kv-cache-01m03s.webp",
    "twitter:image:alt": "Global KV cache per token falls from 3,514 bytes in V4 Flash to 890 bytes in V4.1 Flash, as shown in the technical report.",
    "article:published_time": "2026-09-13T12:00:00.000Z",
    "article:modified_time": "2026-09-13T12:00:00.000Z",
    "article:author": "Louis-François Bouchard"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/encoder-decoder-05m35s.webp",
      "bytes": 185410,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-d57a80861a3a43069508.webp",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/encoder-decoder-05m35s.webp",
      "alt": "DeepSeek V4.1 architecture with a 20-layer causal encoder, a 20-layer decoder, and a shared candidate pool.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/csa2-modes-06m33s.webp",
      "bytes": 142236,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-47a40490a5fbb3a51962.webp",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/csa2-modes-06m33s.webp",
      "alt": "CSA2 Full, Reindex, and Reuse modes show which global KV state and selected positions are recomputed or reused.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/sparse-indexer-07m25s.webp",
      "bytes": 166264,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-469265fa2942a7e4f1c6.webp",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/sparse-indexer-07m25s.webp",
      "alt": "The hierarchical indexer scans the context once to create a shared candidate pool, then later layers select within that pool.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/decode-flops-09m15s.webp",
      "bytes": 37270,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-adfad1276729f4bad0af.webp",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/decode-flops-09m15s.webp",
      "alt": "Precision-weighted single-token decode FLOPs across context lengths for DeepSeek V1, V3.2, V4 Flash, and V4.1 Flash.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/01-writing-cost-comparison.png",
      "bytes": 195741,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-2e872870f71eaa5489a0.png",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/01-writing-cost-comparison.png",
      "alt": "Writing benchmark table comparing average rubric scores, token-based cost and time for DeepSeek V4.1, Kimi K3, Opus 5 and Fable 5.1.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/02-high-versus-max.png",
      "bytes": 181983,
      "reused": false,
      "local_path": "attachments/3ac6bd5dc190/images/body-0cdfae9a89a1deb9a394.png",
      "src": "https://www.louisbouchard.ai/media/posts/deepseek-v41-flash-kv-cache-writing-benchmark/02-high-versus-max.png",
      "alt": "Default and max effort have overlapping Elo intervals, while max uses more cost and time per draft.",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [
    {
      "url": "https://www.youtube.com/watch?v=-28P_Cvvg_w",
      "src": "https://www.youtube-nocookie.com/embed/-28P_Cvvg_w",
      "status": "ok",
      "kind": "single_video",
      "local_path": "attachments/3ac6bd5dc190/videos/repair--28P_Cvvg_w.mp4",
      "bytes": 107332825,
      "valid": true,
      "height": 1080,
      "width": 1920,
      "duration": "874.981000",
      "reused": true,
      "reused_from": "xinxing-zimeiti-corpus/attachments/a6bdfd7b0a18/videos/-28P_Cvvg_w.mp4"
    }
  ],
  "links": [
    {
      "href": "https://www.louisbouchard.ai/book/?utm_source=site-lf&utm_medium=btn&utm_campaign=book",
      "label": "AI Engineering For Production",
      "type": "a"
    },
    {
      "href": "https://www.youtube-nocookie.com/embed/-28P_Cvvg_w",
      "label": "",
      "type": "iframe"
    },
    {
      "href": "https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/DeepSeek_V41_Tech_Report.pdf",
      "label": "Read the report",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/2405.05254",
      "label": "YOCO",
      "type": "a"
    },
    {
      "href": "https://api-docs.deepseek.com/guides/thinking_mode/",
      "label": "The thinking-mode documentation",
      "type": "a"
    },
    {
      "href": "https://api-docs.deepseek.com/news/news260910/",
      "label": "Official API release notice",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:47:49Z",
  "source_url": "https://www.louisbouchard.ai/deepseek-v41-flash-kv-cache-writing-benchmark/",
  "papers": [
    {
      "status": "invalid_file_type",
      "url": "https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/DeepSeek_V41_Tech_Report.pdf",
      "content_type": "text/html; charset=utf-8",
      "retried_at": "2026-10-20T17:46:45Z"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/2405.05254",
      "bytes": 949808,
      "reused": false,
      "local_path": "papers/repair/0f616c88cebdbe61c1e5.pdf"
    }
  ],
  "actual_video_files": [],
  "body_chars": 12039,
  "expected_body_images": 6,
  "discovery_status": "ok",
  "delivery_status": "partial",
  "missing_reason": "invalid_file_type",
  "raw_html": "attachments/3ac6bd5dc190/pages/source.html",
  "local_html": "attachments/3ac6bd5dc190/pages/article.html",
  "body_base_path": "attachments/3ac6bd5dc190/pages/",
  "body_markdown_path": "attachments/3ac6bd5dc190/pages/article.md"
}