Downloads · 30 days
17
27% of all-time downloads
mahadev9/gemma-4-E2B-it-nvfp4
gemma-4-E2B-it-nvfp4 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.
NVFP4 (W4A4) 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 precision…
Downloads · 30 days
17
27% of all-time downloads
All-time downloads
62
Public
Parameters
5.1B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.5 GB · 100%
How the weights are stored.
BF163.9B · 77%
From the Hugging Face model README
NVFP4 (W4A4) 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 | 1.1894 | 65.79% |
| agentic | 25,569 | 0.2945 | 85.66% |
| overall | 49,341 | 0.7257 | 76.09% |
Significant degradation remains at 4-bit even with the sensitive-layer exclusions above, especially on general prose - this is a small (E2B) model and 4-bit weights+activations hit it hard. For most uses prefer gemma-4-E2B-it-fp8, which is far closer to the baseline.
vLLM:
vllm serve mahadev9/gemma-4-E2B-it-nvfp4
transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"mahadev9/gemma-4-E2B-it-nvfp4", torch_dtype="auto", device_map="auto"
)
tok = AutoTokenizer.from_pretrained("mahadev9/gemma-4-E2B-it-nvfp4")