Qwen 3.8 27B (Qwen3.8-27B) vs Gemma 4 31B: Which 24 GB VRAM Model Should You Run Locally?

Key facts

Qwen3.8-27B uses less memory than Gemma 4 31B, and both fit one 24 GB graphics card. Speeds on the page are our estimate.

Updated . Checked . https://localllmrig.com/.

Updated 28 Oct 2026

Both Qwen3.8-27B (Qwen 3.8 27B, 27.78B parameters, our estimate) and Gemma 4 31B (31.27B parameters, our estimate) fit in the VRAM of one 24 GB graphics card, which leaves 23.4 GB usable after a 0.6 GB reserve. At 8,192 tokens Qwen3.8-27B needs 17.80 GB in our estimate (16.46 GB measured file, 0.54 GB of conversation memory, 0.80 GB of working space) and Gemma 4 31B needs 20.63 GB (18.32 GB measured file, 1.51 GB of conversation memory, 0.80 GB of working space). Qwen uses 2.83 GB less and is the faster of the two in our estimate. The same files at 32,768, 65,536 and 262,144 tokens are in the VRAM scaling table below. You can test Gemma 4 31B free in the browser before downloading a file.

The short answer

Qwen3.8-27B at UD-Q4_K_M is 17.80 GB in our estimate. Gemma 4 31B at Q4_K_M is 20.63 GB. A 24 GB card leaves 23.4 GB usable, so both fit. Qwen's conversation memory at 8,192 tokens is 0.54 GB, against 1.51 GB for Gemma, which is why a higher-quality Qwen file still fits: UD-Q5_K_XL is 22.22 GB and UD-Q6_K is 23.32 GB. Gemma at Q5_K_M is 23.97 GB, which is over 23.4 GB usable.

Test Gemma 4 31B free in the browser at https://localllmrig.com/, or open Can I run Qwen3.8-27B? and Can I run Gemma 4 31B?.

Memory at the standard 4-bit file

Standard 4-bit memory at 8,192 tokens, our estimate. File sizes are measured downloads.
Qwen3.8-27BGemma 4 31B
Parameters27.78B dense, our estimate31.27B dense, our estimate
LicenceApache-2.0Apache-2.0
Measured 4-bit file16.46 GB UD-Q4_K_M18.32 GB Q4_K_M
Conversation memory0.54 GB1.51 GB
Working space0.80 GB0.80 GB
Total17.80 GB20.63 GB

Qwen's file was checked on the Unsloth tree on 24 Oct 2026. Gemma's file was checked on 21 Oct 2026. The totals add conversation memory and working space, and those two parts are our estimate.

VRAM from 8K to 256K (Qwen 3.8 27B and Gemma 4 31B)

Qwen 3.8 27B (Qwen3.8-27B) and Gemma 4 31B at the standard 4-bit file. Each total is the measured file plus FP16 conversation memory plus 0.80 GB of working space. Our estimate. A 24 GB card leaves 23.4 GB of usable VRAM.

Context scaling at 8,192, 32,768, 65,536 and 262,144 tokens. Conversation memory and totals are our estimate.
ContextQwen3.8-27B conversation memoryQwen3.8-27B totalGemma 4 31B conversation memoryGemma 4 31B total
8K (8,192 tokens)0.54 GB17.80 GB1.51 GB20.63 GB
32K (32,768 tokens)2.15 GB19.41 GB3.52 GB22.64 GB
65K (65,536 tokens)4.29 GB21.55 GB6.21 GB25.33 GB
256K (262,144 tokens)17.18 GB34.44 GB22.31 GB41.43 GB

At 65,536 tokens the Qwen 3.8 27B total still fits in 23.4 GB of usable VRAM with an FP16 conversation cache. Gemma 4 31B's FP16 total at that length does not. Half of Gemma's FP16 conversation memory is the size a Q8_0 cache would store; that half is not a second file on our list, only half of the FP16 figure above.

Which quality fits which card

