selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

google logo

gemma-4-12B-it

google·Instruct·released 23 May 2026

Apache 2.012B256K ctx ≈11 GB
Your GPU
ollama run gemma4:12b
All 5 runners ↓

Built by Google, this 12B-parameter instruction-tuned model is part of the Gemma 4 family and is classed as Omni / Any-to-Any. It accepts text, image and audio input and returns text output, with a context window of 262,144 tokens. The gemma-4-12B-it weights use the Apache 2.0 licence, which allows commercial use, and the download is not gated. Other sizes in the family include E2B, E4B and 26B-A4B.

How much VRAM does gemma-4-12B-it need?

At Q4_K_M gemma-4-12B-it needs about 11 GB with an 8K context (11 GB at Q4, 27 GB at full precision). Pick your GPU to see what fits and how fast it runs.

--vram
any
--gpus
--quant

Needs: ≈10 GB · Q4_K_M · 8K context — Pick a GPU to check the fit.

Change quant, context or KV cache to compare
Advanced: context 8K · KV cache 16-bit
Context
KV cache

Smallest GPU for each quant and context (KV cache 16-bit)

Quantisation8K16K32K64K128K256K
Q3_K_M
Q4_K_M
Q5_K_M
Q6_K
Q8_0
FP16

≤16 GB card24–32 GB48–96 GBmore

QuantisationQualityWeightsKV cacheTotal
Q2_KHeavy lossSmallest, noticeably worse qualityHeavy loss3.7 GB est.3.0 GB≈7.3 GB
Q3_K_MNoticeable lossSmall, some quality lossNoticeable loss5.3 GB file3.0 GB≈9.1 GB
Q4_K_MrecommendedSmall lossRecommended default for local useSmall loss6.6 GB file3.0 GB≈10 GB
Q5_K_MNear-losslessNear-lossless for most tasksNear-lossless7.8 GB file3.0 GB≈12 GB
Q6_KNear-losslessPractically losslessNear-lossless9.1 GB file3.0 GB≈13 GB
Q8_0LosslessLossless in practice, twice the size of Q4Lossless12 GB file3.0 GB≈16 GB
FP16 / BF16LosslessFull precision, as releasedLossless22 GB file3.0 GB≈27 GB

Estimates for 8K tokens of context: weights + KV cache + runtime overhead. Speed assumes memory-bound decoding at your GPU’s bandwidth. Pick a GPU above and the fit column checks every row against it. Weights marked “file” use the real GGUF download size; “est.” rows are computed from the parameter count.

How to pick a quant

Take the biggest quant that fits with room left for context. Q4_K_M is the usual sweet spot. Below Q4 quality drops fast, above Q6 you mostly pay memory for nothing. Big models (70B+, large MoE) tolerate low quants better than small ones.

  • LosslessF16, Q8_0
  • Near-losslessQ6_K, Q5_K_M
  • Small lossQ5_K_S, Q4_K_M, IQ4_NL, IQ4_XS, Q4_K_S
  • Noticeable lossQ4_0, Q3_K_L, Q3_K_M, IQ3_M
  • Heavy lossIQ3_XXS, Q3_K_S, IQ2_M, Q2_K

Typical quality loss, not measured per model. Tiers come from KL divergence against FP16 on Llama 3 8B: llama.cpp perplexity README: LLaMA 3 8B scoreboard (KLD and ΔPPL vs FP16, Wikitext-2); llama.cpp quantize tool: ΔPPL per quant type @ Llama-3-8B

How much context fits?

Model quant
KV cache

At 8K context, Q4_K_M needs ≈10 GB(6.6 GB weights + 3.0 GB KV cache + 0.8 GB overhead). Pick a GPU above to see how much context fits.

0501001K2K4K8K16K32K64K128K256KGB

Weights + overheadKV cache

Can the Radeon RX 6700 XT run gemma-4-12B-it? →

Speed vs quality per quant

Smaller quants run faster and fit in less memory, but lose quality.

Q2_KQ3_K_MQ4_K_MQ5_K_MQ6_KQ8_0F16

