Skip to content
localllm

google

gemma-2-27b-it

Parameters
27.2B
Max context length
8,192
Architecture
gemma2
License
gemma

About gemma-2-27b-it

gemma-2-27b-it is a GGUF model based on google/gemma-2-27b-it on Hugging Face. GGUF files are published by bartowski/gemma-2-27b-it-GGUF. It has about 27.2B parameters, the gemma2 architecture, a maximum context length of 8,192 tokens (values written in the GGUF).

There are 23 quantizations, with file sizes from 8.40 GB (IQ2_XS) to 109 GB (F32) (actual sizes on Hugging Face).

Running Q4_K_M (16.6 GB) with an 8,192-token context needs an estimated 20.1 GB of memory. For 8,192 tokens, a GPU with 24 GB or more of VRAM (such as GeForce RTX 3090 Ti, GeForce RTX 4090), or a Mac with 24 GB or more of unified memory, is a rough guide (macOS caps how much memory the GPU can use, so leave some headroom). The smallest, IQ2_XS (8.40 GB), needs an estimated 11.9 GB at 8,192 tokens.

The original model is licensed under Gemma Terms of Use, which allows commercial use with conditions such as scale or purpose. Check the original license for the terms of use.

File size and estimated memory per quantization

  • Up to 8 GB
  • Up to 16 GB
  • Up to 24 GB
  • Up to 48 GB
  • Up to 128 GB
  • More

File sizes are the actual values on Hugging Face. Memory is estimated for each context length (KV cache f16). The formula is in How memory is calculated.

All memory figures are Estimated (KV cache f16). It should run on a setup with at least this much VRAM (or Mac unified memory). Click a value to see the devices and models that fit that amount (Find by GPU / Mac).

About the "quality guide" (how far a quantization drifts from the original)

For each quantization type, how far the output drifts from the original model, grouped into six levels from values llama.cpp measured on Llama-3-8B.

The value is mean KLD (the difference between the original and quantized model in next-token probabilities); smaller means closer to the original. Quantizations made with an imatrix (importance data) come out slightly smaller. Levels use the value without an imatrix (or with one, for types that only have that).

These values were not measured on this model. Larger models and MoE models tend to drift less with the same type. Distributor-specific mixed types (such as UD-Q4_K_XL) cannot be matched by type name alone, so they show "-".

Quantization Quality guide KLD (no imatrix) KLD (imatrix) Size (Llama-3-8B)
Q8_0 Nearly identical 0.0014 - 7.96 GiB
Q6_K Very small 0.0055 - 6.14 GiB
Q5_K_M Very small 0.0108 - 5.33 GiB
Q5_K_S Small 0.0166 - 5.21 GiB
Q5_1 Small 0.0180 - 5.65 GiB
Q5_0 Small 0.0222 - 5.21 GiB
Q4_K_M Small 0.0313 0.0282 4.58 GiB
Q4_K_S Medium 0.0431 0.0320 4.37 GiB
IQ4_NL Small - 0.0357 4.35 GiB
IQ4_XS Small - 0.0363 4.14 GiB
Q4_1 Medium 0.0717 - 4.78 GiB
Q4_0 Medium 0.0719 - 4.34 GiB
Q3_K_L Medium 0.0872 0.0731 4.03 GiB
Q3_K_M Medium 0.1019 0.0844 3.74 GiB
IQ3_M Medium - 0.1025 3.53 GiB
IQ3_S Medium - 0.1113 3.42 GiB
IQ3_XS Large - 0.1387 3.28 GiB
IQ3_XXS Large - 0.1836 3.05 GiB
Q3_K_S Large 0.2282 0.1998 3.41 GiB
IQ2_M Large - 0.3260 2.74 GiB
Q2_K Very large 0.4451 0.3322 2.96 GiB
Q2_K_S Very large - 0.4034 2.96 GiB
IQ2_S Very large - 0.4392 2.56 GiB
IQ2_XS Very large - 0.5463 2.43 GiB
IQ2_XXS Very large - 0.8120 2.24 GiB
IQ1_M Very large - 1.3931 2.01 GiB
IQ1_S Very large - 2.2546 1.88 GiB

Source: llama.cpp (MIT), measured on Llama-3-8B against FP16, Wikitext-2, revision f364eb6f. Original table · Reading and choosing quantizations

GGUF source

bartowski/gemma-2-27b-it-GGUF

Converted and published by a third party About this label

Using the original model requires a request or agreement on Hugging Face (this does not affect downloading the GGUF files).

Last checked: Oct 29, 2026