Measured file and total at 8,192 tokens. The total is our estimate.
QualityQwen3.8-27BGemma 4 31BWhere it fits
2-bitUD-IQ2_XXS 7.27 GB file, 8.61 GB totalUD-IQ2_XXS 8.53 GB file, 10.84 GB total12 GB (11.4 GB usable)
3-bitUD-IQ3_XXS 10.93 GB file, 12.27 GB totalUD-IQ3_XXS 11.84 GB file, 14.15 GB total16 GB (15.4 GB usable)
3-bit Gemma Q3_K_MUD-IQ4_XS 14.25 GB file, 15.59 GB totalQ3_K_M 14.74 GB file, 17.05 GB total24 GB for Gemma Q3_K_M
4-bit compactUD-IQ4_XS 14.25 GB file, 15.59 GB totalIQ4_XS 16.37 GB file, 18.68 GB total24 GB (23.4 GB usable)
4-bit standardUD-Q4_K_M 16.46 GB file, 17.80 GB totalQ4_K_M 18.32 GB file, 20.63 GB total24 GB (23.4 GB usable)
5-bitUD-Q5_K_XL 20.88 GB file, 22.22 GB totalQ5_K_M 21.66 GB file, 23.97 GB totalQwen fits 24 GB; Gemma needs 32 GB
6-bitUD-Q6_K 21.98 GB file, 23.32 GB totalQ6_K 25.20 GB file, 27.51 GB totalQwen fits 24 GB; Gemma needs 32 GB
8-bitQ8_0 29.05 GB file, 30.39 GB totalQ8_0 32.64 GB file, 34.95 GB totalQwen fits 32 GB; Gemma needs 48 GB

A 16 GB card leaves 15.4 GB usable, so the standard 4-bit files do not fit there. The 3-bit UD-IQ3_XXS files do. See what fits in 16 GB and what fits in 24 GB.

Speed on cards we list

Every speed below is our estimate from memory bandwidth, not a measured run. The file is the standard 4-bit download.

Standard 4-bit speed, our estimate.
MachineUsable memoryPriceQwen3.8-27BGemma 4 31B
GeForce RTX 3090 24GB23.4 GB€1,246 / $1,395about 43 tokens per second, our estimateabout 37 tokens per second, our estimate
GeForce RTX 4090 24GB23.4 GB€2,185 / $2,446about 46 tokens per second, our estimateabout 39 tokens per second, our estimate
GeForce RTX 5090 32GB31.4 GB€7,367 / $6,816about 81 tokens per second, our estimateabout 70 tokens per second, our estimate
Radeon RX 7900 XTX 24GB23.4 GB€1,254 / $1,404about 42 tokens per second, our estimateabout 36 tokens per second, our estimate
Dual RTX 3090, 128 GB RAM46.8 GB€5,452 / $5,528about 47 tokens per second, our estimateabout 40 tokens per second, our estimate
Dual RTX 4090, 128 GB RAM46.8 GB€7,330 / $7,631about 50 tokens per second, our estimateabout 43 tokens per second, our estimate
Mac Studio M5 Max 36GB27.0 GB€3,029 / $2,802about 13.0 tokens per second, our estimateabout 11.1 tokens per second, our estimate
Mac Studio M5 Max 128GB96.0 GB€6,000 / $5,551about 17.3 tokens per second, our estimateabout 14.8 tokens per second, our estimate

Speeds other people measured

