google · vision language

medgemma-27b-text-it

google/medgemma-27b-text-it

medgemma-27b-text-it at Q4_K_M is exactly 16,546,404,416 bytes (15.41 GiB / 16.55 GB) — an effective 4.901 bits per weight, not the nominal 4. Its KV cache at 32K is 3.11 GiB, not the 15.50 GiB a flat formula predicts.

From the file· summed from 1 file(s)From the file· KV from mirror (mirror:unsloth/medgemma-27b-text-it)
Parameters
27.0B
Architecture
gemma3
62 layers
Context
131,072
native (config.json)
License
other

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
UD-IQ1_S6.06 GiB6,506,101,7601.927unsloth
UD-IQ1_M6.51 GiB6,986,501,1202.069unsloth
UD-IQ2_XXS7.31 GiB7,850,015,7442.325unsloth
UD-IQ2_M8.96 GiB9,624,267,7762.851unsloth
Q2_K9.78 GiB10,503,437,3123.111unsloth
Q2_K_L9.78 GiB10,503,437,3123.111unsloth
UD-IQ3_XXS10.07 GiB10,809,783,2963.202unsloth
Q3_K_S11.33 GiB12,167,330,8163.604unsloth
Q3_K_M12.51 GiB13,437,357,0563.980unsloth
Q3_K_L13.54 GiB14,543,177,7924.308lmstudio-community
IQ4_XS13.75 GiB14,767,164,4164.374unsloth
IQ4_NL14.50 GiB15,567,113,2164.611unsloth
Q4_K_S14.60 GiB15,673,773,0564.643unsloth
Q4_K_M15.41 GiB16,546,404,4164.901lmstudio-community
Q4_K_M15.41 GiB16,546,405,3764.901unsloth
Q4_115.99 GiB17,167,010,8165.085unsloth
Q5_K_S17.48 GiB18,766,908,4165.559unsloth
Q5_K_M17.95 GiB19,271,392,2565.708unsloth
Q6_K20.64 GiB22,166,689,8566.566lmstudio-community
Q6_K20.64 GiB22,166,690,4326.566jmarxsen
Q6_K20.64 GiB22,166,690,8166.566unsloth
Q8_026.74 GiB28,707,604,5448.503lmstudio-community
Q8_026.74 GiB28,707,605,5048.503unsloth
BF162 shards50.32 GiB54,027,275,23216.003unsloth

KV cache by context

computed per layer — this model uses sliding-window attention
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.92 GiB1.94 GiB2.10×10 / 52 / 0
8,1921.23 GiB3.88 GiB3.14×10 / 52 / 0
16,3841.86 GiB7.75 GiB4.17×10 / 52 / 0
32,7683.11 GiB15.50 GiB4.98×10 / 52 / 0
65,5365.61 GiB31.00 GiB5.53×10 / 52 / 0
131,07210.61 GiB62.00 GiB5.84×10 / 52 / 0

52 of 62 layers cache only a 1,024-token window rather than the full context, on a period of 6. 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.15 GiB. The real file is 15.41 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 15.50 GiB at 32K context where the real figure is 3.11 GiB, because most of this model's layers cache a fixed window rather than the whole context.

Architecture

from mirror:unsloth/medgemma-27b-text-it
Layers
62
Attention heads
32
KV heads
16
Head dim
128
Hidden size
5376
Vocab
262,144
Sliding window
1024
SWA period
6
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does medgemma-27b-text-it need?
Q4_K_M is exactly 16,546,404,416 bytes (15.41 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is medgemma-27b-text-it's KV cache?
3.11 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 medgemma-27b-text-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.