Qwen3.8-27B: which quant to run on 12, 16, 24 and 32 GB of VRAM
Which Qwen3.8-27B GGUF fits your GPU: file sizes, KV cache maths, context limits, KLD quality data and setup for llama.cpp, Ollama, LM Studio and MLX.
Check your exact GPU and context in the analyzer, or size the cache alone with the KV cache calculator.
This page contains affiliate links.What Qwen3.8-27B is, from the model card
Qwen3.8-27B is a dense 27B vision-language model released under Apache 2.0 on 14 August 2026. Thinking mode is on by default.
| Spec | Value | Source |
|---|---|---|
| Parameters | 27B (Ollama reports 27.3B text + 461M vision projector) | model card, Ollama |
| Layers | 64: 48 Gated DeltaNet (linear attention) + 16 Gated Attention | model card, config.json |
| Full-attention heads | 24 query, 4 KV, head_dim 256 | model card, config.json |
| Native context | 262,144 tokens (YaRN to ~1M on vLLM/SGLang) | model card, config.json |
| Input | text, image, video (vision projector ~0.93 GB as GGUF) | model card, Unsloth and bartowski repos |
| Licence | Apache 2.0 | model card, eWeek |
| GGUF architecture tag | qwen35 | GGUF header, Ollama |
| Artificial Analysis Intelligence Index | 34 (xhigh reasoning), single source | Artificial Analysis |
The layout matters for memory. Only 16 of the 64 layers keep a classic KV cache. The other 48 hold a fixed-size state, however long the conversation gets.
The KV cache maths
Each token costs 16 layers × 4 KV heads × 256 dims × 2 (K and V) × 2 bytes = 64 KiB at f16. With a q8_0 cache it is about 34 KiB, and with q4_0 about 18 KiB. A community member measured 64.69 KiB per token at f16 in llama.cpp, which matches. The same person measured 38.26 KiB at q8_0, about 12% above theory, so the theory understates a q8_0 cache by roughly 10%. The figures below come from this site's engine, which counts the cache layer by layer as llama.cpp allocates it.
The DeltaNet state adds a fixed ~150 MiB per sequence (48 layers × 48 heads × 128 × 128 × 4 bytes, plus a small conv state). It does not grow with context. The engine includes it in each cache figure below, in decimal GB.
| Context | f16 KV | q8_0 KV | q4_0 KV | Total with UD-Q4_K_XL + q8_0 KV |
|---|---|---|---|---|
| 8K | 0.69 GB | 0.44 GB | 0.31 GB | 18.8 GB |
| 32K | 2.30 GB | 1.30 GB | 0.76 GB | 19.7 GB |
| 64K | 4.45 GB | 2.44 GB | 1.36 GB | 20.8 GB |
| 128K | 8.75 GB | 4.72 GB | 2.57 GB | 23.1 GB |
| 262K | 17.34 GB | 9.28 GB | 4.99 GB | 27.6 GB |
Totals are the 17.56 GB file, the cache and the engine's fixed runtime overhead (see the methodology). Add about 0.9 GB if the vision projector sits on the GPU, and about 0.7 GB for the built-in MTP draft head.
Pick your quant by VRAM
This is the table most people want. Every verdict is the analyzer's: the file, the KV cache at the context shown and runtime overhead, against the memory named, with the vision projector off the GPU. The engine counts a 24 GB card as 24 billion bytes, so its ceilings run a little shorter than some community reports: one user runs 150K context on a single RTX 3090 with a q8_0 cache (HF discussion #68).
| Your memory | My pick | File size | Context and fit (analyzer) | Fallback |
|---|---|---|---|---|
| 12 GB | UD-Q2_K_XL, or offload / smaller model (see below) | 9.83 GB | 32K, q8_0: 11.9 GB, tight on 12 GB | UD-IQ2_XXS 7.27 GB, 96K, q8_0: 11.6 GB, tight on 12 GB |
| 16 GB | UD-IQ4_XS | 14.25 GB | 16K, q8_0: 15.8 GB, tight on 16 GB; 32K, q4_0: 15.8 GB, tight on 16 GB | UD-Q3_K_XL 13.15 GB, 48K, q8_0: 15.8 GB, tight on 16 GB |
| 24 GB | UD-Q4_K_XL or bartowski Q4_K_M | 17.56 / 17.44 GB | 128K, q8_0: 23.1 GB, tight on 24 GB; 64K, f16: 22.8 GB, tight on 24 GB | Q5_K_M 20.92 GB, 48K, q8_0: 23.6 GB, tight on 24 GB |
| 32 GB (RTX 5090) | UD-Q6_K or bartowski Q6_K | 21.98 / 23.86 GB | 128K, q8_0: 27.5 GB, fits 32 GB | Q8_0 29.05 GB, 48K, q8_0: 31.7 GB, tight on 32 GB |
| 64 GB+ Mac | Q8_0 GGUF or MLX 8-bit | 29.05 / 29.50 GB | 262K, q8_0: 39.1 GB, fits 64 GB unified; 262K, f16: 47.2 GB, tight on 64 GB unified | MLX 6-bit 22.78 GB |
Single-source sizes, read from the Hugging Face file listings on 20 Oct 2026: UD-IQ2_XXS 7.27 GB, bartowski Q4_K_M 17.44 GB, Q5_K_M 20.92 GB, UD-Q6_K 21.98 GB, bartowski Q6_K 23.86 GB, MLX 8-bit 29.50 GB, MLX 6-bit 22.78 GB. MLX sizes are the weight files only. UD-Q4_K_XL, UD-IQ4_XS, UD-Q3_K_XL and Q8_0 are confirmed by two sources.
On the Mac row: macOS only lets the GPU use part of unified memory by default. Apple does not publish the limit. This site assumes roughly three quarters is usable, so about 48 GB on a 64 GB machine. Q8_0 with a full f16 cache comes close to that line, so a q8_0 cache is the safer choice there.
For card-level detail, see the 16 GB, 24 GB and 32 GB pages.
The full file list, with sizes
Unsloth repacked every 27B GGUF to "Dynamic v3.0" on 19 August 2026, and sizes changed. If a guide quotes 17.9 GB for UD-Q4_K_XL, it predates or misreads the current files. bartowski also re-released his quants, built with llama.cpp b10896.
| Bits | Unsloth (UD = Dynamic v3.0) | bartowski |
|---|---|---|
| ~1–2 | UD-IQ1_S 6.19, UD-IQ1_M 6.73, UD-IQ2_XXS 7.27, UD-IQ2_S 8.37, UD-Q2_K_XL 9.83 | IQ2_XXS 8.88, IQ2_XS 9.09, IQ2_S 9.68, IQ2_M 10.52, Q2_K 10.82, Q2_K_L 13.08 |
| 3 | UD-IQ3_XXS 10.93, UD-IQ3_S 12.04, UD-Q3_K_XL 13.15 | IQ3_XXS 12.32, Q3_K_S 12.74, IQ3_XS 12.80, Q3_K_M 13.40, Q3_K_L 14.12, IQ3_M 14.86, Q3_K_XL 16.39 |
| 4 | UD-IQ4_XS 14.25, UD-Q4_K_S 15.36, Q4_0 16.06, UD-Q4_K_M 16.46, Q4_1 17.54, UD-Q4_K_XL 17.56 | IQ4_XS 15.48, Q4_0 16.35, Q4_K_S 16.36, Q4_K_M 17.44, IQ4_NL 17.44, Q4_1 17.83, Q4_K_L 18.82 |
| 5 | UD-Q5_K_S 18.67, UD-Q5_K_M 19.77, UD-Q5_K_XL 20.88 | Q5_K_S 19.57, Q5_K_M 20.92, Q5_K_L 21.54 |
| 6 | UD-Q6_K 21.98, UD-Q6_K_M 23.09, UD-Q6_K_L 24.19, UD-Q6_K_XL 25.30 | Q6_K_S 22.86, Q6_K 23.86, Q6_K_L 24.96 |
| 8 | UD-Q8_K_L 28.05, Q8_0 29.05, UD-Q8_K_XL 31.46 | Q8_0 29.12 |
| 16 | BF16 54.66 (2 files) | bf16 54.66 (2 files) |
Sizes in decimal GB, read from the Hugging Face file listings on 20 Oct 2026. Both repos also ship a 0.93 GB vision projector (mmproj).
| Tag | Size | Notes |
|---|---|---|
qwen3.8:27b / qwen3.8:latest | 18 GB | Q4_K_M weights (17 GB) + BF16 projector (931 MB) |
qwen3.8:27b-q4_K_M | 18 GB | |
qwen3.8:27b-mtp-q4_K_M | 18 GB | MTP head included |
qwen3.8:27b-q8_0 / 27b-mtp-q8_0 | 30 GB | |
qwen3.8:27b-bf16 / 27b-mtp-bf16 | 56 GB | |
qwen3.8:27b-mlx, 27b-nvfp4, 27b-mxfp8, 27b-mlx-bf16 | 18 / 18 / 32 / 56 GB | MLX engine; Ollama's MLX tags need macOS |
How much quality each quant costs
bartowski is the only quantiser I found who publishes a full text table for this model. He measured perplexity and KL divergence (KLD) against bf16 on wiki.test.raw over 100 chunks. Lower KLD is better. "Same top token" is how often the quant picks the same next token as bf16.
| Quant (bartowski) | Size | Mean KLD | Same top token |
|---|---|---|---|
| Q8_0 | 29.12 GB | 0.0009 | 98.7% |
| Q6_K | 23.86 GB | 0.0030 | 97.4% |
| Q5_K_M | 20.92 GB | 0.0053 | 96.9% |
| Q4_K_M | 17.44 GB | 0.0139 | 95.0% |
| IQ4_XS | 15.48 GB | 0.0188 | 94.1% |
| IQ3_M | 14.86 GB | 0.0406 | 91.1% |
| Q3_K_M | 13.40 GB | 0.0564 | 89.8% |
| IQ3_XXS | 12.32 GB | 0.0739 | 88.5% |
| Q2_K | 10.82 GB | 0.1612 | 83.5% |
| IQ2_XXS | 8.88 GB | 0.2834 | 78.0% |
Source: bartowski model card, measured by the quantiser. Everything from IQ4_XS up stays close to the original. 3-bit roughly doubles KLD. 2-bit multiplies it by about ten.
Unsloth claims its Dynamic v3.0 quants beat other providers by over 10% on top-1 agreement at equal size. Its 27B KLD chart is an image only, so I can't quote numbers.
One caution: a single user reported UD-Q4_K_XL and UD-Q6_K_XL sometimes never finishing very long xhigh thinking runs, while an NVFP4 build did. It is unreplicated, and KLD would not catch it. If long agent runs loop, try a lower reasoning_effort or another quantiser.
Speed: what the community reports
I have not run these tests. Every number below is community-reported, and most are single runs.
| Hardware | Quant / runtime | Decode tok/s | Source |
|---|---|---|---|
| RTX 3090 24 GB | UD-Q4_K_XL, llama.cpp, 8K ctx | 41.6 plain; 66.4 with MTP (n-max 2) | community-reported (HackMD, 29 Aug) |
| RTX 3090 24 GB | UD-Q4_K_XL + MTP, 150K ctx, q8_0 KV | 45–70 | community-reported (HF discussion #68) |
| RX 7900 XTX 24 GB | IQ4_XS, 215K ctx, q8_0 KV | ~42 (prefill ~942) | community-reported (r/LocalLLM comment) |
| RX 9070 XT 16 GB | llama.cpp, MTP 2, 64K ctx | ~42 | community-reported (HF discussion #70) |
| RTX 5060 Ti 16 GB | UD-IQ4_XS, 80K ctx, 4 FFN layers on CPU | 11–13 on a real agent job | community-reported (HF discussion #121) |
| RTX 5090 32 GB | Q4_K_M (fine-tune GGUF), LM Studio, MTP 2 | ~47 | community-reported (Level1Techs) |
| RTX 5090 32 GB | Q6_K (fine-tune GGUF), llama.cpp Linux, MTP 2 | ~72 | community-reported (Level1Techs) |
| M4 Max 128 GB | 4-bit oMLX build | ~25 plain; 53–72 with MTP | community-reported (GitHub, 21 Aug) |
I found no RTX 4090 figure I could cite.
The biggest lever is MTP, the model's built-in draft head. llama.cpp uses it with --spec-type draft-mtp, and reports show +40% to +60% decode speed.
Setup by runtime
llama.cpp
The GGUFs use the qwen35 architecture tag, the same family as Qwen3.5. So an "unknown model architecture" error means a build from before Qwen3.5 support. Qwen3.8 adds an extra MTP block (block 64), and older builds fail on that instead. Use b10896 or newer, the build bartowski quantised with. One user on WSL with an RTX 3090 also got garbage output from an older CUDA DeltaNet kernel, fixed around b10450.
A 24 GB starting point, built from community commands:
llama-server -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_XL \
-ngl 999 -c 131072 -fa on -ctk q8_0 -ctv q8_0 \
--spec-type draft-mtp --spec-draft-n-max 2 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 --jinja
To lower reasoning depth, add --chat-template-kwargs '{"reasoning_effort":"medium"}' (Unsloth docs). To turn thinking off, pass {"enable_thinking": false} in the same way, and switch to the non-thinking sampling below. On 16 GB, --n-cpu-ffn N moves N feed-forward blocks to the CPU, the dense-model cousin of --n-cpu-moe.
LM Studio
The common failure is missing tensor 'blk.64.ssm_conv1d.weight'. It means the bundled llama.cpp runtime is too old for the MTP block. One user fixed it in the headless llmster by switching to llama.cpp runtime 2.28.2 with lms runtime get --allow-incompatible. In the desktop app, update the runtime from the runtime settings. My LM Studio "failed to load" guide covers the other causes. LM Studio has also been seen trimming the context window on its own, so check the context slider after loading.
Ollama
ollama pull qwen3.8:27b gets the 18 GB Q4_K_M build with vision. On a 16 GB card it will not fit fully, so Ollama splits it between GPU and CPU and it slows down. The -mlx, -nvfp4 and -mxfp8 tags use Ollama's MLX engine, which needs macOS. Update Ollama before pulling. Support for Qwen3.8 27B arrived in Ollama v0.32.12, so use that or newer.
MLX on Mac
Use lmstudio-community/Qwen3.8-27B-MLX-4bit (16.05 GB) on 24–32 GB Macs and the 6-bit or 8-bit build on 48 GB+.
Recommended sampling (model card)
| Mode | temperature | top_p | top_k | min_p | presence_penalty |
|---|---|---|---|---|---|
| Thinking (default) | 1.0 | 0.95 | 20 | 0.0 | 0.0 |
| Non-thinking | 0.7 | 0.80 | 20 | 0.0 | 1.5 |
Qwen keeps reasoning from earlier turns by default (preserve_thinking), which fills context faster. Users report 64K as a practical floor for agent work.
12 GB: squeeze it in, or pick a smaller model?
On 12 GB, Qwen3.8-27B does not fit well. Fully on the GPU, only the 2-bit files leave room for context: UD-Q2_K_XL at 32K, or UD-IQ2_XXS at 96K (see the table above). bartowski's numbers put 2-bit at roughly ten times the KLD of Q4_K_M. A 3-bit file such as UD-IQ3_XXS (10.93 GB) leaves almost no room for the cache.
Three realistic options:
- Offload part of it. If you have 32 GB+ of system RAM, run UD-IQ4_XS or UD-Q3_K_XL with
--n-cpu-ffnand accept slower decode. A 16 GB RTX 5060 Ti doing this reported 11–13 tok/s; a 12 GB card will offload more and run slower. UD-IQ4_XS at 32K with a q8_0 cache: 16.3 GB, needs CPU offload on 12 GB + 32 GB RAM. - Pick a smaller Qwen. There is no smaller Qwen3.8 dense model. The Qwen org's options are older: Qwen3.6-35B-A3B (April 2026, Apache 2.0, a mixture-of-experts that offloads well) and Qwen3.5-9B (February 2026, older than six months, so possibly stale). Check both in the model list before choosing.
- Rent a bigger GPU for the heavy jobs. A 24 GB or 32 GB cloud card runs the 4-bit or 6-bit build with long context. RunPod and Vast.ai bill by the hour; see the cloud GPU guide.
My take
Qwen3.8-27B is the first 27B dense model I would size for 24 GB without hesitation. The hybrid layout makes its KV cache about a quarter the size you would expect, so 4-bit weights and 150K context fit on one RTX 3090 or 7900 XTX. That is the sweet spot.
On 16 GB it works, but you are trading. IQ4_XS keeps quality and gives you 32K with a q4_0 cache. Q3_K_XL gives you more room but loses quality. For a thinking model that burns context, I lean towards Q3_K_XL with 48K, unless your tasks are short.
On 12 GB I would not run it at 2-bit for anything that matters. Partial offload or a smaller model is the better call.
And turn on MTP. It is a free 40–60% on decode.
Get started
- Check your exact GPU and context in the analyzer
- Size the KV cache for any context length
- What runs on 16 GB of VRAM
- What runs on 24 GB of VRAM
- Fix "failed to load" errors in LM Studio
Frequently asked questions
How much VRAM does Qwen3.8-27B need?
About 17.5 GB for 4-bit weights (Unsloth UD-Q4_K_XL is 17.56 GB), plus the KV cache and runtime overhead. A 24 GB GPU runs it at 4-bit with 128K tokens of context and a q8_0 cache. A 16 GB GPU needs UD-IQ4_XS (14.25 GB) with 16K context, or 32K with a q4_0 cache.
What is the best Qwen3.8-27B quant for an RTX 3090, 4090 or 7900 XTX?
For a 24 GB card, Unsloth UD-Q4_K_XL (17.56 GB) or bartowski Q4_K_M (17.44 GB) is the best balance. With a q8_0 KV cache, either fits 128K tokens of context by this site's analyzer, and one user reports 150K on an RTX 3090. Q5_K_M (20.92 GB) also fits, with 48K context.
Can Qwen3.8-27B run on a 16 GB GPU?
Yes. UD-IQ4_XS (14.25 GB) fits with 16K tokens of context and a q8_0 cache, or 32K with a q4_0 cache. UD-Q3_K_XL (13.15 GB) fits with 48K but loses some quality. Keep the vision projector on the CPU to save about 1 GB of VRAM.
Is Qwen3.8-27B usable on a 12 GB GPU?
Only at 2-bit if it must stay fully on the GPU. 2-bit quants show about ten times the KL divergence of Q4_K_M in bartowski's measurements. Offloading part of a 4-bit model to system RAM, or choosing a smaller Qwen model, usually gives better results.
How do I run Qwen3.8-27B in Ollama?
Run ollama pull qwen3.8:27b. That downloads an 18 GB Q4_K_M build with image input and a 256K context window. Other tags include qwen3.8:27b-q8_0 (30 GB) and qwen3.8:27b-mtp-q4_K_M (18 GB). The MLX tags such as qwen3.8:27b-mlx are for macOS.
Why does my llama.cpp or LM Studio fail to load Qwen3.8 GGUFs?
Older llama.cpp runtimes do not know the extra multi-token-prediction block in Qwen3.8 GGUFs. They fail with "missing tensor 'blk.64.ssm_conv1d.weight'". Updating llama.cpp to b10896 or newer, or updating LM Studio's llama.cpp runtime, fixes it.
How big is the Qwen3.8-27B KV cache?
About 64 KiB per token at f16, because only 16 of its 64 layers use full attention with 4 KV heads. With the fixed DeltaNet state included, that is 2.30 GB at 32K tokens, 8.75 GB at 128K and 17.34 GB at the full 262K window. A q8_0 cache roughly halves those figures.
How do I turn off thinking in Qwen3.8-27B?
Pass enable_thinking: false through the chat template options, for example with --chat-template-kwargs in llama-server. Then use temperature 0.7, top_p 0.8, top_k 20 and presence_penalty 1.5, as the model card recommends. You can also keep thinking on and lower reasoning_effort to medium or low.
Sources (31)
- Qwen/Qwen3.8-27B model card, read 2026-10-19
- Qwen/Qwen3.8-27B config.json, read 2026-10-19
- Qwen/Qwen3.8-27B generation_config.json, read 2026-10-19
- unsloth/Qwen3.8-27B-GGUF files and commits, read 2026-10-19
- Unsloth Qwen3.8 docs, read 2026-10-19
- bartowski/Qwen3.8-27B-GGUF (sizes, PPL/KLD), read 2026-10-19
- ggml-org/Qwen3.8-27B-GGUF, read 2026-10-19
- lmstudio-community/Qwen3.8-27B-GGUF, read 2026-10-19
- lmstudio-community/Qwen3.8-27B-MLX-4bit, read 2026-10-19
- Ollama qwen3.8 tags, read 2026-10-19
- Ollama v0.32.12 release (adds Qwen3.8 27B), read 2026-10-20
- Ollama issue #15854 (MLX tags need macOS), read 2026-10-19
- llama.cpp release b10896, read 2026-10-19
- Artificial Analysis: Qwen3.8 27B, read 2026-10-19
- eWeek: Alibaba releases Qwen3.8-27B under Apache 2.0, read 2026-10-19
- HF discussion #87: VRAM is linear in context, read 2026-10-19
- HF discussion #130: VRAM per quant, read 2026-10-19
- HF discussion #131: quant for a 16 GB RTX 5080, read 2026-10-19
- HF discussion #68: single RTX 3090, 150K context, read 2026-10-19
- HF discussion #70: 16 GB RX 9070 XT, read 2026-10-19
- HF discussion #121: RTX 5060 Ti 16 GB benchmark, read 2026-10-19
- HF discussion #56: garbage output on old CUDA build, read 2026-10-19
- HF discussion #99: Dynamic v3 quality complaints, read 2026-10-19
- HF discussion #135: long-thinking convergence with integer quants, read 2026-10-19
- lmstudio-community discussion #3: missing tensor blk.64, read 2026-10-19
- HackMD: Qwen3.8-27B speculative decoding on RTX 3090, read 2026-10-19
- Level1Techs: Qwen3.8 RTX 5090 results, read 2026-10-19
- r/LocalLLM: "Is my setup the fault or is Qwen 3.8 27B overhyped?" (7900 XTX comment) (archived copy), read 2026-10-20
- Weschera: Qwen3.8-27B oMLX MTP on Mac, read 2026-10-19
- Qwen/Qwen3.6-35B-A3B model card (licence), read 2026-10-20
- Qwen/Qwen3.8-Flash-Next model card, read 2026-10-19