Roar AI
Get started
All models
Head to head

Qwen 3.8 27B vs Gemma 4 31B

The two strongest small dense open models. Qwen 3.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 Qwen 3.8 27B if

  • Coding — 61.7% on SWE-bench Pro, by Alibaba’s count.
  • Operating desktop software.
About Qwen 3.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

Qwen 3.8 27BGemma 4 31B
Made byAlibabaGoogle
ReleasedAugust 2026April 2026
Input price, per 1M tokensS$0.5915S$0.2366
Output price, per 1M tokensS$3.55S$0.676
Cached input, per 1M tokensS$0.1521—
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

Prices are Roar AI’s published rates, live from our price list. Specs are each lab’s own published figures. Prices are our published US dollar rates converted at S$1.30 to the dollar, our rate for October — the same rate your card is charged.

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.

Qwen 3.8 27BS$5.32
Gemma 4 31BS$1.39

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, paid in your local currency. 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.

Try both
on one key

Send the same prompts to each and compare the answers on your own work.