OSAIM
Open Source AI Models

Gemma 2 27B

Flagship Gemma 2 release. Uses logit-distillation from a larger teacher model, which is how Google delivers near-70B quality from a 27B student. A solid choice when the Llama community licence doesn't fit and you need quality at the 27B–40B size range.

Parameters
27B
Context length
8K
Modality
text
Released
2024-06-27

Memory & hardware

VRAM (fp16)
54 GB
VRAM (Q4)
16.2 GB
Recommended
A100 40GB or 2× RTX 4090
Quantizations
fp16, q8_0, q4_k_m

License: Gemma Terms of Use

SPDX
Commercial use
Yes
Modification
Yes
Redistribution
Yes

Benchmarks

MMLU
75.2
HumanEval
51.8
MATH
42.3
Benchmarks last verified 2026-05-18.

Hosted inference pricing

USD per million tokens.

ProviderInputOutput
togetherCheapest$0.30$0.30
Pricing last verified 2026-05-18. Providers update rates frequently; confirm before integrating.

Run it yourself

Drop-in commands for the three most common open-source inference paths. The Ollama tag is a best-effort match against the registry; verify the size variant before pulling.

Run Gemma 2 27B locally
Ollama (easiest)
ollama run gemma2:27b
Single-line install + run; uses the official Ollama registry tag for this family.
vLLM (production)
vllm serve google/gemma-2-27b-it
High-throughput hosted inference; one command to expose an OpenAI-compatible HTTP server.
Transformers (Python)
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
model = AutoModelForCausalLM.from_pretrained(
    "google/gemma-2-27b-it", device_map="auto", torch_dtype="auto"
)
Direct PyTorch usage. Pin a torch / cuda version that matches your GPU.
Hugging Face ID: google/gemma-2-27b-it

Related models

Same family or similar size — useful when shopping around.

Mistral Small 3
24B

24B dense model from Mistral's January 2025 release that competes with Llama 3.3 70B on many tasks at a third of the parameter count. Apache 2.0 licensed and small enough to run on a single 4090 at Q4. Good pick when you want Llama-3.3-70B-class chat quality but at a friendlier hardware budget, or when the licence matters and Llama's community terms don't fit.

Context
33K
License
apache-2-0
VRAM Q4
14.4 GB
Phi-3 Medium 14B
14B

Phi-3's mid-tier model with extended 128K context. MIT licence. Strong reasoning relative to its parameter count thanks to Microsoft's heavy investment in synthetic training data.

Context
128K
License
mit
VRAM Q4
8.4 GB
Phi-4 14B
14B

14B model trained primarily on synthetic data. Punches above its weight on reasoning, especially MATH and GPQA. MIT licensed. A standout choice when you want strong reasoning quality without paying 70B-tier hardware costs. Phi-4 in particular demonstrated that careful synthetic-data curation can extract frontier-class reasoning from a relatively small dense model.

Context
16K
License
mit
VRAM Q4
8.4 GB
Qwen2.5 14B Instruct
14B

Mid-size Qwen2.5 with broad task coverage. The sweet spot for users who want noticeably better quality than 7B but can't justify the hardware footprint of 32B or 72B.

Context
128K
License
apache-2-0
VRAM Q4
8.4 GB
OLMo 2 13B
13B

Larger OLMo 2 release. Same fully-open philosophy as the 7B variant. The 13B size makes it more competitive with mainstream production-grade chat models.

Context
4K
License
apache-2-0
VRAM Q4
7.8 GB
Gemma 2 9B
9B

Mid-tier Gemma. Strong general-purpose chat model at small scale. The Gemma Terms of Use permit commercial use subject to Google's prohibited-use policy.

Context
8K
License
gemma
VRAM Q4
5.4 GB