How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
# Run inference directly in the terminal:
llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
# Run inference directly in the terminal:
llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
# Run inference directly in the terminal:
./build/bin/llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
Use Docker
docker model run hf.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:
Quick Links

Sakura

Sakura ยท imatrix GGUF quantization of Qwen/Qwen4-35B-A3B

Independent community quantization. Not an official release of the upstream authors.

Benchmarks of the original model

Qwen4-35B-A3B benchmark results

These are the Qwen team's published results for Qwen/Qwen4-35B-A3B in full precision. They were not measured on these quantized files. Source and benchmark notes: the original model card.

Which GPU fits

A large part of every file is the per-layer n-gram table per_layer_token_embd. llama.cpp (b12973 and newer) does not put it on the graphics card or load it into RAM: it reads the rows it needs straight from the file on disk (--lazy-mode auto, the default, for tensors over 4 GiB; uses the memory-mapped file). The token embedding stays on the CPU as well. Only the rest goes to the GPU with -ngl 99.

Quant File n-gram table (stays on SSD) Token embedding (RAM) GPU part (weights) Smallest card Left on that card (context, buffers)
Q2_K 25.0 GB 11.5 GB 0.2 GB 13.3 GB (12.4 GiB) 16 GB 3.6 GiB
Q3_K_M 28.9 GB 11.5 GB 0.2 GB 17.2 GB (16.0 GiB) 24 GB 8.0 GiB
Q4_K_M 36.1 GB 14.1 GB 0.3 GB 21.7 GB (20.2 GiB) 24 GB 3.8 GiB
Q5_K_M 41.0 GB 15.4 GB 0.3 GB 25.3 GB (23.6 GiB) 32 GB 8.4 GiB

"Smallest card" is the smallest common VRAM size (8/12/16/24/32/48 GB) that leaves at least 2 GiB beside the weights for the context (KV cache) and compute buffers. Whether that is enough for your context length depends on your settings and was not measured. All sizes are read from the file headers on the Hub; nothing in this table was tested on a real graphics card, and the speed of reading the table from the SSD was not measured (a fast NVMe SSD helps; free RAM is used as cache by the operating system). On a smaller card, --n-cpu-moe N keeps the experts of N layers in system RAM instead (slower, not tested here).

1. Model Overview

Architecture: qwen4_moe (GGUF qwen4exp) ยท 35B total / 3B active parameters plus a 20B per-layer n-gram embedding table and 2B MTP, vision input.

Original: 112.8 GB (BF16 GGUF, the source of these quantizations).

Quant Size Compared with the original
Q2_K 25.0 GB 78 % smaller
Q3_K_M 28.9 GB 74 % smaller
Q4_K_M 36.1 GB 68 % smaller
Q5_K_M 41.0 GB 64 % smaller

The n-gram table per_layer_token_embd has rows of 128 values, which the K-quant formats cannot hold, so llama.cpp stores it in a legacy format (for example Q4_0 in Q3_K_M); that table alone is 11.5โ€“15.4 GB depending on the quant and makes these files larger than a plain 35B model. llama.cpp reads it from disk on demand instead of loading it (see โ€œWhich GPU fitsโ€).

2. Original Model / Attribution

  • Original model: Qwen/Qwen4-35B-A3B
  • Quantized from: unsloth/Qwen4-35B-A3B-GGUF (BF16 GGUF, commit 3ef64303abd0e81681d257437fc35d1ab0d49519).
  • Quantized by webmp3. Upstream authors retain their license and attribution.

3. Files

File Size Quant
Sakura-Qwen4-35B-A3B-Q2_K.gguf 25.0 GB Q2_K
Sakura-Qwen4-35B-A3B-Q3_K_M.gguf 28.9 GB Q3_K_M
Sakura-Qwen4-35B-A3B-Q4_K_M.gguf 36.1 GB Q4_K_M
Sakura-Qwen4-35B-A3B-Q5_K_M.gguf 41.0 GB Q5_K_M
mmproj-Sakura-Qwen4-35B-A3B-F16.gguf 0.9 GB vision projector
Sakura-Qwen4-35B-A3B-imatrix.dat 0.2 GB importance matrix

mmproj-Sakura-Qwen4-35B-A3B-F16.gguf is mmproj-F16.gguf of unsloth/Qwen4-35B-A3B-GGUF (commit 3ef64303abd0e81681d257437fc35d1ab0d49519), copied unchanged. Use it together with any quantization to give the model images. Image input was not tested in this release. Files over 45 GB are split into numbered parts: keep them together and load the first.

