Mixed Precision GGUF layer quantization of Qwen3-8B by Qwen

Original model: https://huggingface.co/Qwen/Qwen3-8B

The hybrid quant employs different quantization levels on a per layer basis to enable both high performance and small file size at the same time. The quants employed are all K to avoid slow CPU processing of IQ quants. Two quants are available, Q6_K_H for strongest reasoning and Q4_K_H for largest context.

The Q6_K_H layer quants are as follows (refreshed from original on 4/19/2026)

Q5_K_L : attn_v = q8_0 attn_o = q6_k ffn_d = q6_k
Q6_K_S : Q6_K
Q6_K_M : attn_v = q8_0 ffn_d = q8_0
Q6_K_L : attn_v = q8_0 attn_o = q8_0 ffn_d = q8_0

   LAYER_TYPES='[
   [0 ,"Q6_K_S"],[1 ,"Q5_K_L"],[2 ,"Q5_K_L"],[3 ,"Q5_K_M"],[4 ,"Q5_K_L"],[5 ,"Q5_K_M"],
   [6 ,"Q5_K_L"],[7 ,"Q5_K_M"],[8 ,"Q5_K_L"],[9 ,"Q5_K_M"],[10,"Q5_K_L"],[11,"Q5_K_M"],
   [12,"Q5_K_L"],[13,"Q5_K_L"],[14,"Q5_K_L"],[15,"Q5_K_L"],[16,"Q5_K_L"],[17,"Q5_K_L"],
   [18,"Q6_K_S"],[19,"Q5_K_L"],[20,"Q6_K_S"],[21,"Q5_K_L"],[22,"Q6_K_S"],[23,"Q5_K_L"],
   [24,"Q6_K_S"],[25,"Q6_K_S"],[26,"Q6_K_S"],[27,"Q6_K_S"],[28,"Q6_K_S"],[29,"Q6_K_S"],
   [30,"Q6_K_M"],[31,"Q6_K_M"],[32,"Q6_K_M"],[33,"Q6_K_L"],[34,"Q6_K_L"],[35,"Q6_K_L"]
   ]'
   FLAGS="--token-embedding-type Q6_K --output-tensor-type Q6_K --layer-types-high"

The quant was optimized across a curated set of reasoning test prompts showing strong performance and robust convergence with greedy samplings.

A second smaller Q4_K_H quant is available targeting use cases with large context needs on smaller VRAM GPUs as follows (refreshed from original on 4/19/2026) :

Q4_K_L : attn_v = q6_k attn_o = q6_k ffn_d = q6_k
Q5_K_L : attn_v = q8_0 attn_o = q6_k ffn_d = q6_k
Q6_K_S : Q6_K

   LAYER_TYPES='[
   [0 ,"Q5_K_S"],[1 ,"Q4_K_L"],[2 ,"Q4_K_M"],[3 ,"Q4_K_S"],[4 ,"Q3_K_L"],[5 ,"Q4_K_S"],
   [6 ,"Q3_K_L"],[7 ,"Q3_K_L"],[8, "Q3_K_L"],[9, "Q3_K_L"],[10,"Q3_K_L"],[11,"Q3_K_L"],
   [12,"Q4_K_S"],[13,"Q3_K_L"],[14,"Q4_K_S"],[15,"Q3_K_L"],[16,"Q4_K_S"],[17,"Q3_K_L"],
   [18,"Q4_K_S"],[19,"Q4_K_S"],[20,"Q4_K_S"],[21,"Q4_K_S"],[22,"Q4_K_S"],[23,"Q4_K_S"],
   [24,"Q4_K_M"],[25,"Q4_K_S"],[26,"Q4_K_M"],[27,"Q4_K_S"],[28,"Q4_K_M"],[29,"Q4_K_S"],
   [30,"Q4_K_M"],[31,"Q4_K_L"],[32,"Q5_K_S"],[33,"Q5_K_M"],[34,"Q5_K_L"],[35,"Q6_K_S"]
   ]'
   FLAGS="--token-embedding-type Q4_K --output-tensor-type Q6_K --layer-types-high"

This quant has min Q3_K_L across layers, Q6_K_S last layer, Q6_K output and Q4_K embedding. It enables about 87k token Q8_0 context on a 12G VRAM GPU with all weights on GPU. It still shows very good reasoning performance, but does not handle correctly one hard physics problem the Q6_K_H gets right.

Comparison:

Quant size PPL Comment
IQ4_XS 4.59e9 10.1 default embed and output
Q4_K_H 4.97e9 10.2 Q4_K embed Q6_K output
Q6_K 6.7e9 10 Q6_K with default embedding and output
Q6_K_H 6.5e9 10 Hybrid quant with Q6_K embedding Q6_K output

Usage:

The Q4_K_H quant will fit in a 12G VRAM GPU with enough space for ~89000 token q8 kv with full GPU offload. The layer quant distribution was optimized to maintain strong reasoning. With think mode on it can correctly solve the large prompt discussed in https://huggingface.co/Qwen/Qwen3-32B/discussions/18, file https://thireus.com/REDDIT/Qwen3_Runescape_Massive_Prompt.txt, manually edited back to 78k tokens https://huggingface.co/datasets/steampunque/benchlm/blob/main/Qwen3_Runescape_Massive_Prompt_78k.txt so it would fit in the ~87k of space available with full offload and also allow room for reasoning.

High context yarn config is as follows: Arbitrarily set base context for yarn rope scale compute to 35840 (35k), then with a context of 89344 tokens the rope scale = 89344 / 35840 = 2.49.

Then on model start pass --rope-scaling yarn --yarn-orig-ctx 35840 --rope_scale 2.49 (must be ajusted if kv other than 89344)

Later versions of llama.cpp have a bug which soft caps context length to the training context, effectively disabling yarn context extension. Patch server-context.cpp according to https://github.com/ggml-org/llama.cpp/issues/22140 to fix it.

To disable thinking inject a dummy think block after the assistant prompt template where think block delimiters are defined as:

THINK_START="<think>\n"
THINK_STOP="\n</think>\n\n"

Download the file from below:

Link Type Size/e9 B Notes
Qwen3-8B.Q4_K_H.gguf Q4_K_H 4.97e9 B ~IQ4_XS size
Qwen3-8B.Q6_K_H.gguf Q6_K_H 6.50e9 B ~Q6_K size

A discussion thread about the hybrid layer quant approach can be found here on the llama.cpp git repository:

https://github.com/ggml-org/llama.cpp/discussions/13040

Downloads last month
52
GGUF
Model size
8B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

6-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for steampunque/Qwen3-8B-MP-GGUF

Finetuned
Qwen/Qwen3-8B
Quantized
(370)
this model