These figures are self-reported, community measurement, not ours. Qwen3.8-27B ships a multi-token prediction file, and some rigs pair it with a speculative decoder, so a tuned run can be much faster than the single-token estimate above.

  • Alexander Ollman, one RTX 3090, 18 Sep 2026, mean of 5 runs: about 27.6 tokens per second in llama.cpp as shipped, about 42.6 tuned, about 85.6 in stock vLLM, about 167.8 in patched vLLM, and about 212.1 with DFlash2. Self-reported, community measurement, not ours.
  • Gabe Ortiz, one RTX 5090: about 62 tokens per second, and about 220 with DFlash2. Gabe Ortiz's interview. Self-reported, community measurement, not ours.
  • Roshan George, one RTX A6000 48 GB: about 60 tokens per second with MTP, and about 100 to 129 on code with DFlash2. Roshan George's interview. Self-reported, community measurement, not ours.
  • Josh Gold, one Intel Arc Pro B70: about 30 tokens per second in vLLM, and about 15 in llama.cpp Vulkan. Josh Gold's interview. Self-reported, community measurement, not ours.
  • Xijing (Thomas) Wang runs Qwen3.8-27B at 5-bit on a MacBook Pro M5 Max 128 GB. Thomas Wang's interview. Self-reported, community measurement, not ours.
  • Valérian de Thézan de Gaussan, Framework Desktop, AMD Ryzen AI Max+ 395 (Strix Halo), 128 GB shared LPDDR5X, llama.cpp Vulkan, 28 Oct 2026: Qwen3.8-27B-UD-Q4_K_M (15.33 GiB) at 413.77 ± 3.058 tokens per second prefill and 12.82 ± 0.002 tokens per second decode; gemma-4-31B-it-Q4_K_M (17.07 GiB) at 359.99 ± 1.082 tokens per second prefill and 11.27 ± 0.002 tokens per second decode. Valérian de Thézan de Gaussan's interview. Self-reported, community measurement, not ours.

Which one to pick

  • Pick Qwen3.8-27B when the card is 24 GB and you want the 5-bit or 6-bit file, a longer conversation, or a coding agent that can use speculative decoding. Qwen also takes image and video input. The vision projector is a separate file.
  • Pick Gemma 4 31B when you want to try the model free in the browser first, at https://localllmrig.com/, or when the work is prose and image-to-text chat at the standard 4-bit file on a 24 GB card.
  • For a smaller active model in the same family, see Gemma 4 26B A4B and Recursive Flint.

Open either model in the calculator: Qwen3.8-27B or Gemma 4 31B. The figures on this page are our estimate.

Related guides: Gemma 4 31B vs Gemma 4 26B A4B and Qwen3.6-35B-A3B vs Qwen3.8-27B.

Sources and method

Checked . https://localllmrig.com/

Speeds and memory are our estimate from the hardware specs, not a measured test. Prices are dated and may change. How we calculate

Questions

Does Qwen3.8-27B or Gemma 4 31B use less VRAM on a 24 GB GPU?
Qwen3.8-27B uses 2.83 GB less memory at standard 4-bit quality: 17.80 GB total in our estimate at UD-Q4_K_M (16.46 GB measured GGUF + 0.54 GB KV cache at 8,192 tokens + 0.80 GB working space) versus 20.63 GB total for Gemma 4 31B at Q4_K_M (18.32 GB measured GGUF + 1.51 GB KV cache + 0.80 GB working space). On a 24 GB GPU (23.4 GB usable), Qwen3.8-27B fits up to UD-Q5_K_XL (22.2 GB) and UD-Q6_K (23.3 GB), while Gemma 4 31B tops out at Q4_K_M (20.6 GB) because Q5_K_M (24.0 GB) exceeds 23.4 GB usable.
How fast are Qwen3.8-27B and Gemma 4 31B on an RTX 3090, RTX 4090, and RTX 5090?
In our hardware estimates at standard 4-bit quality (Q4_K_M), Qwen3.8-27B runs at about 43 tok/s on an RTX 3090 24GB, 46 tok/s on an RTX 4090 24GB, and 81 tok/s on an RTX 5090 32GB. Gemma 4 31B runs at about 37 tok/s on an RTX 3090, 39 tok/s on an RTX 4090, and 70 tok/s on an RTX 5090. With speculative decoding (MTP or DFlash2), community measurements on Qwen3.8-27B report 42.6 tok/s on tuned llama.cpp and up to 167.8–212.1 tok/s on patched vLLM on a single RTX 3090 (not measured by localLLMrig).
Can I run Qwen3.8-27B or Gemma 4 31B on a 16 GB GPU?
Not at standard 4-bit Q4_K_M (17.8 GB and 20.6 GB both exceed the 15.4 GB usable on a 16 GB card). To fit a 16 GB GPU such as an RTX 4060 Ti 16GB, RTX 5080 16GB, or RX 9060 XT 16GB, use the 3-bit UD-IQ3_XXS downloads: Qwen3.8-27B needs 12.3 GB total (10.93 GB measured GGUF) and Gemma 4 31B needs 14.1 GB total (11.84 GB measured GGUF).