Downloads · 30 days
20
8% of all-time downloads
undeadindustries/gemma-4-31b-it-nvfp4-hybrid
gemma-4-31b-it-nvfp4-hybrid is a text generation model from undeadindustries. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is the main model. Pair it with undeadindustries/gemma-4-31b-it-dflash-drafter-nvfp4 for optional speculative-decoding speedup on vLLM.
Downloads · 30 days
20
8% of all-time downloads
All-time downloads
258
Public
Repo size
31.5 GB
Likes
1
Public
Click a slice to open those files.
.safetensors31.5 GB · 100%
From the Hugging Face model README
This is the main model. Pair it with
undeadindustries/gemma-4-31b-it-dflash-drafter-nvfp4
for optional speculative-decoding speedup on vLLM.
| Role | Repo | Size | Required? |
|---|---|---|---|
| Verifier (this repo) | gemma-4-31b-it-nvfp4-hybrid | ~30 GB | Yes — this is the 31B brain |
| DFlash drafter | gemma-4-31b-it-dflash-drafter-nvfp4 | ~8 GB | Optional — guesses tokens; verifier always has final say |
Use together: load the verifier as your main vllm serve model and point --speculative-config at the drafter. The drafter was trained on hidden states from this exact quant — a generic drafter trained on BF16 Gemma will not work well (acceptance collapses).
Verifier-only is fine if you only want quality + smaller footprint (~30 GB vs ~62 GB BF16). You do not need the drafter for correct answers.
Hand-tuned hybrid NVFP4 of google/gemma-4-31b-it for instruction following and long-document work on memory-constrained Blackwell boxes (e.g. 128 GB unified memory):
q/k/v/o) — protects dynamic range for 256K-class reasoning and needle-in-haystack retrievalgate/up/down) — ~2× weight compression on the bulk of parametersGemma4ForCausalLM architectureDesign goal: smallest practical footprint that keeps -it instruction behavior, not maximum compression at any quality cost.
| Component | Precision |
|---|---|
| Attention projections | BF16 (all 60 layers; v_proj on 50 sliding layers only — Gemma 4 global layers use shared K/V) |
MLP (gate/up/down) | NVFP4 W4A4, group_size=16 |
| KV cache (recommended) | BF16 — avoid FP8 KV default on Gemma 4 hybrid SWA |
Built with AutoRound scheme=NVFP4, exported as llm-compressor / nvfp4-pack-quantized for vLLM.
Greedy /v1/chat/completions (required for -it models):
FlashInferCutlassNvFp4LinearKernel)vllm serve undeadindustries/gemma-4-31b-it-nvfp4-hybrid \
--port 8000 --max-model-len 4096 \
--gpu-memory-utilization 0.55 --enforce-eager --trust-remote-code \
--generation-config vllm
vllm serve undeadindustries/gemma-4-31b-it-nvfp4-hybrid \
--port 8000 --max-model-len 4096 \
--gpu-memory-utilization 0.55 --enforce-eager --trust-remote-code \
--generation-config vllm \
--max-num-batched-tokens 8192 --max-num-seqs 64 \
--speculative-config '{"model":"undeadindustries/gemma-4-31b-it-dflash-drafter-nvfp4","method":"dflash","num_speculative_tokens":15}'
Requires vLLM ≥ 0.20.2 (e.g. vllm-node:latest). Combined weights: ~36 GB VRAM.
Observed speculative acceptance_length ~1.19 with the paired drafter — modest speedup, no quality regression when using chat API.
~30 GB = weights. vLLM may reserve ~55–67 GB total for KV cache and batch slots at default utilization — that is headroom, not model size.
Derived from google/gemma-4-31b-it (Apache 2.0).
Subject to Gemma Terms of Use.