whatmodel.sh / Gemma 3 4B
Gemma 3 4B
↗ share
+ contribute
Gemma 3 4B is an open-weights language model from Google, released March 2025. Its published size is 4.3B parameters and a 131k-token context window. Licence: gemma.
$ how it compares
The LLMs ranked either side of Gemma 3 4B, out of 828 with a score, then more from Google.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 542 | 44±1 | local | |||
| 543 | 44±3 | local | |||
| 544 | 44±1 | api $0.063/M +local | |||
| 545 | 44±2 | local | |||
| 546 | 44±1 | local | |||
| more from Google | |||||
| 9 | 82±1 | limited preview | |||
| 23 | 77±1 | api $1.50/M | |||
| 32 | 76±1 | api $1.50/M | |||
$ what it's good at
agent tasks▁▁▃▆█▆▅▅▅▄▃▁ #285 of 300 * · 2.3% of its score · 2 tests
Beats DBRX Instruct, Olmo 3 7B Instruct, QwQ-32B-Preview here, though they rank higher overall. Trails Granite 4.0 H 350M, ChatGLM3-6B, Qwen3 0.6B here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| BFCL V4 (December 2025 archive) | 19.6% ✎ | ▁▁▁▃██▅▅▆▂▂▂ beats 5/77 | 1.4% |
| BFCL v3 | 39.6% ✎ | ▁▁▁▁▃▃▅█▅▄▁▁ beats 14/114 | 0.9% |
coding▁▁▁▃▆██▇▆▄▃▁ #361 of 458 · 11% of its score · 5 tests
Beats LFM2.5 8B-A1B, Qwen3-VL 2B Thinking, DeepSeek R1 Distill Qwen 7B here, though they rank higher overall. Trails Qwen2.5 1.5B Instruct, Phi-3-mini-128k-instruct (Apr 2024), OpenHermes 2.5 Mistral 7B here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEval lab | 71.3% ✎ | ▁▁▁▁▁▃▅▅█▃▂▁ beats 126/190 | 4.6% |
| MBPP lab | 63.2% ✎ | ▁▁▁▄▅█▄▅▃▁▂▁ beats 54/81 | 2.4% |
| LiveCodeBench (version unspecified) lab | 12.6% ✎ | ▁···▃▁▃▅▅█▄▅ beats 1/37 | 1.8% |
| VisEditBench strict pass rate (1,395 visualization-code editing tasks) | 21.3% ✎ | ▄··█·▄··▄█·▄ beats 0/7 | 1.7% |
| BIRD-SQL (dev) lab | 36.3% ✎ | ▂·······▃▂█▆ beats 1/11 | 0.8% |
chat & writing▁▁▁▃▅▄▅█▆▆▇▃ #219 of 393 · 7.0% of its score · 3 tests
Beats Granite 4.2 8B, Mistral Small 4 (119B-A6.5B), Olmo 3.1 32B Think here, though they rank higher overall. Trails LFM2.5 1.2B Instruct here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| LMArena (text) | 1303.2 ✎ | ▁▁▁▂▃▃▃▆▆▇█▃ beats 130/379 | 3.9% |
| IFEval mean of four measures | 76.8% ✎ | █··▄▄·▄····▄ beats 2/5 | 2.2% |
| IFEval (aggregation unspecified) lab | 90.2% ✎ | ▁▁▃▁▂▄▄▆█▃▂▁ beats 117/141 | 0.9% |
math▁▂▃▅▆▅▄█▄▁▁▁ #254 of 398 · 11% of its score · 6 tests
Beats GPT-4 Turbo (2024-04-09), Molmo 2 8B, Llama 3.3 70B Instruct here, though they rank higher overall. Trails DeepSeek R1 Distill Qwen 1.5B, Mixtral 8x7B v0.1 (base), Tulu 2 DPO 70B here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| GSM8K lab | 89.2% ✎ | ▂▂▂▅▅▆▅▇█▇▄▃ beats 123/146 | 4.1% |
| MATH (subset unspecified) lab | 75.6% ✎ | ▂▄▄▃█▇▅▆▄▃▄▁ beats 48/80 | 3.1% |
| MATH-500 | 73.2% ✎ | ▃····▃·█···▃ beats 2/5 | 1.9% |
| MathVista (testmini) lab | 50.0% ✎ | ▁··▁▄▄▇█▅▆█▄ beats 8/47 | 1.6% |
| OTIS mock AIME 2024–2025 | 7.5% ✎ | ▃▃▄▃▃▃▇▇█▃▂▅ beats 43/193 | 0.4% |
| GSM8K loose substring accuracy | 89.9% ✎ | █·█··███···█ beats 5/5 | 0.2% |
vision & documents▃▁▃▂▁▃▄▂▆▇█▄ #146 of 147 · 8.5% of its score · 10 tests
Trails Qwen2-VL 2B Instruct, Phi-3.5-vision-instruct, Qwen3.5 0.8B here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| VisEditBench strict pass rate (1,395 visualization-code editing tasks) | 21.3% ✎ | ▄··█·▄··▄█·▄ beats 0/7 | 1.7% |
| MathVista (testmini) lab | 50.0% ✎ | ▁··▁▄▄▇█▅▆█▄ beats 8/47 | 1.6% |
| MMMU (val) lab | 48.8% ✎ | ▁····▁▁▄█▇▆▆ beats 7/52 | 1.5% |
| InfographicVQA lab | 50.0% ✎ | ▃·▃▅█▃▃▃▃▃▃▃ beats 0/13 | 1.2% |
| VQAv2 (val) lab | 62.4% ✎ | ▃▅▃█·▃▅·▃·▃▅ beats 0/13 | 0.7% |
| ChartQA lab | 68.8% ✎ | ▁··▁▁▁▁▃▂▅▅█ beats 5/44 | 0.5% |
| VMMU (Vietnamese multimodal understanding and reasoning, mean accuracy over 7 tasks) | 25.4% ✎ | ▅······▃·▅·█ beats 0/7 | 0.5% |
| DocVQA lab | 75.8% ✎ | ▃··▃▁▁▁▇█▇▄▅ beats 0/28 | 0.5% |
other tests29 not in a task · 63% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| GPQA Diamond +2 | 23.2% ✎ | ▃▁▁▁▂▄▆▄▅▇█▅ beats 4/208 | 8.5% |
| MMLU +1 | 58.4% ✎ | ▄█···█·····▄ beats 0/5 | 6.6% |
| Medmarks-V mean win rate (19 verifiable medical benchmarks, 71 configurations) | 0.3214 ✎ | ▃▄▃▃▇▄█▃▅▁▁▁ beats 0/30 | 5.9% |
| BIG-Bench Hard lab | 72.2% ✎ | ▁▁▁▁▂▄▅▅█▃▄▁ beats 99/129 | 5.6% |
| MMLU-Pro +1 | 34.8% ✎ | ███···██···█ beats 3/5 | 3.8% |
| Global-MMLU-Lite lab | 54.5% ✎ | ▂···▃·▂▂▂·██ beats 1/12 | 2.7% |
| Medmarks-V weighted mean win rate (61 models, 71 configurations) | 32.1% ✎ | ▃▃▅▂▆▃█▅█▅▃▆ beats 0/34 | 2.7% |
| MIMIC-CDM full information (4 pathologies) | 69.4% ✎ | ▄·······▄█·▄ beats 1/4 | 2.5% |
21 more tests
$ where to run it
Through an API
api · DeepInfra · $0.063/M · $0.05 in / $0.1 out per 1M tokens · 131k context · deepinfra.com ↗ · price sourceUSD per 1M text tokens, standard uncached input and output. Product: Serverless text generation. API model: google/gemma-3-4b-it. Settings: service tier=standard, batch=no, cache=uncached input. Additional/excluded charges: Tools, cache storage, priority service and other modalities excluded.. Currency: USD.
llama.cpp · recommended
version
- Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.macOS / Linux
curl -LsSf https://llama.app/install.sh | shWindowsirm https://llama.app/install.ps1 | iex - Run Gemma 3 4B · needs ~2.5 GB · from huggingface.co/ggml-orgchat in the terminal
llama cli -hf ggml-org/gemma-3-4b-it-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf ggml-org/gemma-3-4b-it-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run Gemma 3 4B · needs ~2.5 GB · from huggingface.co/ggml-org
- Or download it in the terminal
lms get https://huggingface.co/ggml-org/gemma-3-4b-it-GGUF@Q4_K_M -y - Then run lms ls to see its name, and lms chat followed by that name
Ollama
version
- Install Ollama
download it (macOS / Windows) ↗
Linuxcurl -fsSL https://ollama.com/install.sh | sh - Run Gemma 3 4B · needs ~3.08 GB · from ollama.comchat in the terminal
ollama run gemma3:4b
MLX (Mac)
version
- Install MLX (Mac) · Apple silicon Macs only, text only.with uv
uv tool install mlx-lmorpip install mlx-lm - Run Gemma 3 4B · needs ~2.2 GB, Mac only · from huggingface.co/Outlier-Aichat in the terminal
mlx_lm.chat --model Outlier-Ai/gemma-3-4b-it-MLX-4bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model Outlier-Ai/gemma-3-4b-it-MLX-4bit
Official weights and documentation: huggingface.co/google ↗
$ how the score was worked out · Google DeepMind Gemma 3 270M… 40%, LFM2 Technical Report — Liqui… 19%, Medmarks: A Comprehensive Ope… 9% and 14 more
Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its counts column above; here it's added up by who ran the tests. How it works
$ published speed measurements · 10
Reference results for the hardware, engine and settings below. They aren't verified speeds of the downloads above or predictions for your machine.
| NVIDIA DGX Spark (GB10) | QAT Q4_0 | 81.05 tok/s | llama.cpp 11fb327bf (7941), CUDA · llama-bench; tg32; 32 generated tokens; context depth 0; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| NVIDIA DGX Spark (GB10) | QAT Q4_0 | 76.37 tok/s | llama.cpp 11fb327bf (7941), CUDA · llama-bench; tg32 @ d4096; 32 generated tokens; context depth 4096; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| NVIDIA DGX Spark (GB10) | QAT Q4_0 | 62.28 tok/s | llama.cpp 11fb327bf (7941), CUDA · llama-bench; tg32 @ d32768; 32 generated tokens; context depth 32768; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| Apple M2 Ultra (GPU core count and RAM not specified) | QAT Q4_0 | 134.28 tok/s | llama.cpp b828e18c7 (7948), Metal/BLAS · llama-bench; tg32; 32 generated tokens; context depth 0; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| Apple M2 Ultra (GPU core count and RAM not specified) | QAT Q4_0 | 133.11 tok/s | llama.cpp b828e18c7 (7948), Metal/BLAS · llama-bench; tg32 @ d4096; 32 generated tokens; context depth 4096; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| Apple M2 Ultra (GPU core count and RAM not specified) | QAT Q4_0 | 113.14 tok/s | llama.cpp b828e18c7 (7948), Metal/BLAS · llama-bench; tg32 @ d32768; 32 generated tokens; context depth 32768; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| NVIDIA DGX Spark (GB10) | QAT Q4_0 | 71.61 tok/s | llama.cpp 11fb327bf (7941), CUDA · llama-bench; tg32 @ d8192; 32 generated tokens; context depth 8192; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| NVIDIA DGX Spark (GB10) | QAT Q4_0 | 70.89 tok/s | llama.cpp 11fb327bf (7941), CUDA · llama-bench; tg32 @ d16384; 32 generated tokens; context depth 16384; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| Apple M2 Ultra (GPU core count and RAM not specified) | QAT Q4_0 | 125.85 tok/s | llama.cpp b828e18c7 (7948), Metal/BLAS · llama-bench; tg32 @ d8192; 32 generated tokens; context depth 8192; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
| Apple M2 Ultra (GPU core count and RAM not specified) | QAT Q4_0 | 125 tok/s | llama.cpp b828e18c7 (7948), Metal/BLAS · llama-bench; tg32 @ d16384; 32 generated tokens; context depth 16384; n_ubatch=2048; flash attention=1; one sequence Published token-generation mean; not prompt processing or aggregate batch throughput. Hardware core count and installed RAM are not inferred. | source ↗ |
$ improve this page
Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.
data updated · sources and licences · json