xai-org · text · mixture of experts

grok-2

xai-org/grok-2

grok-2 at Q4_K_M is exactly 164,055,568,672 bytes (152.79 GiB / 164.06 GB) — an effective 4.870 bits per weight, not the nominal 4. Its KV cache at 32K is 8.00 GiB.

From the file· summed from 4 file(s)From the file· KV per layer
Parameters
270B
total, not active
Architecture
grok
64 layers
Context
131,072
native (config.json)
License
other

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_M2 shards57.16 GiB61,379,006,6241.822bartowski
IQ2_XXS2 shards63.81 GiB68,517,712,0642.034bartowski
IQ2_XS2 shards72.40 GiB77,736,792,2562.308bartowski
IQ2_S2 shards73.30 GiB78,709,870,7522.336bartowski
UD-TQ1_076.17 GiB81,784,426,3682.428oki692
UD-TQ1_076.17 GiB81,784,426,3682.428unsloth
IQ2_M3 shards82.15 GiB88,205,775,1362.618bartowski
UD-IQ1_S2 shards82.82 GiB88,931,520,5762.640unsloth
UD-IQ1_S2 shards82.82 GiB88,931,520,5762.640oki692
UD-IQ1_M2 shards88.02 GiB94,513,483,8402.805unsloth
UD-IQ1_M2 shards88.02 GiB94,513,483,8402.805oki692
Q2_K3 shards89.93 GiB96,560,828,7362.866bartowski
Q2_K_L3 shards90.91 GiB97,609,404,7362.897bartowski
UD-IQ2_XXS2 shards92.52 GiB99,346,894,9122.949unsloth
UD-IQ2_XXS2 shards92.52 GiB99,346,894,9122.949oki692
Q2_K3 shards93.18 GiB100,050,489,5362.970oki692
Q2_K3 shards93.18 GiB100,050,489,5362.970unsloth
Q2_K_L3 shards93.41 GiB100,302,147,7762.977unsloth
Q2_K_L3 shards93.41 GiB100,302,147,7762.977oki692
UD-IQ2_M3 shards96.02 GiB103,104,991,4243.061oki692
UD-IQ2_M3 shards96.02 GiB103,104,991,4243.061unsloth
IQ3_XXS3 shards99.62 GiB106,962,702,6563.175bartowski
IQ3_XS3 shards104.12 GiB111,802,929,4723.319bartowski
UD-IQ3_XXS3 shards109.27 GiB117,330,497,7283.483unsloth
UD-IQ3_XXS3 shards109.27 GiB117,330,497,7283.483oki692
Q3_K_S3 shards109.94 GiB118,044,053,6963.504unsloth
Q3_K_S3 shards109.94 GiB118,044,053,6963.504oki692
Q3_K_S3 shards109.94 GiB118,044,053,8243.504bartowski
IQ3_M4 shards115.25 GiB123,748,307,3923.673bartowski
Q3_K_M4 shards116.44 GiB125,023,375,7763.711bartowski
Q3_K_M3 shards121.19 GiB130,123,649,2163.862unsloth
Q3_K_M3 shards121.19 GiB130,123,649,2163.862oki692
Q3_K_L4 shards121.28 GiB130,224,312,7363.865bartowski
IQ4_XS4 shards134.82 GiB144,761,770,4324.297bartowski
IQ4_XS3 shards134.85 GiB144,795,324,6084.298oki692
IQ4_XS3 shards134.85 GiB144,795,324,6084.298unsloth
IQ4_NL4 shards142.48 GiB152,982,606,1444.541unsloth
IQ4_NL4 shards142.48 GiB152,982,606,1444.541oki692
IQ4_NL4 shards142.48 GiB152,982,606,2724.541bartowski
Q4_04 shards142.60 GiB153,116,823,8724.545unsloth

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0961.00 GiB1.00 GiB64 / 0 / 0
8,1922.00 GiB2.00 GiB64 / 0 / 0
16,3844.00 GiB4.00 GiB64 / 0 / 0
32,7688.00 GiB8.00 GiB64 / 0 / 0
65,53616.00 GiB16.00 GiB64 / 0 / 0
131,07232.00 GiB32.00 GiB64 / 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 141.19 GiB. The real file is 152.79 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
64
Attention heads
64
KV heads
8
Head dim
128
Hidden size
8192
Vocab
131,072
Sliding window
none
SWA period
MLA
no
Experts
8
Experts per token
2
use_sliding_window

Questions people ask

How much VRAM does grok-2 need?
Q4_K_M is exactly 164,055,568,672 bytes (152.79 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is grok-2's KV cache?
8.00 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 grok-2 a mixture-of-experts model?
Yes — 8 experts, 2 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 grok-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.