Roar AI
DocsRequest access
All models
VS

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.

Try both on one keySee every model’s rate

Choose Qwen3.8-27B if

  • Coding — 61.7% on SWE-bench Pro, by Alibaba’s count.
  • Operating desktop software.
About Qwen3.8-27B

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.
About Gemma 4 31B

Side by side

Qwen3.8-27BGemma 4 31B
Made byAlibabaGoogle
ReleasedAugust 2026April 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)NoYes
Context window262K tokens256K tokens
Longest answer131K tokens—
ReadsText, Images, VideoText, Images, Video
Thinks before answeringYes, adjustableYes, adjustable
Open weightsYes, Apache 2.0Yes, Apache 2.0
Runs in Sri LankaNoNo

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.

Qwen3.8-27B$4.09
Gemma 4 31B$1.07

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. 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.