DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression
Abstract: The widespread adoption of long-horizon agents has made model workloads increasingly input-heavy. Although prior work has substantially reduced the cost of long-context computation, prefill remains computationally expensive, and large KV caches continue to strain HBM and SSD capacity and data-transfer bandwidth. Together, these compute, storage, and bandwidth demands constitute the primary bottleneck to further lowering deployment costs. To address this challenge, we introduce DeepSeek-V4.1-Flash, a multimodal Mixture-of-Experts (MoE) model with 552B backbone parameters and support for contexts of up to one million tokens. With its Causal Encoder-Decoder (CED) architecture, the model activates 16B parameters per token during decode but only 8B parameters during prefill, substantially improving cost efficiency for agentic workloads. To push the limits of KV cache compression, DeepSeek-V4.1-Flash combines cross-layer KV cache reuse in Compressed Sparse Attention 2 (CSA2) with FP4 KV caching. These designs reduce its global KV cache footprint (always in HBM) to 890 bytes per token, roughly 1/4 of the corresponding footprint of DeepSeek-V4-Flash. Further, through a dedicated deployment optimization known as SWA Bounded Replay, DeepSeek-V4.1-Flash reduces its persistent KV cache footprint (always on SSD or in host memory) to roughly 1/8 of that of DeepSeek-V4-Flash. Despite its much smaller KV cache footprint, the model delivers substantially better performance than the baseline. In addition, we streamline the DeepSeek-V4 architecture and introduce several efficient architectural extensions. We pretrain DeepSeek-V4.1-Flash on a multimodal corpus comprising 45T tokens and conduct comprehensive post-training, yielding strong performance across diverse text-based and multimodal agentic scenarios. Model checkpoints are available at https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash.
First 10 authors:
Paper Prompts
Sign up for free to create and run prompts on this paper.
Top Community Prompts
Explain it Like I'm 14
1. What is this paper about?
This paper introduces DeepSeek-V4.1-Flash, a large artificial intelligence model that can understand both text and images.
The main problem it tries to solve is this: AI assistants are increasingly asked to work on very long tasks, such as reading large documents, using computer tools, writing code, or completing many steps in a row. Remembering all this information requires a lot of computer memory and processing power.
The paper presents ways to make the model:
- Handle very long inputs—up to one million tokens.
- Use less memory while remembering previous information.
- Process long prompts more cheaply.
- Work with text, images, coding tasks, and computer-based workflows.
- Produce answers quickly and at lower serving cost.
The model has 552 billion total backbone parameters, although it activates only a smaller part of the model for each token. This is similar to having a very large team of specialists but asking only the most suitable specialists to work on each problem.
2. What questions does the research ask?
The researchers are mainly asking:
- How can an AI model remember long conversations and documents without using enormous amounts of memory?
- How can the cost of processing long prompts be reduced?
- Can the model use compressed information without becoming much less accurate?
- Can a model that is cheaper and faster still perform well on reasoning, coding, image understanding, and agent tasks?
- How can the model be deployed on real computer systems with limited memory, storage, and communication speed?
An important focus is the model’s KV cache. This is a special memory used by transformer models to store information from earlier parts of an input.
A simple analogy is a student working through a very long book. Instead of rereading every page each time, the student keeps notes. The KV cache is like those notes. However, if the book is extremely long, the notes can become huge. The paper investigates ways to make the notes smaller while keeping them useful.
3. How did the researchers build and test the model?
Training a multimodal model
The model was trained on a very large collection containing about 45 trillion tokens. A token is a small piece of text, such as a word, part of a word, or punctuation mark.
The training data included both text and images. The model uses:
- A vision encoder, which turns images into useful numerical features.
- A LLM, which processes those features together with text.
- A Mixture-of-Experts system, or MoE.
A Mixture-of-Experts model contains many specialist sections called experts. For each token, only some experts are selected. This reduces the amount of computation needed for each step.
Using an encoder and decoder
The model uses a design called a Causal Encoder-Decoder, or CED.
The encoder first processes the input and prepares useful information. The decoder then uses this prepared information to generate an answer.
This is like having one group of workers read and organize a huge pile of documents, while another group uses the organized notes to write the final response. Because the decoder does not need to fully reread everything, the model can reduce the work required when processing long prompts.
According to the paper, the encoder-decoder design reduces the amount of computation needed during the initial reading stage by nearly half.
Compressing the KV cache
The researchers introduce Compressed Sparse Attention 2, or CSA2.
Attention is the process that lets the model decide which earlier pieces of information are important for the current word. Instead of looking equally at everything, sparse attention looks at selected parts.
CSA2 saves memory in several ways:
- It shares some stored information between different model layers.
- It sometimes reuses the same selected positions instead of calculating them again.
- It searches only a smaller group of promising positions after an initial search.
CSA2 has three modes:
- Full mode: calculates all the needed information.
- Reindex mode: reuses stored information but chooses new important positions.
- Reuse mode: reuses both the stored information and the selected positions.
This resembles a library system. The first worker searches the whole library and makes a shortlist. Later workers use that shortlist instead of checking every book again.
Storing numbers with fewer bits
The model also uses FP4, a four-bit number format, for part of its KV cache.
Computers normally use more bits to store numbers accurately. Using only four bits is like writing measurements with fewer decimal places. This takes much less storage, although it can introduce errors.
The researchers trained the model to tolerate this reduced precision. They report that FP4 storage greatly reduces memory use while causing only a very small loss in quality.
The sliding-window part of the cache uses FP8 instead because it is more sensitive and needs somewhat greater accuracy.
Rebuilding some information when needed
The paper introduces SWA Bounded Replay. SWA means Sliding-Window Attention, where the model mainly remembers a recent window of tokens rather than the entire past.
Instead of saving every piece of this local information to a disk, the system saves less and recomputes a small recent part when necessary.
This is similar to not keeping every draft of a homework assignment. If an old detail is needed, the student quickly recreates it from the most recent notes.
Additional speed improvements
The model includes several other improvements:
- Single-Pass m: reduces the number of times information must be read and written in computer memory.
- Engram: provides an extra memory system for storing frequently useful patterns.
- DSpark: predicts several possible future tokens and checks them efficiently. This is called speculative decoding.
- Hierarchical Sparse Indexing: lets later searches focus on a promising shortlist rather than scanning the entire context.
The researchers also performed post-training using:
- Supervised fine-tuning, where the model learns from examples of good answers.
- Reinforcement learning, where the model receives rewards for better behavior.
- On-policy distillation, where the model learns from useful outputs produced during its own operation.
4. What were the main findings?
The paper reports several major results.
Much smaller memory requirements
Compared with DeepSeek-V4-Flash, the new model’s global KV cache uses about one-quarter as much memory:
| Measure | Reported improvement |
|---|---|
| Global KV cache | About 4 times smaller |
| Persistent KV cache | About 8 times smaller |
| Compared with an older DeepSeek model | Up to about 437 times smaller per token |
The global cache is kept in fast memory, while the persistent cache may be stored in host memory or on an SSD. Reducing both kinds of storage can lower equipment and data-transfer costs.
Lower processing cost for long inputs
The model activates:
- About 8 billion parameters per token during prefill, when it first reads the input.
- About 16 billion parameters per token during decoding, when it writes the answer.
The paper says that decoding remains almost equally expensive even when the context grows from 4,000 tokens to 1 million tokens. In other words, making the input much longer does not cause the cost to rise as dramatically as it does in many other models.
Strong performance despite compression
Although the model stores important information in a much more compressed form, the authors report that it performs better than the previous baseline, DeepSeek-V4-Flash, on many tests.
The paper reports that the base model has:
- Strong general knowledge.
- Strong mathematical and reasoning abilities.
- Good coding performance.
- Native image understanding.
- About 5%–10% improvements on certain held-out evaluations compared with the referenced baseline.
- Similar abilities to a larger DeepSeek-V4-Pro-Base model while using fewer active parameters.
Results on agent tasks
An AI agent is a model that can complete a sequence of actions, such as using a terminal, editing files, writing code, or operating office software.
The paper reports that DeepSeek-V4.1-Flash:
- Performs strongly on mathematics and programming.
- Matches some advanced systems on many coding and automation benchmarks.
- Can handle everyday coding and office-work tasks.
- Performs well on visual reasoning and professional charts.
- Can inspect screenshots and use them to correct its own work.
However, the paper also admits that the model is still weaker than the very largest systems on some expert-level scientific tasks and on some broad multimodal comparisons.
Why these findings matter
Long-context AI systems can be expensive because they must store and move large amounts of information. If the cache becomes smaller, AI companies may be able to:
- Serve more users with the same hardware.
- Run assistants with lower delay.
- Support longer conversations and documents.
- Make long-running agents more affordable.
- Reduce the amount of expensive high-speed memory and storage needed.
5. What could this research mean for the future?
The main message of the paper is that improving AI is not only about making models larger. It is also about making them more efficient.
DeepSeek-V4.1-Flash combines several ideas:
- A large model with specialist experts.
- Better ways to process long inputs.
- Compressed memory.
- Reuse of information between layers.
- Small amounts of recomputation instead of storing everything.
- Faster methods for generating answers.
If these techniques work as reported, future AI assistants could remember much longer conversations, read very large documents, and complete extended tasks without becoming extremely expensive.
There are also some limitations. The results come mainly from the authors’ own experiments, so independent researchers would need to test the model to confirm the claims. Using fewer bits and reusing information may also create problems on tasks that require perfect accuracy. In addition, the model still does not match the largest systems in every scientific or multimodal area.
Overall, the research suggests a useful direction: AI systems may become more powerful and affordable by learning how to store and reuse information more intelligently, rather than simply adding more hardware or more parameters.
Knowledge Gaps
Knowledge gaps, limitations, and open questions
- The paper does not provide sufficiently detailed ablation studies separating the contributions of CED, CSA2, FP4 KV caching, SWA Bounded Replay, HSI, Engram, DSpark, and other architectural changes.
- The interactions among CED, CSA2, cross-layer KV reuse, and hierarchical indexing are not systematically analyzed; it remains unclear which combinations are necessary to achieve the reported quality–efficiency trade-off.
- The fixed assignment of CSA2 layers to Full, Reindex, and Reuse modes is not justified through a comparison with learned, adaptive, or input-dependent mode assignments.
- The sensitivity of CSA2 to compression ratios, layer-mode schedules, Top-K sizes, candidate-pool sizes, and block sizes is not reported.
- The paper does not quantify how often Reuse-mode layers select suboptimal KV entries relative to independently indexed layers, nor how this error changes with context length or task type.
- The hierarchical sparse indexer depends on the candidate pool generated by an initial Full-mode layer, but its robustness to early indexing errors and distribution shifts is not evaluated.
- The paper does not establish whether the initial full-range indexing pass becomes a bottleneck at one-million-token contexts under realistic batch sizes and hardware constraints.
- The effects of FP4 quantization on different attention components, modalities, token types, languages, and long-range retrieval behaviors are not separately measured.
- The reported “marginal” degradation from FP4 KV caching lacks detailed accuracy, calibration, and worst-case error analyses across long-context and multimodal tasks.
- The comparison between FP4 formats is not fully documented, including the tested formats, calibration procedures, quantization scales, and hardware-specific performance.
- FP8 SWA KV caching is retained because of sensitivity, but the source of this sensitivity and the feasibility of lower-precision SWA caching remain unexplored.
- SWA Bounded Replay is evaluated primarily through aggregate performance claims; the paper does not characterize when replay errors become significant, such as during multi-turn dialogue, tool-heavy interactions, or tasks requiring precise local dependencies.
- The optimal replay length is not studied as a function of layer, modality, sequence position, task type, or model state.
- The claimed negligible degradation from bounded replay is not accompanied by detailed comparisons against exact replay across latency, memory, energy, and accuracy.
- The persistent-cache savings are reported as approximate ratios, but the paper does not provide end-to-end measurements of SSD traffic, host-memory use, RDMA bandwidth, cache-migration latency, or serving throughput.
- The deployment claims are not validated across multiple hardware generations, storage systems, interconnects, batch sizes, and concurrent-request regimes.
- The paper does not quantify the total cost of storing and serving the very large backbone and Engram parameter sets, which may offset some of the KV-cache savings.
- The computational and memory overhead of the CED SWA replay path is not fully reported for short prompts and short multi-turn interactions, where the asymptotic prefill advantage may be reduced.
- CED’s reliance on projecting decoder KV states from the encoder’s final hidden states is not analyzed for tasks requiring deep decoder-layer representations or complex cross-modal interactions.
- The paper does not compare CED with alternative encoder–decoder, KV-sharing, or prefix-reuse architectures under identical compute and memory budgets.
- The effect of CED on error propagation from the encoder to all decoder global KV caches remains unclear, particularly for noisy, adversarial, or visually complex inputs.
- The vision encoder is trained from scratch, but its scaling behavior with image resolution, number of images, video inputs, and highly detailed visual content is not established.
- The paper does not report performance on temporal multimodal inputs such as video, despite emphasizing multimodal and agentic deployment.
- The modality-specific MoE load-balancing method is not evaluated for mixed image–text sequences, rare modalities, multilingual inputs, or workloads with rapidly changing modality proportions.
- The computational and communication overhead of maintaining separate routing biases for modalities is not quantified.
- Engram introduces approximately 196B additional parameters, but the paper does not isolate its effects on factual recall, reasoning, multilinguality, memorization, privacy, or hallucination.
- The long-term storage, prefetching, and fault-tolerance costs of Engram embeddings are not compared with the inference savings or quality gains they provide.
- The paper does not investigate whether Engram memorization increases the risk of reproducing training data, leaking sensitive information, or encoding undesirable biases.
- Single-Pass m is reported to cause negligible degradation, but its effects are not analyzed by depth, task category, sequence length, or training stage.
- The deployment-only use of Single-Pass m creates a training–inference mismatch whose long-term effects on robustness and distribution-shift performance are not evaluated.
- DSpark’s acceptance rates, speedups, and quality effects are not reported across different decoding temperatures, task types, languages, tool-use patterns, and system loads.
- The confidence-scheduled verification strategy is described as throughput-aware, but its behavior under rapidly changing or inaccurately profiled workloads is not examined.
- The paper does not compare DSpark with MTP and other speculative-decoding methods under matched hardware, latency, and memory conditions.
- The training recipe is described as standard SFT, RL, and OPD, while the data-synthesis and environment-construction pipelines are not specified sufficiently to assess reproducibility or data contamination.
- The contribution of synthetic data, RL, and OPD to the reported gains is not disentangled through controlled post-training ablations.
- Benchmark results are summarized largely as headline comparisons; confidence intervals, variance across runs, failure rates, and statistical significance are not provided.
- The claim that the model can complete “over 95% of real-world tasks” is not operationally defined, and the task population, success criteria, sampling procedure, and human or automated verification protocol are unspecified.
- The paper acknowledges remaining weaknesses on science-oriented agentic tasks and against giant closed-source multimodal systems, but does not analyze the underlying failure modes or identify which scaling factors would address them.
- Real-world agent evaluation is limited by the selected benchmarks; robustness to ambiguous instructions, long-horizon recovery, tool failures, changing interfaces, security threats, and irreversible actions remains unresolved.
- The safety implications of deploying a low-cost, long-horizon agent at scale—including prompt injection, tool misuse, data exfiltration, and autonomous error accumulation—are not evaluated.
- The one-million-token context capability is asserted, but performance degradation, retrieval accuracy, latency, and reliability are not systematically plotted across context lengths approaching one million tokens.
- The paper does not evaluate whether the model genuinely uses information from the full context or relies primarily on local and retrieved regions.
- Energy consumption, carbon cost, and total lifecycle cost are not reported, despite the paper’s emphasis on deployment efficiency.
- The reproducibility of the reported results is limited by missing details about training data composition, filtering, optimizer schedules, hardware configuration, kernel implementations, and exact inference settings.
- The theoretical or empirical conditions under which cross-layer reuse and bounded replay remain reliable are not established, leaving unclear how these methods will transfer to other architectures, model scales, or domains.
Practical Applications
Immediate Applications
The paper’s innovations are primarily deployable in long-context AI serving, especially where input processing, KV-cache storage, and repeated tool interactions dominate cost. The following applications could be pursued now, assuming access to the released checkpoint and suitable inference infrastructure.
- Lower-cost long-context AI assistants (software, enterprise productivity, daily life)
- Potential products include document copilots, enterprise search assistants, legal and technical-document reviewers, and personal research tools.
- Dependencies: Sufficient GPU support for the model’s active experts and FP4/FP8 cache handling; reliable quality and safety evaluation for the intended domain; efficient serving software that implements the model’s CED, CSA2, and replay mechanisms.
- Persistent conversational agents with efficient multi-turn memory (customer service, education, personal assistants)
- A customer-support agent could retain a complete case history; a tutoring system could preserve a student’s semester-long interaction; a personal assistant could maintain project context across many sessions.
- Dependencies: Cache encryption, access control, tenant isolation, and mechanisms for invalidating or updating stale context. The reported storage reductions must be validated under real multi-turn workloads rather than only benchmark conditions.
- Coding agents and software engineering automation (software development, DevOps)
- A practical workflow could combine repository indexing, cached project context, shell tools, browser automation, screenshot-based UI verification, and automated test execution.
- Dependencies: Sandboxed tool execution, permission controls, human review for code changes, and evaluation on the organization’s programming languages and repositories. The reported gap on science-oriented expert tasks limits fully autonomous use in specialized engineering.
- Multimodal office automation (business operations, administration)
- Potential tools include spreadsheet assistants, presentation-generation systems, form-processing pipelines, and agents that inspect rendered webpages before correcting layout or interaction errors.
- Dependencies: OCR and visual accuracy, integration with enterprise applications, protections against prompt injection in documents or webpages, and confirmation steps for irreversible actions.
- Long-document and multimodal retrieval workflows (academia, legal services, healthcare administration, finance)
- Academic uses include literature review and supplementary-material analysis; legal uses include contract comparison; finance uses include filings and disclosures; healthcare-adjacent uses include administrative record summarization.
- Dependencies: Retrieval quality, citation and provenance tracking, privacy compliance, and domain-specific validation. A one-million-token context window does not guarantee that every relevant passage will be correctly attended to or interpreted.
- More economical hosted inference services (cloud computing, AI infrastructure)
- These techniques can support more concurrent users, reduce HBM and storage purchases, and lower data movement between GPU memory, host memory, and SSD.
- Dependencies: Kernel and runtime support for CSA2, FP4 dequantization, RDMA/prefetching, fused Mega-m operations, and workload-aware speculative decoding. Performance gains will depend on batch size, context distribution, hardware bandwidth, and cache hit rates.
- On-premises or edge-adjacent deployment of capable assistants (public sector, regulated industries, small organizations)
- Possible uses include internal knowledge assistants, offline coding tools, controlled document analysis, and local multimodal inspection.
- Dependencies: The full 552B-parameter backbone remains a substantial deployment challenge despite sparse activation. Quantization, expert placement, hardware availability, and power constraints may still make local deployment impractical for many organizations.
- Research and teaching infrastructure for efficient LLMs (academia)
- Researchers can reproduce cache-memory measurements, compare exact and bounded replay, evaluate quality under different cache precisions, and build educational demonstrations of long-context inference.
- Dependencies: Complete implementation details, reproducible kernels, compatible hardware, and access to sufficient compute for meaningful ablation studies. The paper text does not provide all information needed to reproduce the full training system.
- Policy and procurement evaluation of AI infrastructure (public policy, technology management)
- Procurement workflows could require reporting cost per long-context request, cache residency, energy use, latency, and quality under realistic workloads rather than relying only on parameter counts.
- Dependencies: Standardized benchmarks and independently verified measurements. Model capability claims and cost reductions should be assessed across hardware vendors and representative applications.
Long-Term Applications
The following opportunities require further research, engineering, validation, or scaling before they can be considered broadly reliable or autonomous.
- Persistent autonomous agents operating over months or years (software agents, robotics, enterprise operations)
- Examples include an engineering agent tracking a product lifecycle, a scientific agent maintaining an experiment log, or a household robot retaining a history of rooms, objects, and user preferences.
- Dependencies: Reliable memory consolidation, forgetting and deletion policies, temporal consistency, provenance, continual learning, privacy controls, and safeguards against compounding errors. Long context alone is not equivalent to robust long-term memory.
- Multimodal robotics and embodied assistants (robotics, manufacturing, logistics, healthcare)
- Potential workflows include warehouse picking, visual quality inspection, laboratory assistance, and household task planning.
- Dependencies: Real-time latency, video and sensor integration, grounded action policies, robust perception under changing conditions, safety certification, and evaluation in physical environments. The paper demonstrates image and screen-oriented capabilities, not complete robotic control.
- Large-scale scientific and engineering agents (science, energy, medicine, advanced engineering)
- Dependencies: Expert-curated training data, tool-use reliability, verifiable reasoning, access to simulators and laboratory systems, and independent validation by domain experts. High-stakes scientific or medical decisions should not be delegated solely to the model.
- Real-time multimodal video and screen agents (accessibility, operations, robotics, consumer devices)
- The model’s sparse attention and nearly stable decode cost with context length could help maintain long visual histories.
- Dependencies: Temporal modeling, much higher ingestion bandwidth, frame selection, latency guarantees, privacy-preserving processing, and methods that prevent irrelevant visual history from overwhelming useful context.
- Distributed inference with aggressive cache migration (cloud, telecommunications, edge computing)
- A future serving system could place active KV data in HBM, warm prefixes in host memory, and colder sessions on SSD or remote storage while using bounded replay when necessary.
- Dependencies: Network reliability, encryption, cache consistency, low-latency interconnects, scheduling algorithms, and accurate cost models for recomputation versus data transfer.
- Energy-efficient AI deployment at scale (energy, sustainability, data centers)
- Operators could schedule workloads according to context length, cache reuse, acceptance rates for speculative decoding, and available renewable energy.
- Dependencies: End-to-end measurement of energy rather than relying on FLOP estimates; hardware-specific implementation; and analysis of whether lower per-request cost increases total demand through expanded usage.
- New compiler and accelerator designs for compressed attention (semiconductors, systems research)
- Possible products include dedicated KV-cache memory systems, FP4-aware attention units, cache-aware schedulers, and compiler libraries for sparse multimodal MoEs.
- Dependencies: Stable standards for low-precision formats, hardware support for irregular sparse access, accuracy guarantees, and evidence that the techniques generalize beyond this model family.
- Privacy-preserving long-context assistants (healthcare, finance, government)
- Dependencies: Strong encryption at rest and in memory, auditable deletion, access logging, federated or confidential-computing support, regulatory approval, and rigorous testing for memorization and data leakage. The paper’s efficiency innovations do not by themselves establish privacy or compliance.
- Adaptive model serving based on workload and confidence (AI platforms, finance, operations research)
- This could produce latency- or cost-aware agents for customer service, trading research, call centers, and interactive applications.
- Dependencies: Calibrated confidence estimates, predictable tail latency, robust admission control, and safeguards against trading quality for throughput in high-stakes tasks.
Glossary
- Activation memory traffic: The movement of intermediate neural-network activations between memory and computational units. “halves activation memory traffic relative to the original four-kernel implementation”
- Agentic workload: A workload in which a model autonomously performs multistep tasks, often using tools. “particularly cost-effective for input-heavy agentic scenarios”
- Auxiliary-loss-free load balancing: A mixture-of-experts routing method that balances expert utilization without adding an auxiliary training loss. “we extend auxiliary-loss-free load balancing”
- Causal Encoder-Decoder (CED): An architecture that divides a causal Transformer into an encoder and decoder to reduce prefill computation. “we propose the Causal Encoder-Decoder (CED) architecture”
- Causal attention: Attention restricted so that each position can access only preceding or permitted positions. “The first Full Mode layer scores all causally visible main KV positions”
- Candidate pool: A restricted set of positions supplied to a later selection or indexing operation. “This pool defines where later indexers search”
- Compressed Sparse Attention (CSA): An attention mechanism that compresses key-value entries and selects only a sparse subset for each query. “DeepSeek-V4 combines a global attention branch spanning the full context with local Sliding-Window Attention (SWA)”
- Compression ratio: The factor by which a representation or cache is reduced relative to its uncompressed form. “CSA2(ratio, mode) specifying the compression ratio and mode”
- Conditional memory: A memory mechanism that retrieves information selectively based on the current input or context. “Engram adds sparsely accessed conditional memory”
- Cross-layer KV reuse: Sharing key-value cache entries between multiple Transformer layers. “CSA2 exploits the three dimensions jointly: it shares main KV and indexer K across layers”
- Disaggregated execution: Running components of a computational workload separately rather than within one combined process or device. “Training infrastructure supports disaggregated vision-encoder execution”
- Dynamic range: The range of numerical magnitudes representable by a data format. “the format supports magnitudes up to ”
- FP4: A four-bit floating-point numerical format used to reduce model-storage requirements. “We now extend QAT to the main KV cache, where FP4 reduces storage rather than accelerates matrix multiplication”
- FP8: An eight-bit floating-point format used for reduced-precision storage and computation. “We retain FP8 for the SWA KV cache due to its sensitivity to quantization”
- Fine-grained routed expert: A mixture-of-experts component in which individual tokens are selectively assigned to specialized subnetworks. “We retain the shared and fine-grained routed experts of DeepSeekMoE”
- HBM (High-Bandwidth Memory): High-throughput memory located near or integrated with an accelerator. “large KV caches continue to strain HBM and SSD capacity”
- Hierarchical Sparse Indexer: An indexing mechanism that progressively narrows the candidate positions considered by later indexers. “We therefore introduce the Hierarchical Sparse Indexer”
- Host memory: Main system memory used to store data that may be transferred to an accelerator when needed. “short-lived encoder SWA KV in host memory”
- Indexer K: The key representation used by a sparse attention indexer to score candidate key-value entries. “It shares global KV and indexer K across layers”
- Inference kernel fusion: Combining multiple low-level computational kernels into one operation to reduce memory transfers and launch overhead. “Further optimizations include communication--computation overlap, sharded Engram embedding tables, and inference kernel fusion”
- KV cache: Stored key and value representations reused during autoregressive Transformer inference. “Further reducing the KV cache footprint is therefore critical”
- Latency: The time required to produce a response or complete a computational operation. “its small activation footprint yields low inference latency and serving cost”
- Mixture-of-Experts (MoE): A neural architecture that routes each token through only a subset of specialized expert networks. “DeepSeek-V4.1-Flash is a multimodal mixture-of-experts (MoE) Transformer”
- Momentum update: An optimization method that incorporates a running average of past gradients into parameter updates. “Momentum update with Sinkhorn balancing”
- Muon optimizer: An optimization algorithm used to update neural-network weight matrices. “We use Muon for the weight matrices of linear transformations in the language-model backbone”
- Nesterov momentum: A momentum optimization variant that evaluates the gradient using a look-ahead parameter estimate. “We apply decoupled weight decay and Nesterov momentum to Muon”
- On-policy distillation (OPD): Distillation in which training examples are generated from the policy currently being optimized. “reinforcement learning (RL) and on-policy distillation (OPD)”
- Prefill: The inference phase that processes a prompt before autoregressive token generation begins. “prefill remains computationally expensive”
- Quantization-aware training (QAT): Training that simulates reduced-precision arithmetic so a model can better tolerate quantized inference. “DeepSeek-V4 already uses quantization-aware training (QAT)”
- Reindex Mode: A CSA2 operating mode that reuses key-value representations but computes new sparse-selection indices. “Reindex Mode reuses the most recent available main KV”
- Residual stream: The sequence of intermediate representations passed through successive Transformer blocks. “Single-Pass m revises residual-stream mixing”
- Root-mean-square normalization (RMSNorm): A normalization method that scales activations using their root-mean-square magnitude. “We also adopt RMSNorm for normalization”
- Semi-autoregressive generation: Generation in which multiple future tokens are drafted in parallel while retaining some autoregressive dependency modeling. “a speculative decoding module that combines semi-autoregressive drafting with confidence-scheduled verification”
- Serving throughput: The rate at which an inference system can process requests or generate tokens. “Together, these constraints limit serving throughput”
- Sinkhorn balancing: An iterative matrix-normalization procedure that approximately equalizes row and column magnitudes through diagonal scaling. “Sinkhorn balancing finds diagonal scaling matrices and ”
- Sliding-Window Attention (SWA): Attention restricted to a fixed-size local window of recent tokens. “DeepSeek-V4.1-Flash, like DeepSeek-V4, uses Sliding-Window Attention (SWA) in every layer”
- Sparse attention: Attention that evaluates only a selected subset of possible key-value positions. “Sparse attention is trained from scratch at a sequence length of 64K”
- Speculative decoding: An inference technique in which a fast auxiliary model drafts tokens that the main model verifies. “We also introduce the DSpark speculative decoding architecture”
- Top-K indices: The positions of the K highest-scoring entries selected for sparse attention. “Reuse Mode reuses both global KV and the Top-K indices”
- Weight decay: An optimization regularizer that discourages excessively large model parameters. “We apply decoupled weight decay and Nesterov momentum to Muon”
- Zero-indexed: Numbered starting from index zero rather than index one. “The modules are placed at layers 1 and 14 (zero-indexed)”









