Downloads · 30 days
22
29% of all-time downloads
mahadev9/gemma-4-E2B-it-fp8
gemma-4-E2B-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-E2B-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
22
29% of all-time downloads
All-time downloads
75
Public
Parameters
5.1B
17.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors9.1 GB · 100%
How the weights are stored.
BF163.9B · 77%
From the Hugging Face model README
FP8 (W8A8 dynamic) quantization of google/gemma-4-E2B-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.2176 | 87.01% |
| agentic | 25,569 | 0.0278 | 95.91% |
| overall | 49,341 | 0.1192 | 91.62% |
Holds up much better than gemma-4-E2B-it-nvfp4 (overall mean KL 0.73, 76.1% top-1) - recommended over the 4-bit version for this model. Like the other Gemma-4 quants, it does better on agentic/ tool-calling text than on general prose, the opposite pattern from the Qwen quants.
vLLM:
vllm serve mahadev9/gemma-4-E2B-it-fp8
transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"mahadev9/gemma-4-E2B-it-fp8", torch_dtype="auto", device_map="auto"
)
tok = AutoTokenizer.from_pretrained("mahadev9/gemma-4-E2B-it-fp8")