Downloads · 30 days
30
35% of all-time downloads
mahadev9/gemma-4-31B-it-fp8
gemma-4-31B-it-fp8 is a machine learning model from mahadev9. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
FP8 (W8A8 dynamic) quantization of google/gemma-4-31B-it, produced with llm-compressor. lmhead, the vision/audio towers, mlp.downproj, selfattn.oproj, and the first/last transformer layers are kept in the original pre…
Downloads · 30 days
30
35% of all-time downloads
All-time downloads
85
Public
Parameters
31.3B
77.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors77.2 GB · 100%
How the weights are stored.
F8_E4M318.6B · 60%
From the Hugging Face model README
FP8 (W8A8 dynamic) quantization of google/gemma-4-31B-it,
produced with llm-compressor.
lm_head, the vision/audio towers, mlp.down_proj, self_attn.o_proj, and
the first/last transformer layers are kept in the original precision - the
layers most consistently found to be quantization-sensitive - to recover
agentic/tool-calling quality.
KL divergence of the quantized model's next-token distribution vs the bf16
baseline (seq len 2048). prose is WikiText-2; agentic is tool-calling
turns (schema + query + call) rendered with the chat template.
| bucket | tokens | mean KL | top-1 agreement |
|---|---|---|---|
| prose | 23,772 | 0.4617 | 80.70% |
| agentic | 25,569 | 0.1038 | 93.37% |
| overall | 49,341 | 0.2762 | 87.26% |
Like the smaller gemma-4-E2B-it-fp8, this holds up better on agentic/tool-calling text than on general prose - the opposite pattern from the Qwen quants. Worth weighing against your actual workload before deploying.
vLLM:
vllm serve mahadev9/gemma-4-31B-it-fp8
transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"mahadev9/gemma-4-31B-it-fp8", torch_dtype="auto", device_map="auto"
)
tok = AutoTokenizer.from_pretrained("mahadev9/gemma-4-31B-it-fp8")