Gemma 3 4B
4B Gemma 3 for edge. Multimodal.
Our verdict
Positioning
Gemma 3 4B is Google's lightweight dense model — the smallest member of the Gemma 3 family, designed for the "runs on anything, surprisingly competent" tier. At 4B parameters, it fits a phone, a Raspberry Pi, or a laptop with integrated graphics. The operator-grade question: "is Gemma 3 4B the best sub-8B model for resource-constrained deployments, or has Qwen 3 30B-A3B with MoE architecture made parameter-count comparisons misleading?"
Strengths
- Runs anywhere. 4B at Q4_K_M is ~2.5 GB — fits integrated graphics, mobile devices, Raspberry Pi 5, and any laptop. The most accessible model in the Gemma 3 family.
- Surprisingly capable for 4B. Gemma 3 4B punches above its parameter-count weight. Simple reasoning, summarization, classification, and basic chat are functional and useful.
- Fast inference. 4B dense decodes at 100+ tok/s on RTX 4090, 50+ tok/s on CPU-only via llama.cpp. Responsiveness is excellent.
- Good for constrained tasks. Text classification, entity extraction, simple Q&A, grammar correction, and basic summarization all work well. It's a task-specific tool, not a general assistant.
- Permissive Gemma license. Less restrictive than Llama's MAU clause. Verify specific terms for your use case.
- Google's Gemma ecosystem. Works with Ollama, llama.cpp, MLX-LM on Apple Silicon, and standard inference stacks.
- Good for edge deployment. IoT devices, on-device processing, privacy-preserving local inference — the 4B footprint enables deployment scenarios that larger models simply can't fit.
Limitations
- 4B parameter ceiling is real. Complex reasoning, multi-step analysis, nuanced instruction-following, and creative writing all hit the small-model wall. This is not a daily-driver model for complex tasks.
- Hallucination rate is higher than larger models. Small models are less factually grounded. Factual accuracy and knowledge recall are meaningfully worse than Gemma 4 31B or Qwen 3 32B.
- Context window spec is optimistic. Despite 8K spec, practical quality degrades past 4K tokens. Keep prompts short and focused.
- Not suitable for agent workflows. Tool-use, function-calling, multi-step chains — 4B models don't have the reasoning depth for reliable agentic behavior.
- Knowledge cutoff is Gemma 3's training window. Like all models, training data recency limits knowledge. RAG is recommended even for simple factual queries.
- English-biased. Gemma 3 4B's multilingual quality is weak. Non-English tasks should use Qwen 3 30B-A3B or larger multilingual models.
- Not a substitute for larger models. Some tasks seem simple enough for 4B but require nuance that only larger models provide. Test your specific task before deploying.
Real-world performance
- vs Gemma 4 31B: Larger Gemma is dramatically more capable but needs 10× the VRAM. Gemma 3 4B is the ultra-lightweight option in the same family for different deployment constraints.
- vs Qwen 3 30B-A3B: Qwen 3 30B-A3B is an MoE with ~3B active but 30B total — much higher quality than 4B dense at similar decode speed. For 16-GB+ cards, the Qwen MoE is dramatically better. For sub-8-GB devices, Gemma 3 4B wins by fitting.
- vs CodeGemma 7B: CodeGemma 7B is code-specialized. Gemma 3 4B is general-purpose at half the size. For code tasks on small hardware, CodeGemma; for general tasks, Gemma 3 4B.
- vs Llama 3.3 70B: Not a comparison — completely different weight classes. Gemma 3 4B is for resource-constrained edge deployment; Llama 70B is for workstation-class hardware.
- vs DeepSeek R1 Distill Llama 8B: R1-distill 8B is a reasoning specialist at twice the size. Gemma 3 4B is a general-purpose lightweight. For reasoning on small hardware, R1-distill 8B; for general tasks on smallest hardware, Gemma 3 4B.
Should you run this locally?
Yes if you need a model that runs on extremely constrained hardware — Raspberry Pi, old laptop, integrated graphics, smartphone, IoT device. Gemma 3 4B is the best sub-5B model available. For simple tasks (classification, extraction, basic Q&A), it's surprisingly useful.
Yes if you need ultra-low-latency inference for high-throughput simple tasks. At 100+ tok/s, it's suitable for real-time applications that need basic language understanding.
No if you have a GPU with 8+ GB VRAM. Qwen 3 30B-A3B fits 8-GB cards at low quants and delivers dramatically better quality at similar speed. The 4B → MoE quality jump is enormous.
Probably not if your tasks require any depth. Summarizing long documents, complex reasoning, creative writing, and nuanced conversation all exceed 4B capabilities.
How it compares
- vs Qwen 3 30B-A3B: Qwen MoE is dramatically better at similar speed for 8+ GB cards. Gemma 3 4B wins ultra-low-VRAM (sub-4 GB).
- vs CodeGemma 7B: CodeGemma is for code; Gemma 3 4B is general-purpose. Different domains, similar deployment tier.
- vs DeepSeek R1 Distill Llama 8B: R1-distill is for reasoning; Gemma 3 4B is for general tasks. Different specializations.
- vs Gemma 4 31B: Same family, different sizes. 4B for edge; 31B for workstation. Complementary, not competitive.
- vs Llama 3.3 70B: Different weight classes entirely. Both have valid deployment scenarios at opposite ends of the hardware spectrum.
Run this yourself
- Any device with 4+ GB RAM: Ollama pull gemma3:4b-instruct-q4_K_M.
- CPU-only laptop: llama.cpp with -ngl 0 for CPU-only inference.
- Apple Silicon Mac: MLX-LM for optimized Metal inference on MacBook Pro M4 Max.
- Raspberry Pi 5 (8 GB): llama.cpp with 4 threads — 8-12 tok/s acceptable for basic tasks.
- Vendor: huggingface.co/google/gemma-3-4b-it
›Why this rating
7.5/10 — best 4B-class general model when you want multimodal at edge size. Loses to Phi-3.5 Mini on math + structured tasks but beats it on chat naturalness.
Overview
4B Gemma 3 for edge. Multimodal.
How to run it
Gemma 3 4B is Google's smallest dense model — 4B parameters, designed for the "runs on literally anything" tier. Run at Q4_K_M via Ollama (ollama pull gemma3:4b) or llama.cpp with -ngl 999 -fa -c 4096. Q4_K_M file size ~2.5 GB on disk. Minimum VRAM: 2 GB — integrated graphics, phone GPU, or any discrete GPU. CPU-only works fine at 10-20 tok/s on modern laptop. Recommended: any device with 4+ GB RAM. Throughput: ~100-150+ tok/s on RTX 4090 at Q4_K_M — flies. ~15-25 tok/s CPU-only on MacBook Air. Gemma 3 architecture — well-supported everywhere. The 4B is the tiny-but-capable tier: good for text classification, extraction, simple Q&A, grammar correction, lightweight chat. Not for: complex reasoning, long-form generation, nuanced conversation, coding — 4B is the quality ceiling. Context: 8K advertised; practical at Q4 is 8K on any device. For step-up: Gemma 3 12B or Granite 3 MoE 3B-Active for MoE at similar active size with better quality. License: Gemma license (permissive, verify commercial terms). Gemma 3 4B is the default recommendation for edge/mobile/CPU-only when quality requirements are modest and speed + deployability matter most.
Hardware guidance
Minimum: 2 GB RAM CPU-only at Q4_K_M (~5-10 tok/s). Raspberry Pi 5 8GB: Q4 at 10-18 tok/s. Phone: runs via MLC LLM or llama.cpp Android at 5-10 tok/s. VRAM math: 4B dense, Q4_K_M ≈ 2.5 GB. KV cache at 4K: ~0.5 GB. Total: ~3 GB at 4K. Any discrete GPU from GTX 1050 upward fits comfortably. RTX 4090 24GB: absurdly over-provisioned — but delivers 150+ tok/s. CPU-only on modern laptop (16 GB RAM): 10-20 tok/s. Intel integrated graphics: 8-15 tok/s via llama.cpp Vulkan backend. MacBook Air M1 8GB: Q4 at 15-25 tok/s via MLX-LM. This is the most deployable model — runs on phones, Raspberry Pi, old laptops, AWS t3.micro. The hardware floor is essentially "any device made after 2018."
What breaks first
- 4B quality ceiling. The model's fundamental capability is limited by 4B parameters. Complex reasoning, nuanced understanding, and deep knowledge recall hit the wall hard. 2. Hallucination rate. Small models hallucinate more. Gemma 3 4B will confidently produce incorrect facts more often than 7B+ models. Don't treat it as a knowledge base. 3. Context window overclaim. 8K is advertised but usable context at 4B degrades past 4K tokens. The model loses track of earlier context. Keep prompts concise. 4. Not multilingual. Gemma 3 4B's multilingual quality is weak. English is strongest; other languages may produce broken or English-mixed outputs.
Runtime recommendation
Common beginner mistakes
Mistake: Deploying Gemma 3 4B for tasks that need reasoning depth. Fix: 4B is a lightweight model. For complex tasks, use at least Gemma 4 26B MoE or Qwen 3 32B. Mistake: Running 8K context and expecting coherent outputs. Fix: 4B quality degrades past 4K context. Keep prompts short and focused. Mistake: Using Gemma 3 4B as a production knowledge base. Fix: 4B models hallucinate more. Pair with RAG on vetted documents for factual tasks. Mistake: Over-provisioning hardware ("I need an RTX 4090 for this"). Fix: It runs on a phone. You don't need a powerful GPU. CPU-only inference at 10-20 tok/s is perfectly usable for chat.
Family & lineage
How this model relates to others in its lineage. Family members share architecture and training-data roots; parent / children edges record direct distillation or fine-tune relationships.
Strengths
- Multimodal at 4B
- Edge-class
Weaknesses
- License restrictions
Quantization variants
Each quantization trades model quality for file size and VRAM. Q4_K_M is the most popular starting point.
| Quantization | File size | VRAM required |
|---|---|---|
| Q4_K_M | 2.5 GB | 4 GB |
| Q8_0 | 4.4 GB | 6 GB |
Get the model
Ollama
One-line install
ollama run gemma3:4bRead our Ollama review →HuggingFace
Original weights
Source repository — direct quantization required.
Hardware that runs this
Cards with enough VRAM for at least one quantization of Gemma 3 4B.
Models worth comparing
Same parameter band, plus what's one tier above and below — so you can decide what actually fits your hardware.
Frequently asked
What's the minimum VRAM to run Gemma 3 4B?
Can I use Gemma 3 4B commercially?
What's the context length of Gemma 3 4B?
How do I install Gemma 3 4B with Ollama?
Does Gemma 3 4B support images?
Source: huggingface.co/google/gemma-3-4b-it
Reviewed by RunLocalAI Editorial. See our editorial policy for how we research and verify model claims.
Related — keep moving
Verify Gemma 3 4B runs on your specific hardware before committing money.