Qwen3.8-27B vs Gemma 4 31B
The two strongest small dense open models. Qwen3.8-27B is the better coder and computer-use agent; Gemma 4 31B, from Google’s Gemini research line, is a solid, well-documented choice for reading documents and images.
Choose Qwen3.8-27B if
- Coding — 61.7% on SWE-bench Pro, by Alibaba’s count.
- Operating desktop software.
Choose Gemma 4 31B if
- Reading forms, documents and images.
- Maths for its size — 89.2% on AIME 2026.
- A model from Google under Apache 2.0.
Side by side
| Qwen3.8-27B | Gemma 4 31B | |
|---|---|---|
| Made by | Alibaba | |
| Released | August 2026 | April 2026 |
| Input price, per 1M tokens | $0.455 | $0.182 |
| Output price, per 1M tokens | $2.73 | $0.52 |
| Cached input, per 1M tokens | $0.117 | — |
| Batch (about half price) | No | Yes |
| Context window | 262K tokens | 256K tokens |
| Longest answer | 131K tokens | — |
| Reads | Text, Images, Video | Text, Images, Video |
| Thinks before answering | Yes, adjustable | Yes, adjustable |
| Open weights | Yes, Apache 2.0 | Yes, Apache 2.0 |
| Runs in Sri Lanka | No | No |
Prices are Roar AI’s published rates, live from our price list. Specs are each lab’s own published figures.
What a real job costs
Take 1,000 requests, each about 3,000 tokens in and 1,000 out — a long prompt and a page of answer.
Gemma 4 31B does the same job for 3.8× less. Models that think before answering spend extra output tokens doing it, so on hard prompts the real gap can be wider than the rates suggest.
Use both, switch any time
On Roar AI both are on the same key and the same monthly invoice, billed in rupees. Trying the other one is a one-word change:
client.chat.completions.create(model="qwen3.8-27b", …) client.chat.completions.create(model="gemma-4-31b-it", …)
Send the same prompts to both for a day and compare the answers on your own work — that settles it faster than any benchmark. Read the docs.
