google · text

gemma-2-27b-it

google/gemma-2-27b-it

gemma-2-27b-it at Q4_K_M is exactly 16,645,381,632 bytes (15.50 GiB / 16.65 GB) — an effective 4.891 bits per weight, not the nominal 4. Its KV cache at 32K is 6.56 GiB, not the 11.50 GiB a flat formula predicts.

From the file· summed from 1 file(s)From the file· KV from mirror (mirror:unsloth/gemma-2-27b-it)
Parameters
27.2B
Architecture
gemma2
46 layers
Context
8,192
native (config.json)
License
gemma

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S5.71 GiB6,132,432,8961.802legraphista
IQ1_M6.23 GiB6,692,470,7841.966legraphista
IQ2_XXS7.10 GiB7,625,867,2642.241legraphista
IQ2_XS7.82 GiB8,399,716,3522.468legraphista
IQ2_XS7.82 GiB8,399,716,8322.468bartowski
IQ2_S8.06 GiB8,652,161,0242.542legraphista
IQ2_S8.06 GiB8,652,161,5042.542bartowski
IQ2_M8.75 GiB9,398,877,6962.762bartowski
IQ2_M8.75 GiB9,398,878,2082.762legraphista
Q2_K_S9.06 GiB9,722,765,3122.857legraphista
Q2_K9.73 GiB10,449,575,4243.070bartowski
Q2_K9.73 GiB10,449,575,9363.070legraphista
Q2_K_L10.00 GiB10,735,271,4243.154bartowski
IQ3_XXS10.01 GiB10,750,754,3043.159bartowski
IQ3_XXS10.01 GiB10,750,754,8163.159legraphista
IQ3_XS10.76 GiB11,550,629,3763.394bartowski
IQ3_XS10.76 GiB11,550,629,8883.394legraphista
Q3_K_S11.33 GiB12,169,059,8403.576bartowski
Q3_K_S11.33 GiB12,169,060,3523.576legraphista
IQ3_S11.33 GiB12,169,060,3523.576legraphista
IQ3_M11.60 GiB12,454,829,5683.659bartowski
IQ3_M11.60 GiB12,454,830,0803.659legraphista
IQ3_M11.60 GiB12,454,830,5603.659lmstudio-community
Q3_K_M12.50 GiB13,424,647,6803.945bartowski
Q3_K12.50 GiB13,424,648,1923.945legraphista
Q3_K_L13.52 GiB14,519,361,0244.266bartowski
Q3_K_L13.52 GiB14,519,361,5364.266legraphista
Q3_K_L13.52 GiB14,519,362,0164.266lmstudio-community
IQ4_XS13.80 GiB14,814,420,4804.353bartowski
IQ4_XS13.80 GiB14,814,420,9924.353legraphista
IQ4_XS13.80 GiB14,814,421,4724.353lmstudio-community
IQ4_NL14.56 GiB15,628,378,1124.592legraphista
Q4_K_S14.66 GiB15,739,264,5124.625bartowski
Q4_K_S14.66 GiB15,739,265,0244.625legraphista
Q4_K_M15.50 GiB16,645,381,6324.891bartowski
Q4_K15.50 GiB16,645,382,1444.891legraphista
Q4_K_M15.50 GiB16,645,382,6244.891lmstudio-community
Q4_K_L15.77 GiB16,931,077,6324.975bartowski
Q5_K_S17.59 GiB18,884,206,0805.549bartowski
Q5_K_S17.59 GiB18,884,206,3365.549legraphista

KV cache by context

computed per layer — this model uses sliding-window attention
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0961.44 GiB1.44 GiB23 / 23 / 0
8,1922.25 GiB2.88 GiB1.28×23 / 23 / 0
16,3843.68 GiB5.75 GiB1.56×23 / 23 / 0
32,7686.56 GiB11.50 GiB1.75×23 / 23 / 0
65,53612.31 GiB23.00 GiB1.87×23 / 23 / 0
131,07223.81 GiB46.00 GiB1.93×23 / 23 / 0

23 of 46 layers cache only a 4,096-token window rather than the full context, on a period of 2. Figures assume the default configuration; --swa-full disables the saving entirely.

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 14.26 GiB. The real file is 15.50 GiB, because a quantization is a mixture and some tensors are always kept at higher precision. The larger discrepancy is the cache: a flat formula gives 11.50 GiB at 32K context where the real figure is 6.56 GiB, because most of this model's layers cache a fixed window rather than the whole context.

Architecture

from mirror:unsloth/gemma-2-27b-it
Layers
46
Attention heads
32
KV heads
16
Head dim
128
Hidden size
4608
Vocab
256,000
Sliding window
4096
SWA period
2
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does gemma-2-27b-it need?
Q4_K_M is exactly 16,645,381,632 bytes (15.50 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is gemma-2-27b-it's KV cache?
6.56 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 gemma-2-27b-it 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.