baidu · text

Qianfan-OCR

baidu/Qianfan-OCR

Qianfan-OCR at Q4_K_M is exactly 2,722,275,136 bytes (2.54 GiB / 2.72 GB) — an effective 4.593 bits per weight, not the nominal 4. Its KV cache at 32K is 4.50 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
4.7B
Architecture
qwen3
36 layers
Context
32,768
native (config.json)
License
apache-2.0

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K1.68 GiB1,802,287,2323.041Reza2kn
Q2_K1.68 GiB1,802,287,2643.041DevQuasar
Q3_K_S1.92 GiB2,059,741,1203.475Reza2kn
Q3_K_M2.09 GiB2,248,361,9203.794Reza2kn
Q3_K_M2.09 GiB2,248,361,9523.794DevQuasar
Q4_02.42 GiB2,594,541,3764.378Reza2kn
Q4_K_S2.43 GiB2,608,303,9364.401Reza2kn
Q4_K_M2.54 GiB2,722,275,1364.593Reza2kn
Q4_K_M2.54 GiB2,722,275,1364.593Abiray
Q4_K_M2.54 GiB2,722,275,1684.593DevQuasar
Q5_K_S2.89 GiB3,097,882,8165.227Reza2kn
Q5_K_M2.95 GiB3,163,685,0565.338Abiray
Q5_K_M2.95 GiB3,163,685,0565.338Reza2kn
Q5_K_M2.95 GiB3,163,685,0885.338DevQuasar
Q6_K3.38 GiB3,632,683,1046.129Abiray
Q6_K3.38 GiB3,632,683,1046.129Reza2kn
Q6_K3.38 GiB3,632,683,1366.129DevQuasar
Q8_04.38 GiB4,703,187,4887.936Reza2kn
Q8_04.38 GiB4,703,187,4887.936Abiray
Q8_04.38 GiB4,703,187,5207.936DevQuasar
BF168.24 GiB8,847,075,48814.927Reza2kn

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.56 GiB0.56 GiB36 / 0 / 0
8,1921.13 GiB1.13 GiB36 / 0 / 0
16,3842.25 GiB2.25 GiB36 / 0 / 0
32,7684.50 GiB4.50 GiB36 / 0 / 0
65,5369.00 GiB9.00 GiB36 / 0 / 0
131,07218.00 GiB18.00 GiB36 / 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 2.48 GiB. The real file is 2.54 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
36
Attention heads
32
KV heads
8
Head dim
128
Hidden size
2560
Vocab
153,678
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window
false

Questions people ask

How much VRAM does Qianfan-OCR need?
Q4_K_M is exactly 2,722,275,136 bytes (2.54 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Qianfan-OCR's KV cache?
4.50 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.
Which quantization of Qianfan-OCR 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.