Qwen3.8 27B vs Gemma 4 31B

  • Data checked

Short answer

Qwen3.8 27B is the stronger model for reasoning, coding and agent work: 20 against 4 on Artificial Analysis's index, and it is the only one of the two that scored on Terminal-Bench and FrontierCode. Gemma 4 31B is the pick for chat, multilingual use and fast replies. Both are dense, Apache 2.0 and have a 256K token window.

Qwen3.8 27B

Alibaba (Qwen) · released 14 August 2026 · open weights

$0.5 in · $3 out per 1M1

Gemma 4 31B

Google · released 2 April 2026 · open weights

Price not published

Key differences

  • Artificial Analysis Intelligence Index: Qwen3.8 27B 20 at xhigh, Gemma 4 31B 4 in reasoning mode.
  • On LMArena text Gemma 4 31B (1452) ranks above Qwen3.8 27B (1434), the reverse of the index.
  • Qwen3.8 27B takes text, image and video; Gemma 4 31B takes text and image, with video handled as frames.
  • Both have a 256K token window; Qwen's card says it extends to about 1M tokens with YaRN, Gemma's does not.
  • GPQA Diamond: 90.5 for Qwen against 85.7 for Gemma. Humanity's Last Exam: 33.9 against 23.6.
  • Qwen3.8 27B uses a hybrid Gated DeltaNet design with 27B parameters; Gemma 4 31B is a 30.7B dense model with sliding-window attention.
  • Gemma 4 31B is hosted on Vertex AI, Bedrock and Azure Foundry; Qwen3.8 27B only appears on Azure Foundry.

Reasoning and agent work

Artificial Analysis's Intelligence Index scores Qwen3.8 27B at 20 on xhigh effort and Gemma 4 31B at 4 in reasoning mode. Qwen's score scales with effort: 17 at medium, 16 at low and 10 with thinking off. Gemma's non-reasoning variant has no index score. Gemma's index entry is old: it dates from April 2026 and the index was rebuilt in October for harder agent tasks.

On the agent tests that index uses, Qwen scored 5.6% on Terminal-Bench 4.0, 14.9% on FrontierCode-AA 2.0 and 48.2% on AutomationBench-AA. Gemma scored 0%, 0% and 4.9%. Neither is a serious agent model against the frontier, but only Qwen is usable for multi-step automation.

Both cards report scores on older, easier benchmarks. Qwen reports 90.3% on LiveCodeBench v6 and Gemma reports 80.0%. Qwen reports 61.7% on SWE-bench Pro in a Claude Code harness, 73.0% on Terminal Bench 2.1 and 84.3% on OSWorld-Verified. Gemma reports 76.9% on Tau2 and a Codeforces rating of 2150. These are vendor figures with different harnesses.

Sources: artificialanalysis.ai, artificialanalysis.ai, huggingface.co, huggingface.co

Chat quality, languages and multimodal input

Gemma 4 31B has the higher LMArena text score, 1452 against 1434, which suggests voters prefer its answers in open conversation even though it trails on hard reasoning. Google lists out-of-the-box support for more than 35 languages and pre-training covering more than 140. Qwen's card does not state its language coverage.

Qwen3.8 27B accepts text, image and video. Gemma 4 31B accepts text and images and treats video as a sequence of frames; audio is limited to Gemma's smaller E2B, E4B and 12B variants. Gemma lets you set an image token budget of 70, 140, 280, 560 or 1,120, a useful control: low budgets suit captioning and high budgets suit OCR and document parsing.

Sources: huggingface.co, huggingface.co, arena.ai

Context, thinking controls and speed

Both have a native 256K token context window. Qwen's card says it extends to 1,000,000 tokens with YaRN rope scaling, but warns that static YaRN can hurt performance on short texts, so turn it on only for long inputs. Qwen can produce up to 262,144 tokens of reasoning and 131,072 of final answer.

Thinking is on by default in Qwen, with reasoning_effort set to xhigh, medium or low, and it can be disabled per request. In Gemma you switch thinking on by adding a thinking token to the system prompt, and the card advises leaving earlier thoughts out of the conversation history, except during tool calls. Gemma supports native function calling.

Qwen is slow at xhigh: 47 tokens per second, about 128 seconds to the first answer token and 38.7 minutes per Index task. Gemma outputs about 36 tokens per second with a 78.7 second wait to first answer. Artificial Analysis lists Gemma's non-reasoning variant at about 41 tokens per second and 3.9 seconds to first token.

Sources: huggingface.co, huggingface.co, artificialanalysis.ai, artificialanalysis.ai

Price, hosting and licence

Both are Apache 2.0. Qwen3.8 27B has a 27B dense hybrid architecture and Gemma 4 31B is a dense 30.7B model, so either fits the same class of hardware. Neither card states GPU memory requirements. Both document Transformers, vLLM, SGLang and Docker Model Runner, plus quantised builds for llama.cpp, Ollama and LM Studio.

