Instructions to use google/gemma-4-E4B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-E4B-it with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-E4B-it") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-E4B-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
BF16 vs 4bit QAT benchmark on RTX 5060 Ti (vLLM 0.29): 32 min runtime and almost zero quality loss in 4bit
#55
by Mausbiber - opened
Hi everyone,
I ran a direct comparison between the unquantized BF16 google/gemma-4-E4B-it (14.9 GiB weights) and the 4bit QAT version (xbill9/gemma-4-E4B-it-qat-q4_0-w4a16-ct-text-ple4, 4.7 GiB weights) on 2x NVIDIA RTX 5060 Ti (32 GB VRAM, vLLM 0.29.0, 131k context).
Unlike standard post training quantization on small models, Google's QAT holds up remarkably well in 4bit while nearly doubling speed:
- Throughput (
vllm bench serve):219.2 tok/s(4bit QAT) vs118.5 tok/s(BF16) - Thinking On Overall:
44.3%in32 minutes(BF16) vs43.1%in21 minutes(4bit QAT) - IFBench (Thinking On):
40.70%(4bit QAT) vs40.12%(BF16) - IFEval (Thinking On):
84.47%(4bit QAT) vs87.25%(BF16) - Thinking Off Overall:
21.2%(4bit QAT) vs19.6%(BF16), with23.73%on SciCode for the 4bit QAT checkpoint
Finishing the entire 3 benchmark reasoning suite (1,841 prompts) in just 21 to 32 minutes makes E4B the most time efficient model in our entire test.
Full interactive table:
https://llmbenchmarks.io/local-gpu-benchmarks/
Mausbiber changed discussion title from Full local GPU benchmark results (Score, real runtime & time-efficiency, Thinking ON vs OFF) to BF16 vs 4bit QAT benchmark on RTX 5060 Ti (vLLM 0.29): 32 min runtime and almost zero quality loss in 4bit