4. Download and Usage

llama-cli -m <file>.gguf -p "Hello" -n 32

# with images
llama-mtmd-cli -m <file>.gguf --mmproj mmproj-Sakura-Qwen4-35B-A3B-F16.gguf --image <picture>.jpg -p "Describe this image."

Needs a llama.cpp build that supports this architecture (b12973 or newer was used here).

llama.cpp server (web chat at http://127.0.0.1:8080 and an OpenAI-compatible API at http://127.0.0.1:8080/v1):

llama-server -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M -c 8192 --port 8080

LM Studio: search for webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF in the Discover tab, download one file and load it. Needs a version whose bundled llama.cpp supports the qwen4_moe architecture. Not tested by us.

Ollama:

ollama run hf.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M

Needs a version whose bundled llama.cpp supports the architecture. Not tested by us.

5. Verification

  • Real inference test: Q4_K_M loaded by llama.cpp b12973 and generated coherent text once. The other files were not run; their tensor types below are read from their own headers on the Hub.
  • No perplexity, KL divergence, benchmark or quality score was measured for these files.
Technical details: exact versions, hashes, how these were made

Exact versions

  • Source commit: 849378c8db0d4537b7c6731738147378729d8920 (model card at that commit)
  • BF16 and Q8_0 source GGUFs: unsloth/Qwen4-35B-A3B-GGUF commit 3ef64303abd0e81681d257437fc35d1ab0d49519
  • llama.cpp: release b12973 (built from the tag)

File hashes

File Bytes SHA-256 Kind
Sakura-Qwen4-35B-A3B-Q2_K.gguf 24989776192 58e0a7186ddcb87885d76f73d15f309f23898112a82184e600697d94a8f4ed71 Q2_K
Sakura-Qwen4-35B-A3B-Q3_K_M.gguf 28927237952 c02160011d6d32b4fd3efc8ea71cfe01a87d60018a2394bf94972cce7346cbe0 Q3_K_M
Sakura-Qwen4-35B-A3B-Q4_K_M.gguf 36078191936 ec2197a6013c5d4ce60a6d09074277efd8e8db78d79a1f3d8e80cf91bdcff171 Q4_K_M
Sakura-Qwen4-35B-A3B-Q5_K_M.gguf 41019016512 b2e0ebd35a8d9c6afd4cffc69c7088755a7b3c44375c69450ddd94dfbdc3dd61 Q5_K_M
mmproj-Sakura-Qwen4-35B-A3B-F16.gguf 899283200 3805de49141d2695d7d399ec67766b9f9d9b5f7b00050c1f3e78b3793be77ac6 vision projector
Sakura-Qwen4-35B-A3B-imatrix.dat 194568093 818abc7af4611ca05f139ec5fb367a2313ea4023d90d424305a8a1394e12d745 importance matrix

How these were made

Stock llama-quantize presets of llama.cpp b12973 with an importance matrix, from the BF16 GGUF named above. The matrix was computed with stock llama-imatrix on unsloth/Qwen4-35B-A3B-GGUF Q8_0 (same commit) over the Sakura calibration text hfqa-original-calibration-v2 (CC0, SHA-256 bc7216ea05c8bd05d6b9e94d813ec9eb651a2375288c08c06135a3f874d886f2), context 128. The matrix entry of blk.1.ple_conv1d.weight (the n-gram convolution) does not match that tensor's shape in this llama.cpp version and was left out; llama.cpp keeps that tensor (4 columns) in F16 anyway, so every quantized tensor used the matrix. The matrix file is included.

Stock llama.cpp keeps some tensors (for example normalization and gated-residual weights) in higher precision, so not every tensor is stored in the named type; the table shows what each file really contains (read from the file headers on the Hub).

File Tensors by type
Sakura-Qwen4-35B-A3B-Q2_K.gguf BF16: 22, F16: 1, F32: 335, Q2_K: 377, Q3_K: 134, Q4_0: 1, Q4_K: 41, Q6_K: 1
Sakura-Qwen4-35B-A3B-Q3_K_M.gguf BF16: 22, F16: 1, F32: 335, Q3_K: 377, Q4_0: 1, Q4_K: 167, Q5_K: 8, Q6_K: 1
Sakura-Qwen4-35B-A3B-Q4_K_M.gguf BF16: 22, F16: 1, F32: 335, Q4_K: 468, Q5_0: 1, Q6_K: 85
Sakura-Qwen4-35B-A3B-Q5_K_M.gguf BF16: 22, F16: 1, F32: 335, Q5_1: 1, Q5_K: 468, Q6_K: 85

6. License Information

Source license: apache-2.0 (redistribution with attribution).

ไธญๆ–‡่ฏดๆ˜Ž ยท ๆจฑ่Šฑ Sakura๏ผˆ็‚นๅ‡ปๅฑ•ๅผ€๏ผ‰

ๆจฑ่Šฑ Sakura ยท Qwen/Qwen4-35B-A3B ็š„ imatrix GGUF ้‡ๅŒ–

็‹ฌ็ซ‹็š„็คพๅŒบ้‡ๅŒ–็‰ˆๆœฌ๏ผŒๅนถ้žไธŠๆธธไฝœ่€…็š„ๅฎ˜ๆ–นๅ‘ๅธƒใ€‚

ๅŽŸ็‰ˆๆจกๅž‹ๅŸบๅ‡†ๆต‹่ฏ•

Qwen4-35B-A3B ๅŸบๅ‡†ๆต‹่ฏ•็ป“ๆžœ

ไปฅไธ‹ไธบ Qwen ๅ›ข้˜Ÿๅ…ฌๅธƒ็š„ Qwen/Qwen4-35B-A3B ๅ…จ็ฒพๅบฆๆˆ็ปฉ๏ผŒๅนถ้žๅœจ่ฟ™ไบ›้‡ๅŒ–ๆ–‡ไปถไธŠๆต‹ๅพ—ใ€‚

้€‚ๅˆๅ“ชๅ—ๆ˜พๅก

ๆฏไธชๆ–‡ไปถไธญๅพˆๅคงไธ€้ƒจๅˆ†ๆ˜ฏ้€ๅฑ‚ n-gram ่กจ per_layer_token_embdใ€‚llama.cpp๏ผˆb12973 ๅŠๆ›ดๆ–ฐ็‰ˆๆœฌ๏ผ‰ไธไผšๆŠŠๅฎƒๆ”พ่ฟ›ๆ˜พๅญ˜ๆˆ–ๆ•ดไฝ“่ฝฝๅ…ฅๅ†…ๅญ˜๏ผŒ่€Œๆ˜ฏๆŒ‰้œ€็›ดๆŽฅไปŽ็ฃ็›˜ๆ–‡ไปถ่ฏปๅ–ๆ‰€้œ€็š„่กŒ๏ผˆ้ป˜่ฎค --lazy-mode auto๏ผŒ้€‚็”จไบŽ่ถ…่ฟ‡ 4 GiB ็š„ๅผ ้‡๏ผŒๅŸบไบŽๅ†…ๅญ˜ๆ˜ ๅฐ„ๆ–‡ไปถ๏ผ‰ใ€‚่ฏๅตŒๅ…ฅๅŒๆ ท็•™ๅœจ CPU ไธŠใ€‚ไฝฟ็”จ -ngl 99 ๆ—ถๅชๆœ‰ๅ…ถไฝ™้ƒจๅˆ†่ฟ›ๅ…ฅๆ˜พๅกใ€‚

้‡ๅŒ– ๆ–‡ไปถ n-gram ่กจ๏ผˆ็•™ๅœจ SSD๏ผ‰ ่ฏๅตŒๅ…ฅ๏ผˆๅ†…ๅญ˜๏ผ‰ ๆ˜พๅก้ƒจๅˆ†๏ผˆๆƒ้‡๏ผ‰ ๆœ€ๅฐๅˆ้€‚ๆ˜พๅก ่ฏฅๅกๅ‰ฉไฝ™๏ผˆไธŠไธ‹ๆ–‡็ญ‰๏ผ‰
Q2_K 25.0 GB 11.5 GB 0.2 GB 13.3 GB (12.4 GiB) 16 GB 3.6 GiB
Q3_K_M 28.9 GB 11.5 GB 0.2 GB 17.2 GB (16.0 GiB) 24 GB 8.0 GiB
Q4_K_M 36.1 GB 14.1 GB 0.3 GB 21.7 GB (20.2 GiB) 24 GB 3.8 GiB
Q5_K_M 41.0 GB 15.4 GB 0.3 GB 25.3 GB (23.6 GiB) 32 GB 8.4 GiB

โ€œๆœ€ๅฐๅˆ้€‚ๆ˜พๅกโ€ๆŒ‡ๅœจๆƒ้‡ไน‹ๅค–ไป่‡ณๅฐ‘ๅ‰ฉไฝ™ 2 GiB๏ผˆ็”จไบŽไธŠไธ‹ๆ–‡ KV ็ผ“ๅญ˜ๅ’Œ่ฎก็ฎ—็ผ“ๅ†ฒ๏ผ‰็š„ๆœ€ๅฐๅธธ่งๆ˜พๅญ˜่ง„ๆ ผ๏ผˆ8/12/16/24/32/48 GB๏ผ‰ใ€‚ๆ˜ฏๅฆ่ถณๅคŸๅ–ๅ†ณไบŽไฝ ็š„ไธŠไธ‹ๆ–‡้•ฟๅบฆไธŽ่ฎพ็ฝฎ๏ผŒๆœช็ปๆต‹้‡ใ€‚ๆ‰€ๆœ‰ๅคงๅฐๅ‡่ฏปๅ–่‡ช Hub ไธŠ็š„ๆ–‡ไปถๅคด๏ผ›ๆœฌ่กจๆœชๅœจ็œŸๅฎžๆ˜พๅกไธŠๆต‹่ฏ•๏ผŒไปŽ SSD ่ฏปๅ–่ฏฅ่กจ็š„้€ŸๅบฆไนŸๆœชๆต‹้‡๏ผˆ้ซ˜้€Ÿ NVMe SSD ๆœ‰ๅธฎๅŠฉ๏ผŒ็ฉบ้—ฒๅ†…ๅญ˜ไผš่ขซ็ณป็ปŸ็”จไฝœ็ผ“ๅญ˜๏ผ‰ใ€‚ๆ˜พๅญ˜ๆ›ดๅฐๆ—ถ๏ผŒๅฏ็”จ --n-cpu-moe N ๅฐ† N ๅฑ‚็š„ไธ“ๅฎถๆ”พๅœจ็ณป็ปŸๅ†…ๅญ˜ไธญ๏ผˆๆ›ดๆ…ข๏ผŒๆœชๆต‹่ฏ•๏ผ‰ใ€‚

1. ๆฆ‚่ฟฐ

ๆžถๆž„๏ผšqwen4_moe๏ผˆGGUF qwen4exp๏ผ‰ยท ๆ€ปๅ‚ๆ•ฐ 35B / ๆฟ€ๆดป 3B๏ผŒๅฆๅซ 20B ้€ๅฑ‚ n-gram ๅตŒๅ…ฅ่กจไธŽ 2B MTP๏ผŒๆ”ฏๆŒๅ›พๅƒ่พ“ๅ…ฅใ€‚

ๅŽŸๅง‹ๆจกๅž‹๏ผš112.8 GB๏ผˆBF16 GGUF๏ผŒ่ฟ™ไบ›้‡ๅŒ–็‰ˆๆœฌ็š„ๆฅๆบ๏ผ‰ใ€‚

้‡ๅŒ– ๅคงๅฐ ็›ธๆฏ”ๅŽŸๅง‹ๆจกๅž‹
Q2_K 25.0 GB ๅฐ 78 %
Q3_K_M 28.9 GB ๅฐ 74 %
Q4_K_M 36.1 GB ๅฐ 68 %
Q5_K_M 41.0 GB ๅฐ 64 %

n-gram ่กจ per_layer_token_embd ๆฏ่กŒ 128 ไธชๅ€ผ๏ผŒK ้‡ๅŒ–ๆ ผๅผๆ— ๆณ•ๅฎน็บณ๏ผŒllama.cpp ไผšๆ”น็”จๆ—งๆ ผๅผ๏ผˆไพ‹ๅฆ‚ Q3_K_M ไธญไธบ Q4_0๏ผ‰๏ผ›ไป…ๆญค่กจๆŒ‰้‡ๅŒ–ไธๅŒไธบ 11.5โ€“15.4 GB๏ผŒllama.cpp ๆŒ‰้œ€ไปŽ็ฃ็›˜่ฏปๅ–๏ผŒไธๅŠ ่ฝฝ่ฟ›ๆ˜พๅญ˜๏ผˆ่งโ€œ้€‚ๅˆๅ“ชๅ—ๆ˜พๅกโ€๏ผ‰ใ€‚

2. ๆ–‡ไปถไธŽไฝฟ็”จ

ๆ–‡ไปถ ๅคงๅฐ ็ฑปๅž‹
Sakura-Qwen4-35B-A3B-Q2_K.gguf 25.0 GB Q2_K
Sakura-Qwen4-35B-A3B-Q3_K_M.gguf 28.9 GB Q3_K_M
Sakura-Qwen4-35B-A3B-Q4_K_M.gguf 36.1 GB Q4_K_M
Sakura-Qwen4-35B-A3B-Q5_K_M.gguf 41.0 GB Q5_K_M
mmproj-Sakura-Qwen4-35B-A3B-F16.gguf 0.9 GB vision projector
Sakura-Qwen4-35B-A3B-imatrix.dat 0.2 GB importance matrix
llama-server -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M -c 8192 --port 8080

้œ€่ฆๆ”ฏๆŒ่ฏฅๆžถๆž„็š„ llama.cpp๏ผˆๆœฌๅ‘ๅธƒไฝฟ็”จ b12973๏ผ‰ใ€‚่ถ…่ฟ‡ 45 GB ็š„ๆ–‡ไปถๅทฒๆ‹†ๅˆ†ไธบ็ผ–ๅท้ƒจๅˆ†๏ผŒ่ฏทๆ”พๅœจไธ€่ตทๅนถๅŠ ่ฝฝ็ฌฌไธ€ไธชใ€‚ๆœฌ็‰ˆๆœฌๆœชๆต‹่ฏ•ๅ›พๅƒ่พ“ๅ…ฅใ€‚

3. ้ชŒ่ฏ

  • Q4_K_M ๅทฒ็”ฑ llama.cpp b12973 ๅŠ ่ฝฝๅนถๆˆๅŠŸ็”Ÿๆˆไธ€ๆฌก่ฟž่ดฏๆ–‡ๆœฌ๏ผ›ๅ…ถไป–ๆ–‡ไปถๆœช่ฟ่กŒๆŽจ็†๏ผŒๅ…ถๅผ ้‡็ฑปๅž‹่ฏปๅ–่‡ช Hub ไธŠ็š„ๆ–‡ไปถๅคดใ€‚
  • ๆœชๆต‹้‡ๅ›ฐๆƒ‘ๅบฆใ€KL ๆ•ฃๅบฆใ€ๅŸบๅ‡†ๆˆ–่ดจ้‡ๅˆ†ๆ•ฐใ€‚

้‡ๅŒ–ๆ–นๅผ๏ผšๆ ‡ๅ‡† llama-quantize ้ข„่ฎพ้…ๅˆ้‡่ฆๆ€ง็Ÿฉ้˜ต๏ผ›็Ÿฉ้˜ต็”ฑๆ ‡ๅ‡† llama-imatrix ๅœจ unsloth Q8_0 ไธŠไปฅ Sakura ๆ กๅ‡†ๆ–‡ๆœฌ hfqa-original-calibration-v2๏ผˆCC0๏ผ‰่ฎก็ฎ—ใ€‚blk.1.ple_conv1d.weight ็š„็Ÿฉ้˜ตๆก็›ฎไธŽ่ฏฅๅผ ้‡ๅฝข็Šถไธ็ฌฆ๏ผŒ่ฏฅๅผ ้‡๏ผˆ4 ๅˆ—๏ผ‰ๆœฌๅฐฑไปฅ F16 ไฟๅญ˜๏ผŒๅ› ๆญคๆ‰€ๆœ‰่ขซ้‡ๅŒ–็š„ๅผ ้‡้ƒฝไฝฟ็”จไบ†็Ÿฉ้˜ตใ€‚

ๆ–‡ไปถๅ“ˆๅธŒ่ง่‹ฑๆ–‡่ฏดๆ˜Ž็š„ๆŠ€ๆœฏ็ป†่Š‚้ƒจๅˆ†ใ€‚

4. ่ฎธๅฏ่ฏ

ๆบ่ฎธๅฏ่ฏ๏ผšapache-2.0๏ผˆๅ…่ฎธๅœจ็ฝฒๅ็š„ๅ‰ๆไธ‹ๅ†ๅˆ†ๅ‘๏ผ‰ใ€‚

ๅฎŒๆ•ด็‹ฌ็ซ‹็š„ไธญๆ–‡็‰ˆ๏ผšREADME_zh.md

Downloads last month
1,622
GGUF
Model size
56B params
Architecture
qwen4exp
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

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

Model tree for webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF

Quantized
(685)
this model