Architecture
gemma2
Supported before llama.cpp b4409
Parameters
27.2B
Max context length
8,192
License
gemma Conditional
File size and memory per quantization for gemma-2-27b-it (bartowski/gemma-2-27b-it-GGUF)
Quantization File size Measured Quality guide 4,096 8,192 max
IQ2_XS 8.40 GB Very large 11.0 GB 11.9 GB
IQ2_S 8.65 GB Very large 11.3 GB 12.1 GB
IQ2_M 9.40 GB Large 12.0 GB 12.9 GB
Q2_K 10.4 GB Very large 13.1 GB 13.9 GB
Q2_K_L 10.7 GB - 13.3 GB 14.2 GB
IQ3_XXS 10.8 GB Large 13.4 GB 14.2 GB
IQ3_XS 11.6 GB Large 14.2 GB 15.0 GB
Q3_K_S 12.2 GB Large 14.8 GB 15.6 GB
IQ3_M 12.5 GB Medium 15.1 GB 15.9 GB
Q3_K_M 13.4 GB Medium 16.0 GB 16.9 GB
Q3_K_L 14.5 GB Medium 17.1 GB 18.0 GB
Q3_K_XL 14.8 GB - 17.4 GB 18.3 GB
IQ4_XS 14.8 GB Small 17.4 GB 18.3 GB
Q4_K_S 15.7 GB Medium 18.3 GB 19.2 GB
Q4_K_M 16.6 GB Small 19.3 GB 20.1 GB
Q4_K_L 16.9 GB - 19.5 GB 20.4 GB
Q5_K_S 18.9 GB Small 21.5 GB 22.4 GB
Q5_K_M 19.4 GB Very small 22.0 GB 22.9 GB
Q5_K_L 19.7 GB - 22.3 GB 23.2 GB
Q6_K 22.3 GB Very small 24.9 GB 25.8 GB
Q6_K_L 22.6 GB - 25.2 GB 26.1 GB
Q8_0 gemma-2-27b-it-Q8_0 28.9 GB Nearly identical 31.5 GB 32.4 GB
Q8_0 gemma-2-27b-it-Q8_0_L 30.0 GB Nearly identical 32.6 GB 33.5 GB
F32 (3 parts) gemma-2-27b-it-f32 109 GB Original precision 112 GB 112 GB
F32 (3 parts) gemma-2-27b-it-f32.gguf 109 GB Original precision 112 GB 112 GB
Ollama  ollama run hf.co/bartowski/gemma-2-27b-it-GGUF:Q4_K_M
llama.cpp  llama-server -hf bartowski/gemma-2-27b-it-GGUF:Q4_K_M

Generation speed on common GPUs and Macs (estimated)

A rough guide to how fast Q4_K_M (16.6 GB) generates text. Each token reads the model weights once, so the upper limit is memory bandwidth ÷ file size. The guide is 60–80% of that, where most published measurements fall.

Device Memory bandwidth Guide (tokens/s) Estimated Upper limit
Radeon RX 7900 XT 20 GB 800 GB/s 29–38 48
Radeon RX 7900 XTX 24 GB 960 GB/s 35–46 58
GeForce RTX 5090 32 GB 1,792 GB/s 65–86 108
Apple M4 32 GB 120 GB/s 4.3–5.8 7.2
Apple M4 Pro 48 GB 273 GB/s 9.8–13 16
Apple M5 Ultra 96 GB 1,200 GB/s 43–58 72

Estimates only. Prompt processing speed (limited by compute) is not included. Longer contexts and offloading part of the model to the CPU make it slower. Macs are shown only when installed memory is at least 4/3 of what is needed. Devices without published bandwidth (some GeForce cards, etc.) are not shown.

Third-party evaluations

Values from other organizations for the original model before quantization. Not this site's own rating. Values are for the original model before quantization. GGUF quantization (especially small quantizations) can lower performance.

Human preference (LMArena)

1,290 1,286–1,293

Gemma 2 27B IT · 75,754 votes · Values as of Nov 9, 2026

Source: LMArena (CC BY 4.0). Original leaderboard · See in ranking

Hard science (GPQA)

36.5% 31.8%–41.2%

gemma-2-27b-it · Values as of Jan 27, 2025

Source: GPQA Diamond (Epoch AI) (CC BY 4.0). Original leaderboard · See in ranking

License and commercial use

Gemma Terms of Use Conditional

Allows commercial use. It must not be used for prohibited uses (Gemma Prohibited Use Policy), and redistributors must pass the same restrictions on. Google states it may restrict use it considers in violation of the terms.

Based on the license on the original model's Hugging Face page. Original license text (checked Oct 18, 2026)

The summary states facts this site read from the original text and is not legal advice. Always check the original license and its latest terms before use. All licenses

How to run

Example commands using Q4_K_M. To use another quantization, replace the name with one from the table above. How to run local LLMs

Ollama

Run it by pointing directly at the GGUF on Hugging Face.

ollama run hf.co/bartowski/gemma-2-27b-it-GGUF:Q4_K_M

llama.cpp

Pass the repository and quantization name to llama-server (or llama-cli) with -hf.

llama-server -hf bartowski/gemma-2-27b-it-GGUF:Q4_K_M

LM Studio

Paste bartowski/gemma-2-27b-it-GGUF into the search box, download it, and choose the quantization from the file list.

Frequently asked questions

How much memory do I need to run gemma-2-27b-it (Q4_K_M)?
The file size is 16.6 GB (measured). With a 8,192-token context, the estimated memory including the KV cache is 20.1 GB. The formula is published at https://localllm.az-arte.com/en/guide/memory-calculation.
Can gemma-2-27b-it be used commercially?
The original model's license is Gemma Terms of Use (Commercial use with conditions).Allows commercial use. It must not be used for prohibited uses (Gemma Prohibited Use Policy), and redistributors must pass the same restrictions on. Google states it may restrict use it considers in violation of the terms. Check the original license text before deciding.
Does gemma-2-27b-it run in 8 GB, 12 GB, 16 GB or 24 GB of VRAM?
8 GB: no quantization fits; 12 GB: up to IQ2_M (est. 12.9 GB); 16 GB: up to Q3_K_M (est. 16.9 GB); 24 GB: up to Q5_K_L (est. 23.2 GB) (estimated at 8,192 tokens with an f16 KV cache, files from the most-downloaded source).
What is the command to run gemma-2-27b-it with Ollama?
Run "ollama run hf.co/bartowski/gemma-2-27b-it-GGUF:Q4_K_M" to use the GGUF on Hugging Face directly. To use another quantization, replace the name at the end.