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/.
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
| Qwen3.8-27B | Gemma 4 31B | |
|---|---|---|
| Parameters | 27.78B dense, our estimate | 31.27B dense, our estimate |
| Licence | Apache-2.0 | Apache-2.0 |
| Measured 4-bit file | 16.46 GB UD-Q4_K_M | 18.32 GB Q4_K_M |
| Conversation memory | 0.54 GB | 1.51 GB |
| Working space | 0.80 GB | 0.80 GB |
| Total | 17.80 GB | 20.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 | Qwen3.8-27B conversation memory | Qwen3.8-27B total | Gemma 4 31B conversation memory | Gemma 4 31B total |
|---|---|---|---|---|
| 8K (8,192 tokens) | 0.54 GB | 17.80 GB | 1.51 GB | 20.63 GB |
| 32K (32,768 tokens) | 2.15 GB | 19.41 GB | 3.52 GB | 22.64 GB |
| 65K (65,536 tokens) | 4.29 GB | 21.55 GB | 6.21 GB | 25.33 GB |
| 256K (262,144 tokens) | 17.18 GB | 34.44 GB | 22.31 GB | 41.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
| Quality | Qwen3.8-27B | Gemma 4 31B | Where it fits |
|---|---|---|---|
| 2-bit | UD-IQ2_XXS 7.27 GB file, 8.61 GB total | UD-IQ2_XXS 8.53 GB file, 10.84 GB total | 12 GB (11.4 GB usable) |
| 3-bit | UD-IQ3_XXS 10.93 GB file, 12.27 GB total | UD-IQ3_XXS 11.84 GB file, 14.15 GB total | 16 GB (15.4 GB usable) |
| 3-bit Gemma Q3_K_M | UD-IQ4_XS 14.25 GB file, 15.59 GB total | Q3_K_M 14.74 GB file, 17.05 GB total | 24 GB for Gemma Q3_K_M |
| 4-bit compact | UD-IQ4_XS 14.25 GB file, 15.59 GB total | IQ4_XS 16.37 GB file, 18.68 GB total | 24 GB (23.4 GB usable) |
| 4-bit standard | UD-Q4_K_M 16.46 GB file, 17.80 GB total | Q4_K_M 18.32 GB file, 20.63 GB total | 24 GB (23.4 GB usable) |
| 5-bit | UD-Q5_K_XL 20.88 GB file, 22.22 GB total | Q5_K_M 21.66 GB file, 23.97 GB total | Qwen fits 24 GB; Gemma needs 32 GB |
| 6-bit | UD-Q6_K 21.98 GB file, 23.32 GB total | Q6_K 25.20 GB file, 27.51 GB total | Qwen fits 24 GB; Gemma needs 32 GB |
| 8-bit | Q8_0 29.05 GB file, 30.39 GB total | Q8_0 32.64 GB file, 34.95 GB total | Qwen 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.
| Machine | Usable memory | Price | Qwen3.8-27B | Gemma 4 31B |
|---|---|---|---|---|
| GeForce RTX 3090 24GB | 23.4 GB | €1,246 / $1,395 | about 43 tokens per second, our estimate | about 37 tokens per second, our estimate |
| GeForce RTX 4090 24GB | 23.4 GB | €2,185 / $2,446 | about 46 tokens per second, our estimate | about 39 tokens per second, our estimate |
| GeForce RTX 5090 32GB | 31.4 GB | €7,367 / $6,816 | about 81 tokens per second, our estimate | about 70 tokens per second, our estimate |
| Radeon RX 7900 XTX 24GB | 23.4 GB | €1,254 / $1,404 | about 42 tokens per second, our estimate | about 36 tokens per second, our estimate |
| Dual RTX 3090, 128 GB RAM | 46.8 GB | €5,452 / $5,528 | about 47 tokens per second, our estimate | about 40 tokens per second, our estimate |
| Dual RTX 4090, 128 GB RAM | 46.8 GB | €7,330 / $7,631 | about 50 tokens per second, our estimate | about 43 tokens per second, our estimate |
| Mac Studio M5 Max 36GB | 27.0 GB | €3,029 / $2,802 | about 13.0 tokens per second, our estimate | about 11.1 tokens per second, our estimate |
| Mac Studio M5 Max 128GB | 96.0 GB | €6,000 / $5,551 | about 17.3 tokens per second, our estimate | about 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).
Want it on paper? The GPU Buying Cheat Sheet (EU, Oct 2026) is a short PDF: graphics memory per budget and the cheapest machine per model size.