Pricing is unclear for Gemma. Artificial Analysis shows Google's own API at $0.00 for the reasoning variant without explanation, and a median of about $0.15 input and $0.40 output for the non-reasoning variant across 10 providers. Qwen3.8 27B is $0.50 input and $3.00 output on Alibaba's API, and Artificial Analysis puts a full Index run at $3.53 at xhigh. The Qwen card says its hosted Qwen Cloud version was still 'coming soon' on the card, although Alibaba's QwenCloud page shows a callable API.

Gemma 4 31B is the easier model to find on managed platforms: Vertex AI, Amazon Bedrock and Azure Foundry through Fireworks. Qwen3.8 27B appears on Azure Foundry as a Hugging Face-hosted entry and was not found on Bedrock or Vertex.

Sources: artificialanalysis.ai, artificialanalysis.ai, huggingface.co

Scores side by side

The longer bar wins each row. A missing score means the source has not published one yet.

202 Intelligence indexhigher is better 43
11.22 Coding scorehigher is better 0.03
48.2%2 AutomationBench-AAhigher is better 4.9%3
14344 Arena vote scorehigher is better 14524
90.5%2 GPQA Diamondhigher is better 85.7%
33.9%2 Humanity's Last Examhigher is better 23.6%3
47 t/s2 Output speedhigher is better 36 t/s3
133 s2 Time to first answer tokenlower is better 79 s3
$1.131 Blended pricelower is better No score
256K1 Context windowhigher is better 262K5

What it costs per month

List prices, 30 days, no caching or batch discounts. Reasoning tokens bill as output and can raise the real cost. Use your own numbers

WorkloadQwen3.8 27BGemma 4 31B
Support chatbot1,000 conversations a day, 2,000 tokens in and 500 out each$75Not published
Coding agent200 tasks a day, 60,000 tokens in and 8,000 out each$324Not published
Document summaries500 documents a day, 20,000 tokens in and 1,000 out each$195Not published

Which one should you pick

Choose Qwen3.8 27B if

  • You need real coding, tool use or automation: Qwen is the only one that scores above zero on Terminal-Bench and FrontierCode-AA.
  • You want video input or a path to 1M tokens of context.
  • You want the higher GPQA Diamond and Humanity's Last Exam scores.
  • You can accept slow, long thinking at xhigh effort.

Choose Gemma 4 31B if

  • You want conversational quality: Gemma ranks higher on LMArena text.
  • You need broad multilingual support (35+ languages out of the box).
  • You want a quicker first token with thinking off (about 3.9 seconds).
  • You need a managed endpoint on Vertex AI, Bedrock or Azure.

Specs

SpecQwen3.8 27BGemma 4 31B
Lab
Released14 August 20262 April 2026
Context window256K tokens262K tokens
Max outputNot publishedNot published
Input typestext, image, videotext, image, video
Reasoning modeYesYes
WeightsOpen (Apache-2.0)Open (Apache-2.0)
Input price$0.5 per 1MNot published
Output price$3 per 1MNot published

Qwen3.8 27B against others

Gemma 4 31B against others

Questions

Which is better, Qwen3.8 27B or Gemma 4 31B?
Qwen3.8 27B for reasoning and agent tasks (index 20 against 4). Gemma 4 31B for chat, multilingual use and quicker answers; it ranks higher on LMArena text.
Are Qwen3.8 27B and Gemma 4 31B free to use commercially?
Yes. Both are released under the Apache 2.0 licence.
What is the context window of each?
Both have 256K tokens natively. Qwen3.8 27B can be extended to about 1M with YaRN scaling.
Can either model process video?
Qwen3.8 27B accepts video. Gemma 4 31B handles video as a sequence of frames.
Can I run either model myself?
Yes, both have open weights. Check each licence before commercial use.

Research sources

Pages we read for the article above, checked 19 November 2026.

  1. Hugging Face: Qwen3.8-27B
  2. Hugging Face: Gemma 4 31B it
  3. Artificial Analysis: Qwen3.8 27B
  4. Artificial Analysis: Gemma 4 31B
  5. LMArena text leaderboard

Sources

Every figure on this page links to one of these. Checked 19 November 2026. Spotted something out of date? Tell us

  1. Artificial Analysis (secondary price source) · Prices, Blended price, Context window secondary
  2. Artificial Analysis · Intelligence index, Coding score, AutomationBench-AA, GPQA Diamond, Humanity's Last Exam, Output speed, Time to first answer token
  3. Artificial Analysis · Intelligence index, Coding score, AutomationBench-AA, Humanity's Last Exam, Output speed, Time to first answer token
  4. LMArena (arena.ai) · Arena vote score
  5. Google official docs · Context window

Sign in to vote as verified

Signed-in votes count once per account and show as verified. You can still vote without an account.

We use your email only to run your account. No marketing, no sharing, no passwords. Delete your account any time. Privacy

Delete your account?

This removes your account, your email and every vote you made while signed in. It cannot be undone.