Can I run DeepSeek V4.1 Flash locally?

DeepSeek V4.1 Flash is a very large mixture-of-experts model. The GGUF files for local use come from Unsloth and are only available as “dynamic” quantizations; most expert weights keep their native low-bit format in every file, so the 4-bit and 8-bit files are almost the same size.

Its attention is built for long context: every layer keeps only a 128-token window, and just 4 of the 40 layers store a compressed cache that the other layers reuse. Official llama.cpp and Ollama cannot load the model yet. Support exists in an open llama.cpp pull request (#30817), and the KV figures here follow that code, so they may change once it is merged.

Estimates with default assumptions: 10% runtime overhead, ~90% usable VRAM (~72% on Macs), FP16 KV cache, one sequence. Model data synced from Hugging Face on 2026-11-23. Methodology.

DeepSeek V4.1 Flash 1017 (MoE): memory by quantization

763B parameters, 40 layers. Weights are real GGUF file sizes from unsloth/DeepSeek-V4.1-Flash-1017-GGUF.

QuantizationWeightsTotal at 8K contextTotal at 32K context
Q8_0Unsloth dynamic file (UD-Q8_K_XL)473.5 GB520.8 GB520.9 GB
Q4_K_MUnsloth dynamic file (UD-Q4_K_XL)466.3 GB513.0 GB513.1 GB
Q3_K_MUnsloth dynamic file (UD-Q3_K_XL)451.8 GB497.0 GB497.0 GB
Q2_KUnsloth dynamic file (UD-Q2_K_XL)311.8 GB343.0 GB343.1 GB

Which hardware runs DeepSeek V4.1 Flash 1017 (MoE)?

Highest-quality quantization that fits fully. “Offload” means it runs only with part of the model in system RAM (64 GB assumed).

Hardware8K context32K context
Mac Studio M3 Ultra (256 GB)Doesn’t fitDoesn’t fit
Mac Studio M5 Ultra (512 GB)Q2_K (343.0 GB, big quality loss)Q2_K (343.1 GB, big quality loss)
4× AMD Instinct MI300X (192 GB)Q8_0 (520.8 GB)Q8_0 (520.9 GB)
4× NVIDIA H200 (141 GB)Q2_K (343.0 GB, big quality loss)Q2_K (343.1 GB, big quality loss)
8× NVIDIA H100 SXM (80 GB)Q8_0 (520.8 GB)Q8_0 (520.9 GB)
8× NVIDIA H200 (141 GB)Q8_0 (520.8 GB)Q8_0 (520.9 GB)

Try your own setup

Model
Your hardware
Context length (tokens)
Assumptions

Result

Fits fully

DeepSeek V4.1 Flash 1017 (MoE) · Q2_K · 128K → Mac Studio M5 Ultra (512 GB). 25.3 GB of headroom.

Borderline: within 5% of the limit. It may work with a headless GPU, a smaller context or less overhead — or fail. Test before buying.

Bar: memory needed vs. usable memory (marker).
Memory breakdown
ComponentMemory
Weightsactual GGUF file: UD-Q2_K_XL311.8 GB
KV cache128K tokens × 1 seq, F160.40 GB
Runtime overhead10% of weights31.2 GB
Total needed343.4 GB
Usable on your hardware72% of 512.0 GB368.6 GB
  • Only an Unsloth “dynamic” file exists at this level (UD-Q2_K_XL); its size is used.
  • Mixture-of-experts: all experts must be in memory, so memory uses total parameters. Speed depends on active parameters.
  • Not supported by official llama.cpp / Ollama yet. The KV-cache layout follows an open llama.cpp pull request and may change; weights use the real GGUF size.

Run it

No run commands yet: official llama.cpp and Ollama cannot load this model. It runs only with a llama.cpp build that includes: llama.cpp PR #30817

Model details
Parameters
763BHugging Face safetensors parameter count (may include extra modules such as a vision encoder or MTP layers)
Layers
40
Attention
Compressed attention (sliding window + 4× / 128× compressed KV)36× window 128 (K 512) · 1× window 128 + 1× compressed (K 512 + indexer 128) · 3× window 128 + 2× compressed (K 512 + indexer 128)
Max context
1024K
License
mit
Config source
deepseek-ai/DeepSeek-V4.1-Flash-1017synced 2026-11-23

Questions

Can I run DeepSeek V4.1 Flash with Ollama or llama.cpp?

Not with official releases yet. Its architecture is added by an open llama.cpp pull request, #30817. Until it is merged, Ollama, LM Studio and official llama.cpp builds cannot load the model, which is why the calculator shows no run commands for it.

How much memory does DeepSeek V4.1 Flash need?

The smallest level listed here, Unsloth’s UD-Q2_K_XL, is about 312 GB of weights and about 343 GB in total with runtime overhead. The 4-bit and 8-bit files are about 466–474 GB. That fits a Mac Studio with 512 GB of unified memory or four 141 GB H200s at the 2-bit level, and four 192 GB MI300X or eight 80 GB H100s at the 8-bit level. Unsloth also publishes 1-bit files (UD-IQ1_S, a 233 GB download) that the calculator does not list.

How large is the KV cache at 1 million tokens?

About 3 GB at FP16 for one sequence. Each layer keeps a 128-token window, and only 4 source layers store a compressed cache (2× or 1× compression, with the indexer keys in the same rows) that the other 36 layers read. This follows llama.cpp pull request #30817 and may change before it is merged.