---
title: Qwen3.8 27B vs Gemma 4 31B: which open model
url: https://llmsranked.com/compare/qwen3-8-27b-vs-gemma-4-31b/
updated: 2026-11-19
---

# Qwen3.8 27B vs Gemma 4 31B

- Data checked 19 November 2026

## 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 1M

vs

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

- By the [LLMs Ranked editors](https://llmsranked.com/editorial-policy/)
- Updated 19 November 2026
- 5 sources

## 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](https://artificialanalysis.ai/models/qwen3-8-27b), [artificialanalysis.ai](https://artificialanalysis.ai/models/gemma-4-31b), [huggingface.co](https://huggingface.co/Qwen/Qwen3.8-27B), [huggingface.co](https://huggingface.co/google/gemma-4-31B-it)

## 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](https://huggingface.co/google/gemma-4-31B-it), [huggingface.co](https://huggingface.co/Qwen/Qwen3.8-27B), [arena.ai](https://arena.ai/leaderboard/text)

## 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](https://huggingface.co/Qwen/Qwen3.8-27B), [huggingface.co](https://huggingface.co/google/gemma-4-31B-it), [artificialanalysis.ai](https://artificialanalysis.ai/models/qwen3-8-27b), [artificialanalysis.ai](https://artificialanalysis.ai/models/gemma-4-31b)

## 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](https://artificialanalysis.ai/models/qwen3-8-27b), [artificialanalysis.ai](https://artificialanalysis.ai/models/gemma-4-31b), [huggingface.co](https://huggingface.co/Qwen/Qwen3.8-27B)

## Scores side by side

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

20

[Intelligence index](https://llmsranked.com/benchmarks/intelligence-index/)higher is better

4

11.2

[Coding score](https://llmsranked.com/benchmarks/coding-score/)higher is better

0.0

48.2%

[AutomationBench-AA](https://llmsranked.com/benchmarks/automationbench/)higher is better

4.9%

1434

[Arena vote score](https://llmsranked.com/benchmarks/arena/)higher is better

1452

90.5%

[GPQA Diamond](https://llmsranked.com/benchmarks/gpqa-diamond/)higher is better

85.7%

33.9%

[Humanity's Last Exam](https://llmsranked.com/benchmarks/humanitys-last-exam/)higher is better

23.6%

47 t/s

[Output speed](https://llmsranked.com/benchmarks/output-speed/)higher is better

36 t/s

133 s

[Time to first answer token](https://llmsranked.com/benchmarks/time-to-first-token/)lower is better

79 s

$1.13

Blended pricelower is better

No score

256K

[Context window](https://llmsranked.com/benchmarks/context-window/)higher is better

262K

## 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](https://llmsranked.com/calculator/?m=qwen3-8-27b,gemma-4-31b)

| Workload | Qwen3.8 27B | Gemma 4 31B |
| --- | --- | --- |
| Support chatbot 1,000 conversations a day, 2,000 tokens in and 500 out each | $75 | Not published |
| Coding agent 200 tasks a day, 60,000 tokens in and 8,000 out each | $324 | Not published |
| Document summaries 500 documents a day, 20,000 tokens in and 1,000 out each | $195 | Not 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

| Spec | Qwen3.8 27B | Gemma 4 31B |
| --- | --- | --- |
| Lab | [Alibaba (Qwen)](https://llmsranked.com/providers/alibaba/) | [Google](https://llmsranked.com/providers/google/) |
| Released | 14 August 2026 | 2 April 2026 |
| Context window | 256K tokens | 262K tokens |
| Max output | Not published | Not published |
| Input types | text, image, video | text, image, video |
| Reasoning mode | Yes | Yes |
| Weights | Open (Apache-2.0) | Open (Apache-2.0) |
| Input price | $0.5 per 1M | Not published |
| Output price | $3 per 1M | Not published |

## Qwen3.8 27B against others

- [DeepSeek V4 Pro (0813) vs Qwen3.8 27B](https://llmsranked.com/compare/deepseek-v4-pro-vs-qwen3-8-27b/)
- [Qwen3.8 27B vs MiniMax-M3](https://llmsranked.com/compare/qwen3-8-27b-vs-minimax-m3/)
- [Qwen3.8 27B vs Nemotron 3 Ultra 550B-A55B](https://llmsranked.com/compare/qwen3-8-27b-vs-nemotron-3-ultra/)
- [Qwen4 Max vs Qwen3.8 27B](https://llmsranked.com/compare/qwen4-max-vs-qwen3-8-27b/)
- [All Qwen3.8 27B alternatives](https://llmsranked.com/models/qwen3-8-27b/alternatives/)

## Gemma 4 31B against others

- [Gemma 4 31B vs gpt-oss-120b](https://llmsranked.com/compare/gemma-4-31b-vs-gpt-oss-120b/)
- [Mistral Medium 3.5 vs Gemma 4 31B](https://llmsranked.com/compare/mistral-medium-3-5-vs-gemma-4-31b/)
- [All Gemma 4 31B alternatives](https://llmsranked.com/models/gemma-4-31b/alternatives/)

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

- [Hugging Face: Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
- [Hugging Face: Gemma 4 31B it](https://huggingface.co/google/gemma-4-31B-it)
- [Artificial Analysis: Qwen3.8 27B](https://artificialanalysis.ai/models/qwen3-8-27b)
- [Artificial Analysis: Gemma 4 31B](https://artificialanalysis.ai/models/gemma-4-31b)
- [LMArena text leaderboard](https://arena.ai/leaderboard/text)

## Sources

Every figure on this page links to one of these. Checked 19 November 2026. Spotted something out of date? [Tell us](https://llmsranked.com/contact/)

- [Artificial Analysis (secondary price source)](https://artificialanalysis.ai/models/qwen3-8-27b) · Prices, Blended price, Context window secondary
- [Artificial Analysis](https://artificialanalysis.ai/models/qwen3-8-27b) · Intelligence index, Coding score, AutomationBench-AA, GPQA Diamond, Humanity's Last Exam, Output speed, Time to first answer token
- [Artificial Analysis](https://artificialanalysis.ai/models/gemma-4-31b) · Intelligence index, Coding score, AutomationBench-AA, Humanity's Last Exam, Output speed, Time to first answer token
- [LMArena (arena.ai)](https://arena.ai/leaderboard/text) · Arena vote score
- [Google official docs](https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/) · Context window
