Downloadable models · Side by side

Gemma 4 31B vs Qwen3.5 27B

Gemma 4 31B and Qwen3.5 27B are dense open models in the same size class: both fit one 24 GB GPU at 4-bit. Both are Apache 2.0, both take text and images, and both support 256K-token context. They differ in memory use, how thinking is switched on and language coverage.

The short answer

Choose Qwen3.5 27B if memory is your limit: about 16.2 GB at 4-bit for one 8K-token conversation against 19.2 GB for Gemma 4 31B, and it covers 201 languages. Choose Gemma 4 31B if you want short, direct answers by default: its thinking mode is off unless you turn it on, while Qwen3.5 thinks before every answer unless you disable it.

Compare the details

Compare context, supported inputs and usage costs. Highlighted rows show a difference.

Gemma 4 31B vs Qwen3.5 27B specifications
Featuregemma-4-31B-itQwen3.5-27B
Input formatstexttext
Output formatstexttext
Parameter count31,273,088,87627,781,427,952
Release licenseapache-2.0apache-2.0
USD input / 1M tokens$0.20$0.26
USD output / 1M tokens$0.40$2.60
Model identifiergoogle/gemma-4-31B-itQwen/Qwen3.5-27B

API pricing

Prices are in USD per million tokens. Input is what you send; output is what the model generates. Chat subscriptions and API usage are billed separately.

Tools, images and additional reasoning can add charges. The examples below cover input and output tokens only.

Compare local models

Beyond the price tag

Memory

For one 8K-token conversation with a 20% allowance, Gemma 4 31B needs about 19.2 GB at 4-bit, 36.7 GB at 8-bit and 71.6 GB at 16-bit. Qwen3.5 27B needs about 16.2 GB, 31.7 GB and 62.7 GB. Gemma has 3.5 billion more parameters, and its context memory is also larger: about 1.4 GB at 8K tokens against 0.5 GB for Qwen.

Long context costs memory

Both models use hybrid attention to keep long contexts cheap. Gemma 4 runs five sliding-window layers (1,024 tokens) for every full-attention layer; Qwen3.5 uses Gated DeltaNet linear attention in three of every four layers. Even so, at 128K tokens the context memory grows to about 8 GB for Qwen and up to about 11 GB for Gemma, so neither stays on a 24 GB card at 4-bit. Plan for a 48 GB GPU if you need long documents.

Thinking mode

Qwen3.5 27B thinks by default and Qwen advises keeping at least 128K tokens of context to preserve that ability; you can disable thinking for direct answers. Gemma 4 31B only thinks when you add its think token to the system prompt. If you serve short chat or extraction tasks, Gemma's default usually means fewer output tokens per answer, which matters when you pay for GPU time.

Languages and inputs

Qwen3.5 lists support for 201 languages and dialects. Gemma 4 supports 35+ languages out of the box and was pre-trained on 140+. Both accept images and video as well as text and return text only; neither 31B nor 27B takes audio.

Tool calling

Both support function calling. Gemma 4 has native tool-use tokens in its chat template; Qwen3.5 uses the qwen3_coder tool parser in vLLM and SGLang. Check that your inference server version supports the model's template before switching.

Common questions

How much VRAM do Gemma 4 31B and Qwen3.5 27B need?

For one 8K-token conversation including a 20% allowance: Gemma 4 31B needs about 19.2 GB at 4-bit, 36.7 GB at 8-bit and 71.6 GB at 16-bit; Qwen3.5 27B needs about 16.2 GB, 31.7 GB and 62.7 GB. A 24 GB GPU runs either at 4-bit, and a 48 GB GPU runs either at 8-bit.

Which has the longer context window?

Both support 262,144 tokens natively. Qwen3.5 27B can be extended to about 1,010,000 tokens; Gemma 4 31B stops at 256K. Long contexts need far more memory than the 8K figures above.

Can I use them commercially?

Yes. Both are released under Apache 2.0, which allows commercial use and modification.

Can I run them on a CPU-only server?

Yes, at 4-bit with about 21 GB of RAM for Gemma 4 31B or 18 GB for Qwen3.5 27B, including the operating system. Models this size are slow on a CPU, so it suits testing and batch jobs rather than live chat.

Do they both read images?

Yes. Both take images and video along with text and return text. Audio input is only on the smaller Gemma 4 models, not the 31B.

Run it yourself: memory and hosting

Memory needed to load each model and hold one 8,192-token conversation, with a 20% allowance for runtime buffers. The GPU and server columns show the cheapest listed options in our catalog that fit.

Memory needed and cheapest hardware by precision
Model and precisionWeightsContext memoryPlan forCheapest GPU that fits
gemma-4-31B-it4-bit14.6 GB1.4 GB19.2 GBNVIDIA RTX A5000 (24 GB) · $0.27/hr
Runpod · about $197/mo always on
gemma-4-31B-it8-bit29.1 GB1.4 GB36.7 GBNVIDIA A6000 (48 GB) · $0.59/hr
Runpod · about $431/mo always on
gemma-4-31B-it16-bit58.3 GB1.4 GB71.6 GBNVIDIA A100 80GB PCIe (8 GB) · $1.79/hr
Runpod · about $1,307/mo always on
Qwen3.5-27B4-bit12.9 GB0.5 GB16.2 GBNVIDIA RTX A5000 (24 GB) · $0.27/hr
Runpod · about $197/mo always on
Qwen3.5-27B8-bit25.9 GB0.5 GB31.7 GBNVIDIA A6000 (48 GB) · $0.59/hr
Runpod · about $431/mo always on
Qwen3.5-27B16-bit51.7 GB0.5 GB62.7 GBNVIDIA V100S ×2 (32 GB) · $1.76/hr
OVHcloud · about $1,285/mo always on

gemma-4-31B-it on a CPU server

At 4-bit, plan for about 21.2 GB of RAM including the operating system. CPU inference is much slower than a GPU, so this suits testing, background jobs and low traffic.

Qwen3.5-27B on a CPU server

At 4-bit, plan for about 18.2 GB of RAM including the operating system. CPU inference is much slower than a GPU, so this suits testing, background jobs and low traffic.

Estimates, not measurements. 4-bit and 8-bit figures assume common quantized files (such as GGUF Q4/Q8); real files add a little overhead. Longer contexts and more simultaneous users need more memory.