Instructions to use AtomicChat/gemma-4-E2B-it-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AtomicChat/gemma-4-E2B-it-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AtomicChat/gemma-4-E2B-it-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("AtomicChat/gemma-4-E2B-it-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("AtomicChat/gemma-4-E2B-it-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AtomicChat/gemma-4-E2B-it-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AtomicChat/gemma-4-E2B-it-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AtomicChat/gemma-4-E2B-it-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AtomicChat/gemma-4-E2B-it-NVFP4
- SGLang
How to use AtomicChat/gemma-4-E2B-it-NVFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AtomicChat/gemma-4-E2B-it-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AtomicChat/gemma-4-E2B-it-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AtomicChat/gemma-4-E2B-it-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AtomicChat/gemma-4-E2B-it-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AtomicChat/gemma-4-E2B-it-NVFP4 with Docker Model Runner:
docker model run hf.co/AtomicChat/gemma-4-E2B-it-NVFP4
Gemma 4 E2B, self-quantized to NVFP4 by Atomic Chat. Built straight from Google's original weights with a per-tensor importance matrix, so this is not a repack of somebody else's files. Runs fully offline.
Highlights
- 2.3B effective (5.1B with embeddings) parameters: the weights this repo quantizes.
- Context length: 128K tokens, as published by Google.
- 35 layers: Dense decoder, hybrid sliding-window (512) and global attention.
- Modalities: Text, Image, Audio.
- Full imatrix ladder: every quant is calibrated with an importance matrix.
- Reasoning: All models in the family are designed as highly capable reasoners, with configurable thinking modes.
- Diverse & Efficient Architectures: Offers Dense and Mixture-of-Experts (MoE) variants of different sizes for scalable deployment.
These NVFP4s are self-quantized from the original weights, not a repack. The importance matrix keeps low-bit quants closer to the full-precision model.
Model Overview
| Property | Value |
|---|---|
| Base model | google/gemma-4-E2B-it |
| Parameters | 2.3B effective (5.1B with embeddings) |
| Layers | 35 |
| Sliding window | 512 tokens |
| Context length | 128K tokens |
| Vocabulary | 262K |
| Modalities | Text, Image, Audio |
| Architecture | Dense decoder, hybrid sliding-window (512) and global attention, 8 attention heads over 1 KV head, Gemma4ForConditionalGeneration |
| This repo | NVFP4 weights |
Benchmarks
| Benchmark | Score |
|---|---|
| MMLU Pro | 60.0% |
| AIME 2026 no tools | 37.5% |
| LiveCodeBench v6 | 44.0% |
| Codeforces ELO | 633 |
| GPQA Diamond | 43.4% |
| Tau2 (average over 3) | 24.5% |
| BigBench Extra Hard | 21.9% |
| MMMLU | 67.4% |
| MMMU Pro | 44.2% |
| OmniDocBench 1.5 (average edit distance, lower is better) | 0.290 |
| MATH-Vision | 52.4% |
| MedXPertQA MM | 23.5% |
| CoVoST | 33.47 |
| FLEURS (lower is better) | 0.09 |
| MRCR v2 8 needle 128k (average) | 19.1% |
Scores are Google's published results for the base google/gemma-4-E2B-it, not our own measurements. Quantization preserves the large majority of this; Q4_K_M and up stay close to full precision.
Get started
- Atomic Chat: search
AtomicChat/gemma-4-E2B-it-NVFP4and hit Use this model. - vLLM:
vllm serve AtomicChat/gemma-4-E2B-it-NVFP4 --max-model-len 8192
Best practices
| Parameter | Value |
|---|---|
| temperature | 1.0 |
| top_p | 0.95 |
| top_k | 64 |
Google's recommended sampling configuration for google/gemma-4-E2B-it.
How these were made
- Download
google/gemma-4-E2B-it(original weights). - Quantize to NVFP4 with
llm-compressorover a calibration corpus.
License
Original model by Google, released under the Apache 2.0 license. Full terms: Apache 2.0. Quantized by Atomic Chat.
- Downloads last month
- 48


