SAVRN
Search Contact SAVRN

Open-weight model · Any to any

gemma-4-12B-it-FP8-dynamic

by Thor Lin coolthor/gemma-4-12B-it-FP8-dynamic

Self-quantized FP8 (dynamic) of google/gemma-4-12B-it — Google's encoder-free omni model (text + image + audio + video). Quantized and benchmarked on an NVIDIA DGX Spark (GB10, sm121a).

Parameters12B
Context131,072
Weights13.0 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads53k

Runs On

What it takes to serve gemma-4-12B-it-FP8-dynamic (12B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 23.9 GB 28.7 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 12.0 GB 14.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 6.0 GB 7.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Thor Lin, published under apache-2.0, revision 425ac4c8ed2f.

Self-quantized FP8 (dynamic) of google/gemma-4-12B-it — Google's encoder-free omni model (text + image + audio + video). Quantized and benchmarked on an NVIDIA DGX Spark (GB10, sm121a). TL;DR: 13 GB on disk (from 23 GB BF16), 15.9 tok/s on a GB10 via vLLM, all four modalities intact. Data-free — no calibration needed. If you want the smallest + fastest build, see the sibling NVFP4 weight-only repo. FP8 is the conservative choice (dynamic activations, no calibration, widest kernel support). I scored all three formats on MMLU (English, 57 subjects) and TMMLU+ (Traditional Chinese, 66 subjects) with lm-evaluation-harness, 5-shot, chat template applied, limit=30 (N ≈ 1,710 EN / 1,980 TC, ±~1.0…

Read Thor Lin's full model card

Self-quantized FP8 (dynamic) of google/gemma-4-12B-it — Google's encoder-free omni model (text + image + audio + video). Quantized and benchmarked on an NVIDIA DGX Spark (GB10, sm_121a).

TL;DR: 13 GB on disk (from 23 GB BF16), 15.9 tok/s on a GB10 via vLLM, all four modalities intact. Data-free — no calibration needed.

Benchmark (GB10 / DGX Spark, vLLM 0.22.1 native, single-stream decode, warm)

Format Disk tok/s (EN/ZH) Omni
BF16 23 GB 7.7 yes
FP8 dynamic (this) 13 GB 15.9 yes
NVFP4 W4A16 7.7 GB 24.9 yes

If you want the smallest + fastest build, see the sibling NVFP4 weight-only repo. FP8 is the conservative choice (dynamic activations, no calibration, widest kernel support).

Accuracy (MMLU + TMMLU+) — near-lossless on both languages

I scored all three formats on MMLU (English, 57 subjects) and TMMLU+ (Traditional Chinese, 66 subjects) with lm-evaluation-harness, 5-shot, chat template applied, limit=30 (N ≈ 1,710 EN / 1,980 TC, ±~1.0 pt), through transformers:

Format MMLU (EN) TMMLU+ (TC) EN drop TC drop
BF16 78.30% 47.21%
FP8 dynamic (this) 77.95% 46.97% −0.35 −0.24
NVFP4 W4A16 75.56% 41.24% −2.74 −5.97

FP8 is the accuracy-preserving choice. Near-lossless on both languages (within ~0.4 pt) and symmetric — while weight-only NVFP4 drops Traditional Chinese by ~6 points. If you can spare the extra disk/bandwidth over NVFP4 and care about non-English quality, FP8 is the safer pick. limit=30, single model — indicative. Full writeup.

Quantization recipe

llmcompressor, scheme FP8_DYNAMIC, data-free (no calibration data). Ignore list keeps the head and the multimodal projectors in BF16:

QuantizationModifier(targets="Linear", scheme="FP8_DYNAMIC",
    ignore=["lm_head", "re:.*embed_vision.*", "re:.*embed_audio.*"])

Serving (vLLM)

Needs vLLM with native Gemma4UnifiedForConditionalGeneration (~0.22.x / main) and the TRITON_ATTN backend (Gemma 4 has heterogeneous head dims: head_dim 256 x 16 = 4096 != hidden 3840):

VLLM_ATTENTION_BACKEND=TRITON_ATTN \
vllm serve coolthor/gemma-4-12B-it-FP8-dynamic --max-model-len 4096

Environment (exact versions — this model is version-sensitive)

This is a brand-new arch on a brand-new GPU, so the toolchain matters more than usual. The versions I actually ran:

Component Version Why it matters
vLLM 0.22.1rc1.dev124 (main, post-PR) Needs the native Gemma4UnifiedForConditionalGeneration class, which only landed around 0.22.x/main. On an older vLLM it falls back to the generic transformers backend, which mishandles Gemma 4's non-square attention and crashes on o_proj.
transformers 5.10.1 First release that knows model_type: gemma4_unified. Older transformers can't even load the config.
torch 2.11.0+cu130 The one that bit me. vLLM main pins torch==2.10, but its _C.abi3.so was compiled against 2.11+cu130 — installing the pinned 2.10 (and pip silently pulling the CPU wheel on arm64) gives an undefined symbol import error and a CPU-only build. Force-align: pip install --force-reinstall --no-deps torch==2.11.0 --index-url https://download.pytorch.org/whl/cu130.
compressed-tensors bundled with llmcompressor Reads the FP8 weight format.
GPU / arch DGX Spark GB10, sm_121a, CUDA 13.x The torch-ABI dance above is specific to building vLLM from source for sm_121.
Attention backend VLLM_ATTENTION_BACKEND=TRITON_ATTN Required, not optional — see the head-dim note above.

On a normal CUDA GPU (Hopper/Ada/Blackwell desktop) you don't need the torch-ABI overlay — that pain is specific to building vLLM from source for sm_121. A recent pip install vllm (with the native Gemma4Unified class) plus VLLM_ATTENTION_BACKEND=TRITON_ATTN is enough. FP8 is data-free, so the quantization recipe above is the whole reproduce step — no calibration set needed.

Validation (GB10, transformers)

  • Text: coherent EN + ZH.
  • Image: accurately described a studio-podcast photo (cat + Shiba Inu, headphones, studio mics, latte-art mug).
  • Audio: understood a LibriSpeech clip (Mr. Quilter / apostle / middle classes).
  • Video: correctly described a night-street clip.

Credits

  • Base model: google/gemma-4-12B-it (Apache 2.0, Google DeepMind)
  • Quantization: llmcompressor + compressed-tensors
  • Quantized & benchmarked by coolthor on a DGX Spark (GB10)

Support

One-person effort on a single DGX Spark, no sponsor. If it saved you time, a coffeeis appreciated.

Configuration

Architecture
Gemma4UnifiedForConditionalGeneration
Context length (tokens)
131,072
Layers
48
Hidden size
3,840
Feed-forward size
15,360
Attention heads
16
Key/value heads
8
Head dimension
256
Vocabulary size
262,144
Sliding window (tokens)
1,024
Model type
gemma4_unified
Quantization
compressed-tensors

Identity and Version

Repository
coolthor/gemma-4-12B-it-FP8-dynamic
Publisher
Thor Lin
Task
Any to any
Modality
Multimodal
Library
transformers
Parameters
12B parameters
Languages
dgx-spark
Revision
425ac4c8ed2f89ef603ba0818faf9fce0f5c2e1a
First published
2026-06-04
Last updated
2026-07-21

Files and Weights

10 files, 13.1 GB in total. The weights are 1 file totalling 13.0 GB in safetensors.

Weights1 file · 13.0 GB
Configuration4 files · 7.7 KB
Tokenizer2 files · 32.2 MB
Documentation1 file · 5.5 KB
Other1 file · 18.7 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights13.0 GB 0dde463f3142
config.jsonConfiguration5.8 KB
generation_config.jsonConfiguration255 B
processor_config.jsonConfiguration1.4 KB
recipe.yamlConfiguration221 B
README.mdDocumentation5.5 KB
chat_template.jinjaOther18.7 KB
.gitattributesRepository1.6 KB
tokenizer.jsonTokenizer32.2 MB cc8d3a0ce364
tokenizer_config.jsonTokenizer2.7 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
13.0 GB
Download from Thor Lin

Released by Thor Lin through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published13.0 GB
16-bit23.9 GB
8-bit12.0 GB
4-bit6.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About gemma-4-12B-it-FP8-dynamic

How much GPU memory does gemma-4-12B-it-FP8-dynamic need?

About 28.7 GB at 16-bit and 7.2 GB at 4-bit: the weights (12B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run gemma-4-12B-it-FP8-dynamic on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use gemma-4-12B-it-FP8-dynamic commercially?

Yes. gemma-4-12B-it-FP8-dynamic is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is gemma-4-12B-it-FP8-dynamic's context length?

131,072 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Any to any

gemma-4-12B-it

Google

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…

Open weights apache-2.0 12B parameters 262,144 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 4-bit quantized version of gemma-4-12B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 12B parameters 262,144 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 8-bit quantized version of gemma-4-12B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 12B parameters 262,144 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 6-bit quantized version of gemma-4-12B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 12B parameters 262,144 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 5-bit quantized version of gemma-4-12B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 12B parameters 262,144 tokens transformers

Model · Any to any

gemma-4-12B

Google

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…

Open weights apache-2.0 12B parameters 262,144 tokens transformers