Qwen · text

Qwen2-7B-Instruct

Qwen/Qwen2-7B-Instruct

Qwen2-7B-Instruct at Q4_K_M is exactly 4,683,071,232 bytes (4.36 GiB / 4.68 GB) — an effective 4.919 bits per weight, not the nominal 4. Its KV cache at 32K is 1.75 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
7.6B
Architecture
qwen2
28 layers
Context
32,768
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S1.77 GiB1,903,664,8962.000MaziyarPanahi
IQ1_M1.90 GiB2,042,193,6642.145MaziyarPanahi
IQ2_XS2.30 GiB2,469,019,3922.594MaziyarPanahi
IQ2_XS2.30 GiB2,469,019,4242.594bartowski
IQ2_XS2.30 GiB2,469,019,4562.594bartowski
IQ2_S2.42 GiB2,595,634,9762.727bartowski
IQ2_S2.42 GiB2,595,635,0082.727bartowski
IQ2_M2.59 GiB2,780,340,0002.921bartowski
IQ2_M2.59 GiB2,780,340,0322.921bartowski
Q2_K2.81 GiB3,015,937,7923.168MaziyarPanahi
Q2_K2.81 GiB3,015,937,8243.168Qwen
Q2_K2.81 GiB3,015,937,8243.168bartowski
Q2_K2.81 GiB3,015,937,8563.168bartowski
IQ3_XXS2.90 GiB3,114,512,1603.272bartowski
IQ3_XXS2.90 GiB3,114,512,1923.272bartowski
IQ3_XS3.12 GiB3,346,253,5683.515MaziyarPanahi
IQ3_XS3.12 GiB3,346,253,6003.515bartowski
IQ3_XS3.12 GiB3,346,253,6323.515bartowski
Q3_K_S3.25 GiB3,492,366,0803.669MaziyarPanahi
Q3_K_S3.25 GiB3,492,366,1123.669bartowski
Q3_K_S3.25 GiB3,492,366,1443.669bartowski
IQ3_M3.33 GiB3,574,009,6323.754bartowski
IQ3_M3.33 GiB3,574,009,6643.754bartowski
Q3_K_M3.55 GiB3,808,388,8644.001339MaziyarPanahi
Q3_K_M3.55 GiB3,808,388,8964.001bartowski
Q3_K_M3.55 GiB3,808,388,8964.001339Qwen
Q3_K_M3.55 GiB3,808,388,9284.001bartowski
Q3_K_L3.81 GiB4,088,456,9604.295MaziyarPanahi
Q3_K_L3.81 GiB4,088,456,9924.295bartowski
Q3_K_L3.81 GiB4,088,457,0244.295bartowski
IQ4_XS3.93 GiB4,218,470,1444.431339MaziyarPanahi
IQ4_XS3.93 GiB4,218,470,1764.431339bartowski
IQ4_XS3.93 GiB4,218,470,2084.431bartowski
Q4_04.14 GiB4,444,118,8164.668339Qwen
Q4_K_S4.15 GiB4,457,766,6564.683MaziyarPanahi
Q4_K_S4.15 GiB4,457,766,6884.683bartowski
Q4_K_S4.15 GiB4,457,766,7204.683bartowski
Q4_K_M4.36 GiB4,683,071,2324.919339MaziyarPanahi
Q4_K_M4.36 GiB4,683,071,2644.919339Qwen
Q4_K_M4.36 GiB4,683,071,2644.919bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.22 GiB0.22 GiB28 / 0 / 0
8,1920.44 GiB0.44 GiB28 / 0 / 0
16,3840.88 GiB0.88 GiB28 / 0 / 0
32,7681.75 GiB1.75 GiB28 / 0 / 0
65,5363.50 GiB3.50 GiB28 / 0 / 0
131,0727.00 GiB7.00 GiB28 / 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 3.99 GiB. The real file is 4.36 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
28
Attention heads
28
KV heads
4
Head dim
128
Hidden size
3584
Vocab
152,064
Sliding window
131072
SWA period
MLA
no
Experts
Experts per token
use_sliding_window
false

This model declares a sliding window but sets use_sliding_window: false, so the window is not applied. Honouring the field without the flag understates KV for the whole family.

Questions people ask

How much VRAM does Qwen2-7B-Instruct need?
Q4_K_M is exactly 4,683,071,232 bytes (4.36 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Qwen2-7B-Instruct's KV cache?
1.75 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 Qwen2-7B-Instruct 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.