Fits in VRAMTight fitCPU offload✕ won't runQuality is typical KL divergence vs FP16, not measured for this model.

Real-world speed of gemma-4-12B-it

Tokens per second measured by people running it at home. A GPU shows a median once 3 reports agree on the same setup. Reports far from our estimate wait for a review. Measure yours with llama-bench →

No medians yet. Be one of the first 3 to report a setup.

All reports

Run gemma-4-12B-it locally

--quantQ4_K_Mdefault; pick your GPU to tailor itunsloth/gemma-4-12b-it-GGUF

From the Ollama librarydocs
ollama run gemma4:12b

The library build picks its own default quantisation.

Q4_K_M straight from Hugging Facedocs
ollama run hf.co/unsloth/gemma-4-12b-it-GGUF:Q4_K_M

Install Ollama

OpenAI-compatible server with a web UIdocs
llama-server -hf unsloth/gemma-4-12b-it-GGUF:Q4_K_M

Downloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.

Install llama.cpp

Download with the lms CLIdocs
lms get unsloth/gemma-4-12b-it-GGUF@Q4_K_M

Then load it from the LM Studio app or with `lms load`.

Install LM Studio

Serve an OpenAI-compatible APIdocs
vllm serve google/gemma-4-12B-it
Smaller AWQ builddocs
vllm serve cyankiwi/gemma-4-12B-it-AWQ-INT4
Docker Compose (NVIDIA)docs
yaml
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: google/gemma-4-12B-it
    ports:
      - "8000:8000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 8000.

Install vLLM

Serve an OpenAI-compatible APIdocs
sglang serve google/gemma-4-12B-it --host 0.0.0.0 --port 30000
Docker Compose (NVIDIA)docs
yaml
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve google/gemma-4-12B-it --host 0.0.0.0 --port 30000
    ports:
      - "30000:30000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 30000.

Install SGLang

Benchmarks

BenchmarkScoreRankSourceDate
MMLU-Pro77.2%#48 / 409 self-reportedMay 2026
GPQA Diamond78.8%#58 / 104 self-reportedMay 2026
Humanity's Last Exam5.2%#63 / 63 self-reportedMay 2026
AIME 202677.5%#27 / 31 self-reportedMay 2026
MMMU-Pro69.1%#18 / 25 self-reportedMay 2026
Open ASR Leaderboard WER↓20.87%#27 / 27 independentOct 2026
Open ASR Leaderboard RTFx106#25 / 27 independentOct 2026

Self-reported scores come from the model card and are not independently verified. Rank is among all models with a score on that benchmark.

Quantised versions and downloads

RepositoryFormatQuantSizeDownloads
unsloth/gemma-4-12b-it-NVFP4SafetensorsNVFP4—14.3K
RedHatAI/gemma-4-12B-it-FP8-DynamicSafetensorsFP8—5.6K
AxionML/Gemma-4-12B-FP8SafetensorsFP8—4.9K
unsloth/gemma-4-12b-it-GGUFGGUFUD-IQ2_M4.2 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFUD-IQ3_XXS4.6 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFUD-Q2_K_XL4.7 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFQ3_K_S5.1 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFQ3_K_M5.7 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFUD-Q3_K_XL6.0 GB2.4M
unsloth/gemma-4-12b-it-GGUFGGUFIQ4_XS6.4 GB2.4M

About gemma-4-12B-it

Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on E2B, E4B, and 12B) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages. Featuring both Dense and Mixture-of-Experts (MoE) architectures, Gemma 4 is well-suited for tasks like text generation, coding, and reasoning. The models are available in five distinct sizes: E2B, E4B, 12B, 26B A4B, and 31B. Their diverse sizes make them deployable in environments ranging from high-end phones to laptops and servers, democratizing access to state-of-the-art AI. Gemma 4 introduces key capability and architectural advancements: • Reasoning – All models in the family are designed as highly capable reasoners, with configurable thinking modes. • Extended Multimodalities – Processes Text, Image with variable aspect ratio and resolution support (all models), Video, and Audio (featured natively on the E2B, E4B, and 12B models). • Diverse & Efficient Architectures – Offers Dense and Mixture-of-Experts (MoE) variants of different sizes for scalable deployment. • Optimized for On-Device – Smaller models are specifically designed for efficient local execution on laptops and mobile devices.

