deepseek-ai · text · mixture of experts

DeepSeek-OCR-2

deepseek-ai/DeepSeek-OCR-2

DeepSeek-OCR-2 at Q4_K_M is exactly 1,950,326,688 bytes (1.82 GiB / 1.95 GB) — an effective 4.604 bits per weight, not the nominal 4. Its KV cache at 32K is 0.94 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
3.4B
total, not active
Architecture
deepseek2-ocr
12 layers
Context
8,192
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ3_M1.35 GiB1,448,949,4083.420SandLogicTechnologies
IQ4_XS1.53 GiB1,642,540,4483.877SandLogicTechnologies
IQ4_NL1.59 GiB1,703,545,2484.021SandLogicTechnologies
Q4_K_M1.82 GiB1,950,326,6884.604sabafallah
Q8_02.91 GiB3,126,139,8087.379JamePeng2023
Q8_02.91 GiB3,126,139,8087.379sabafallah
BF165.47 GiB5,876,578,20813.872sabafallah
BF165.47 GiB5,876,578,20813.872JamePeng2023

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.12 GiB0.12 GiB12 / 0 / 0
8,1920.23 GiB0.23 GiB12 / 0 / 0
16,3840.47 GiB0.47 GiB12 / 0 / 0
32,7680.94 GiB0.94 GiB12 / 0 / 0
65,5361.88 GiB1.88 GiB12 / 0 / 0
131,0723.75 GiB3.75 GiB12 / 0 / 0

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 1.78 GiB. The real file is 1.82 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
12
Attention heads
10
KV heads
10
Head dim
128
Hidden size
1280
Vocab
129,280
Sliding window
none
SWA period
MLA
no
Experts
64
Experts per token
6
use_sliding_window

Questions people ask

How much VRAM does DeepSeek-OCR-2 need?
Q4_K_M is exactly 1,950,326,688 bytes (1.82 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is DeepSeek-OCR-2's KV cache?
0.94 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
Is DeepSeek-OCR-2 a mixture-of-experts model?
Yes — 64 experts, 6 routed per token. Every expert must be resident, but only the routed ones are read per token, which is why its memory requirement and its speed behave very differently.
Which quantization of DeepSeek-OCR-2 should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.