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.
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).
Quantization recipe
llmcompressor
, scheme
FP8_DYNAMIC
, data-free (no calibration data). Ignore list keeps the head and the multimodal projectors in BF16:
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):
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).
gemma-4-12B-it-FP8-dynamic huggingface.co is an AI model on huggingface.co that provides gemma-4-12B-it-FP8-dynamic's model effect (), which can be used instantly with this coolthor gemma-4-12B-it-FP8-dynamic model. huggingface.co supports a free trial of the gemma-4-12B-it-FP8-dynamic model, and also provides paid use of the gemma-4-12B-it-FP8-dynamic. Support call gemma-4-12B-it-FP8-dynamic model through api, including Node.js, Python, http.
gemma-4-12B-it-FP8-dynamic huggingface.co is an online trial and call api platform, which integrates gemma-4-12B-it-FP8-dynamic's modeling effects, including api services, and provides a free online trial of gemma-4-12B-it-FP8-dynamic, you can try gemma-4-12B-it-FP8-dynamic online for free by clicking the link below.
coolthor gemma-4-12B-it-FP8-dynamic online free url in huggingface.co:
gemma-4-12B-it-FP8-dynamic is an open source model from GitHub that offers a free installation service, and any user can find gemma-4-12B-it-FP8-dynamic on GitHub to install. At the same time, huggingface.co provides the effect of gemma-4-12B-it-FP8-dynamic install, users can directly use gemma-4-12B-it-FP8-dynamic installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
gemma-4-12B-it-FP8-dynamic install url in huggingface.co: