CoolFace
Modelpublic

LibertAIDAI/Gemma-4-12B-IT-NVFP4-GGUF

sourceHugging Facegemmaupdated 4mo agoView on Hugging Face
6likes1.1kdownloads
Model Card

Gemma-4-12B-IT NVFP4 GGUF

NVFP4 GGUF quantizations of google/gemma-4-12B-it, for use with llama.cpp.

The dense FFN tensors (all 48 layers × 3 projections = 144 tensors) are quantized to NVFP4 — NVIDIA's 4-bit float with FP8-E4M3 block scale over 16-element groups. The remaining tensors (attention, embeddings, output) use a conventional GGUF quant; three variants are provided.

NVIDIA shipped official NVFP4 weights for Gemma-4-31B and the 26B-A4B MoE, but not the dense 12B — so we calibrated it ourselves with NVIDIA ModelOpt (cnn_dailymail, NVFP4 MLP-only, matching NVIDIA's 31B recipe). The ModelOpt source checkpoint is at [LibertAIDAI/Gemma-4-12B-IT-NVFP4](https://huggingface.co/LibertAIDAI/Gemma-4-12B-IT-NVFP4).

About LibertAI

LibertAI is a decentralized AI platform — private inference, an OpenAI-compatible API, and a chat UI, all running on community GPUs over Aleph Cloud instead of a single company's servers. No accounts required to chat, no logs sent home, and the same models you'd self-host are available behind a sovereign endpoint.

If you want to put this model to work as an autonomous agent without running your own infrastructure, check out **LiberClaw** — Hermes-style agents hosted on Aleph Cloud with LibertAI inference. Free tier: 2 agents, no credit card, 5 minutes to deploy. Open source.

Why NVFP4? On NVIDIA Blackwell GPUs (RTX 50-series, B100/B200), llama.cpp uses native NVFP4 tensor-core MMA kernels (added in llama.cpp #22196) for the FFN matmul — the dominant compute cost during inference. On older GPUs the path falls back to dp4a/MMQ kernels, where these GGUFs run but offer no perf advantage over standard K-quants.

Files

FileSizeFFNOther tensorsWhen to pick
Gemma-4-12B-IT-NVFP4-Q4_K_M.gguf6.5 GiBNVFP4Q4KMRecommended. Fastest serving throughput on Blackwell + smallest VRAM footprint
Gemma-4-12B-IT-NVFP4-Q8_0.gguf7.8 GiBNVFP4Q8_0Higher-precision attention/embeddings if you have the VRAM
Gemma-4-12B-IT-NVFP4-BF16.gguf10.8 GiBNVFP4BF16Max quality (preserves source precision); slower in practice — only for bit-for-bit source fidelity
Text in / text out. This release is text-only. Gemma-4-12B-it is the unified (gemma4_unified) variant whose vision+audio towers use a transformer-less, soft-token design that llama.cpp's multimodal converter does not yet support, so no mmproj is shipped. The 144 NVFP4 FFN tensors and full text model are unaffected.

Performance

Measured on an NVIDIA RTX 5090 (32 GB, Blackwell, sm_120), llama.cpp build b9341-dbe9c0c8c.

Batched serving (llama-batched-bench, 512 in / 128 out per request)

[image]

NVFP4-Q4_K_M wins on total serving throughput across the board, with the largest gains at the moderate batch sizes that dominate real serving — +15% at 4 parallel, +21% at 8 parallel (and matching token-generation gains of +14% / +20%). At single stream the two are tied; at very high concurrency (16 parallel) total throughput still leads (+5%) while per-token generation converges (the regime becomes attention/KV-bound, where both keep attention in the same precision). It also uses less VRAM (6.5 vs 6.9 GiB), leaving more room for KV cache.

Variant comparison (single-stream, llama-bench, -r 3)

VariantSizePP512 (tok/s)TG64 (tok/s)
NVFP4-Q4_K_M6.52 GiB9914147.5
NVFP4-Q8_07.83 GiB9587129.3

Usage

bash
llama-cli -m Gemma-4-12B-IT-NVFP4-Q4_K_M.gguf -ngl 999 -c 8192 -p "Your prompt here"
bash
llama-server -m Gemma-4-12B-IT-NVFP4-Q4_K_M.gguf -ngl 999 -c 32768 --host 0.0.0.0 --port 8080

Gemma 4 is a reasoning model — it emits a thinking trace before its answer by default.

About the architecture

Gemma-4-12B-IT is an ~11.9B-parameter dense decoder (48 layers) with a hybrid local-sliding + global attention scheme — every 6th layer is a full-attention layer with a larger unified-KV head dim, the rest are sliding-window. The NVFP4 quantization covers the 48 × 3 dense FFN projections; attention projections, embeddings and lm_head stay at higher precision in the source (that's why the -BF16 variant is comparatively large).

Sources & credits

License

Inherits the Gemma license from the upstream model.