Full model card on Hugging Face →

Other Gemma 4 models

Whole family →
google logo5.1BCommercial OK≈3.8 GB↓ 117.7K
google logo5.1BCommercial OK≈3.8 GB↓ 3.2M
google logo8BCommercial OK≈5.9 GB↓ 474.5K
google logo8BCommercial OK≈5.9 GB↓ 4.2M
google logo12BCommercial OK≈11 GB↓ 53.3K
google logo25.8BA4BCommercial OK≈18 GB↓ 5.6M
google logo26.5BA4BCommercial OK≈18 GB↓ 74.1K
google logo31.3BCommercial OK≈27 GB↓ 7.4M
google logo32.7BCommercial OK≈27 GB↓ 57K

Alternatives to gemma-4-12B-it

All alternatives →
openbmb logo

MiniCPM-o-4_5

openbmb·Omni

≈7.2 GB

A Gemini 2.5 Flash Level MLLM for Vision, Speech, and Full-Duplex Mulitmodal Live Streaming on Your Phone

9.4B40K ctx Apache 2.0
191KFeb 2026gguf
Qwen logo

Qwen2.5-Omni-7B

Qwen·Omni

≈7.3 GB

Qwen2.5-Omni is an end-to-end multimodal model designed to perceive diverse modalities, including text, images, audio, and video, while simultaneously generating text and natural speech responses in a streaming manner.

10.7B32K ctx Apache 2.0
277.2KMar 2025gguf
tencent logo

WeVisCut

tencent·Omni

≈7.1 GB

WeVisCut is a 9B tool-using agent that turns knowledge articles or narration scripts into multi-minute edited videos. At each step, it reads the current editing state and selects one of 12 tools for planning, narration, asset retrieval, composition, inspection, or repair.

9.4B256K ctx Custom licence
16.2KSept 2026gguf
nvidia logo

music-flamingo-hf

nvidia·Omni

≈5.8 GB

Music Flamingo (MF) is a fully open, state-of-the-art Large Audio-Language Model (LALM) designed to advance music (including song) understanding in foundational audio models. MF brings together innovations in:

8.3B32K ctx Custom licence
92.9KNov 2025gguf
nvidia logo≈5.8 GB

Audio Flamingo 3: Advancing Audio Intelligence with Fully Open Large Audio-Language Models

8.3B32K ctx Custom licence
83.2KOct 2025gguf
ai-sage logo≈8.1 GB

GigaChat Audio 10B is an audio-native LLM built on top of the GigaChat 3.1 Lightning text model. A Conformer speech encoder and a modality adapter feed audio embeddings directly into a Mixture-of-Experts decoder, so the model keeps the text quality of its base while adding speech understanding.

10BA1.8B256K ctx MIT
1.9KJul 2026

gemma-4-12B-it FAQ

How much VRAM does gemma-4-12B-it need?
About 11 GB at Q4_K_M with an 8K context. Q8_0 needs about 16 GB and full precision about 27 GB. Longer contexts need more memory for the KV cache.
Can gemma-4-12B-it run on the RTX 3060 12GB?
Yes. It fits at Q4_K_M (about 10 GB), at an estimated 27 tokens/s. It fits comfortably on the Radeon RX 6700 XT, Arc B580, Tesla T4.
Can I use gemma-4-12B-it commercially?
Yes. It is released under Apache 2.0. Permissive: use, modify and sell freely; keep the notice and licence text.
What is the context length of gemma-4-12B-it?
262,144 tokens (256K). The full window needs far more memory than an 8K context.
How do I run gemma-4-12B-it with Ollama or llama.cpp?
With Ollama: ollama run gemma4:12b. With llama.cpp: llama-server -hf unsloth/gemma-4-12b-it-GGUF:Q4_K_M, which starts an OpenAI-compatible server.

Data from Hugging Face, the model card and public leaderboards. Memory and speed figures are estimates; real numbers depend on the runtime, context length and drivers. Always check the licence yourself before commercial use.