Compare / Gemma 4 31B vs Qwen3-Coder 30B-A3B
Gemma 4 31B vs Qwen3-Coder 30B-A3B
Updated November 2026
Verdict
Gemma 4 31B scores higher on the Small LM Index: 66.2 vs 34.9. On the 9 benchmarks both labs report, Gemma 4 31B wins 9 and Qwen3-Coder 30B-A3B wins 0. Both need about 21.9 GB of memory at 4-bit quantization. Qwen3-Coder 30B-A3B is cheaper through an API: $0.12 per million tokens against $0.16.
Pick Gemma 4 31B if…
- you want the strongest model overall
- you mostly write code
- you need math and reasoning
- you need precise instruction following
- you build agents that call tools
- you need image input
- you want the more widely used model (more quantized builds and community support)
Pick Qwen3-Coder 30B-A3B if…
- API cost matters most
- you work with long documents
Specifications
| Gemma 4 31B | Qwen3-Coder 30B-A3B | |
|---|---|---|
| Small LM Index | 66.2 (likely 64–68) | 34.9 (likely 32–38) |
| Lab | Google · United States | Alibaba (Qwen) · China |
| Released | 2026-04-02 | 2025-07-31 |
| Parameters | 30.7B (dense) | 30.5B (3.3B active, MoE) |
| Memory at 4-bit | ~21.9 GB | ~20.4 GB |
| Context window | 256K tokens | 262K tokens |
| Input | text, image | text |
| Reasoning | Hybrid (thinking on/off) | No thinking |
| License | Apache-2.0 | Apache-2.0 |
| API price / 1M tokens | $0.16 ($0.10 in, $0.34 out) | $0.12 ($0.070 in, $0.28 out) |
| Hugging Face downloads (30 days) | 7.8M | 1.3M |
Benchmarks
Higher is better. Bold marks the winner where both labs report a score. ≈ marks the index model's estimate for a score that wasn't reported, ✓ an independent measurement and * a score measured by another lab.
| Benchmark | Gemma 4 31B | Qwen3-Coder 30B-A3B |
|---|---|---|
| MMLU-Pro Knowledge | 85.2 | 70.6✓ |
| GPQA Diamond Knowledge | 85.7✓ | 51.6✓ |
| Humanity's Last Exam Reasoning | 23.6✓ | 3.8✓ |
| AIME Math | 89.2 | 29.7✓ |
| LiveCodeBench Coding | 80.0 | 40.3✓ |
| SWE-bench Verified Coding | 52.0* | 51.6 |
| Terminal-Bench Agentic | 42.9* | — |
| τ²-Bench Agentic | 59.9✓ | 34.5✓ |
| IFBench Instruction following | 75.6✓ | 32.7✓ |
| MMMU-Pro Vision | 76.9 | — |
| MATH-500 Math | — | 89.3✓ |
| AA-LCR Long context | 69.7✓ | 32.7✓ |
| SciCode Coding | 45.5✓ | — |
Scores are mostly reported by each lab with its own settings, so small gaps are noise. See the methodology. Open in the interactive comparison to add more models.
Questions
Which is better, Gemma 4 31B or Qwen3-Coder 30B-A3B?
Gemma 4 31B scores higher on the Small LM Index: 66.2 vs 34.9. On the 9 benchmarks both labs report, Gemma 4 31B wins 9 and Qwen3-Coder 30B-A3B wins 0.
Which is cheaper to run?
Qwen3-Coder 30B-A3B is cheaper through an API: $0.12 per million tokens against $0.16. Both need about 21.9 GB of memory at 4-bit quantization.
Which has the longer context window?
Qwen3-Coder 30B-A3B has the longer context window: 262K tokens against 256K.
Can I use Gemma 4 31B and Qwen3-Coder 30B-A3B commercially?
Both are released under the Apache-2.0 license. Apache 2.0 and MIT allow commercial use; other licenses can add conditions, so read the license before shipping a product.
Related comparisons
- Gemma 4 31B vs Kanana-2 30B-A3B Thinking
- Gemma 4 31B vs Qwen3 30B-A3B Thinking 2507
- Gemma 4 31B vs GLM-4.7-Flash
- Muse Glimmer 30B vs Qwen3-Coder 30B-A3B
- GLM-4.7-Flash vs Qwen3-Coder 30B-A3B
- Granite 4.2 30B vs Qwen3-Coder 30B-A3B
- Qwen3 30B-A3B Thinking 2507 vs Qwen3-Coder 30B-A3B
- North Mini Code vs Qwen3-Coder 30B-A3B
- Kanana-2 30B-A3B Thinking vs Qwen3-Coder 30B-A3B