gemma-4-12B-it-OnlyText-GGUF

GGUF quants of OnlyTextLLMs/gemma-4-12B-it-OnlyText — the text-only derivative of google/gemma-4-12B-it. The file is the text backbone alone: no draft head is embedded, so there is no in-file speculative decoding — plain decoding is what the numbers below measure.

Quant files

File Size
gemma-4-12B-it-OnlyText-Q4_K_M.gguf 7.4 GB
gemma-4-12B-it-OnlyText-Q6_K.gguf 9.8 GB
gemma-4-12B-it-OnlyText-Q8_0.gguf 12.7 GB

Quantization damage (vs the F16 master)

llama-perplexity --kl-divergence against the F16 master's logits (ctx 1024, 40 windows, 20440 scored tokens). Same top-1 is the share of positions where the quant keeps the F16 file's top token; KLD is the divergence of the full distribution, whose median is the tail-free summary (a mean over a heavy-tailed loss says more about the tail than about the quant).

Quant Mean KLD Median KLD Same top-1 Max KLD
Q4_K_M 1.4721 0.7812 56.27% 29.33
Q6_K 0.4131 0.0865 77.93% 22.61
Q8_0 0.2070 0.0224 85.80% 24.44

Q4_K_M is not interchangeable with the others here. It changes the top-1 token on 43.7% of positions, against 14.2% for Q8_0, so choose from the Same top-1 column rather than by size alone.

Benchmarks

Measured 2026-09-24 on a single AMD Radeon AI PRO R9700 (gfx1201, 34 GB) with llama.cpp 9d286e1b315c (HIP/ROCm build, ROCm 7.14, -c 32768 -fa on). Baseline = llama-bench PP512/1024/2048 + TG128/256; chat decode = llama-cli single-turn, 256 generated tokens, median conditions, -np 1.

Quant Device Prefill t/s (PP512) Gen t/s chat Gen t/s llama-bench TG128
Q4_K_M single R9700 2030 54.4 57.9
Q6_K single R9700 1347 46.2 47.6
Q8_0 single R9700 1798 38.5 39.5

The two decode columns are different measurements (chat runs use the chat template and a ~90-token prompt; TG128 is a bare 128-token generation) — do not compare them against each other.

No published baselines are cited for this size — the numbers above are ours.

Usage

Requires a llama.cpp build that knows the gemma4 architecture.

# llama-server (OpenAI-compatible)
llama-server -m gemma-4-12B-it-OnlyText-Q4_K_M.gguf -ngl 99 -c 32768 -fa on

# llama-cli single-turn chat
llama-cli -m gemma-4-12B-it-OnlyText-Q4_K_M.gguf -ngl 99 -c 32768 -fa on \
    -st -p "Your prompt"

Notes:

  • The chat template supports Gemma's thinking channel but defaults enable_thinking to false, so plain chat answers directly. Pass "chat_template_kwargs": {"enable_thinking": true} (server API) to let it reason first.
  • Dual-GPU: unset *_VISIBLE_DEVICES env pins; llama.cpp auto layer-splits (--split-mode layer is the default).

Details

  • Base: google/gemma-4-12B-it (apache-2.0): 11.91B params, 48 layers (40 sliding-attention + 8 full-attention), hidden 3840, vocab 262137, Gemma4UnifiedForCausalLM, gemma4 GGUF architecture.
  • Tokenizer: 17 text-only special tokens at ids 0–106 (EOS 1 = <eos>, turn end 106 = <turn|>); image/audio/video tokens removed.
  • Conversion: convert_hf_to_gguf.py (llama.cpp 9d286e1b315c) then llama-quantize with the file's named type; no draft head is embedded (the family ships none).
  • Weights are untouched derivatives — no additional training.

Attribution

This model is a derivative of google/gemma-4-12B-it by the Google team, released under the apache-2.0 license. All credit for the underlying weights and capabilities belongs to the original authors; this repository only removes modalities and quantizes, it does not add new training.

Accuracy against the source checkpoint

Scored per position — this file's logits against the source checkpoint at matching precision, over the same 1533 tokens (ctx 1024, 3 windows of wikitext-2) — the two agree on the top-1 token at 90.6% of positions, median KLD 0.005. Both sides hold the same weights in the same precision there, so that gap is llama.cpp against transformers, not quantization: on this family's out-of-distribution corpus (untemplated prose, instruct-only model) the top-1 token sits near a tie at many positions, and any numerical difference — kernel, dtype, device — flips it, while the median says the two distributions are otherwise nearly identical.

Quantization costs a further 4.2 points of top-1 agreement (Q8_0 86.4%, measured the same way), which is the axis the table above is for.

Downloads last month
39
GGUF
Model size
12B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OnlyTextLLMs/gemma-4-12B-it-OnlyText-GGUF

Quantized
(323)
this model