Instructions to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with 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:Q4_K_M # Run inference directly in the terminal: llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
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:Q4_K_M # Run inference directly in the terminal: llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
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:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Use Docker
docker model run hf.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with Ollama:
ollama run hf.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with Docker Model Runner:
docker model run hf.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
- Lemonade
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Sakura-Qwen4-35B-A3B-imatrix-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download README_zh.md from webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 4.24 kB
-
https://huggingface.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF/resolve/main/README_zh.md
- Command line
-
hf download hf://webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF/README_zh.md
-
curl -L -o README_zh.md https://huggingface.co/webmp3/Sakura-Qwen4-35B-A3B-imatrix-GGUF/resolve/main/README_zh.md
language:
- en
- zh
license: apache-2.0
base_model: Qwen/Qwen4-35B-A3B
base_model_relation: quantized
tags:
- gguf
- quantization
- sakura
- imatrix
樱花 Sakura · Qwen/Qwen4-35B-A3B 的 imatrix GGUF 量化
独立的社区量化版本,并非上游作者的官方发布。
原版模型基准测试
以下为 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(允许在署名的前提下再分发)。
