Instructions to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp 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 AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp 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 AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
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 AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
Use Docker
docker model run hf.co/AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
- Llama new
- LM Studio
- Jan
- Ollama
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with Ollama:
ollama run hf.co/AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
- Unsloth Desktop
- Pi
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with Docker Model Runner:
docker model run hf.co/AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
- Lemonade
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
Run and chat with the model
lemonade run user.Qwen3.5-9B-AX8860-llama.cpp-BF16
List all available models
lemonade list
- Hermes Agent
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
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:8080/v1 hermes config set model.default AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16
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:8080/v1 \ --custom-model-id "AXERA-TECH/Qwen3.5-9B-AX8860-llama.cpp:BF16" \ --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"
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Qwen3.5-9B on AX8860 (llama.cpp + ggml-axera, 2026-11-04)
在爱芯 AX8860 的 NPU(4 核)上用 llama.cpp 运行 Qwen3.5-9B,支持文本和图像输入;三套 kernel 对应 16k / 128k / 256k 上下文。 Qwen3.5-9B with text and image input on the 4-core NPU of the Axera AX8860, with llama.cpp; three kernel sets for 16k / 128k / 256k contexts.
文件 / Files
| 文件 / File | 说明 / Description |
|---|---|
gguf/qwen3.5-9b-mxfp4.gguf |
模型权重(GGUF MXFP4,6.00 GB,md5 57b4b4b8fe3e7d05af29019438e5369a)/ weights |
gguf/mmproj-qwen3.5-9b-bf16.gguf |
视觉编码器权重(BF16,921 MB,md5 69d1a645084d0f31d4296a82dce991cf)/ vision encoder weights |
bin/ |
llama.cpp 板端程序与共享库(run.sh 设置 LD_LIBRARY_PATH;还需系统 /opt/lib 与 libc)/ the board programs and shared libraries |
kernels/ |
默认 / default:128k 上下文的 NPU kernel + manifest.json / the 128k-context kernels |
kernels_16k/ |
16k 上下文:NPU 内存最省,短对话 / agent 场景 / 16k context: the smallest NPU memory |
kernels_256k/ |
256k 上下文(模型原生最大)/ 256k context (the model's native maximum) |
run.sh |
运行脚本 / run script |
每套 kernel:prefill、16 层 decode group(两组)、输出头、3072-patch ViT、两个 IO 描述 kernel + manifest.json;三套只有 prefill 和 decode group 的上下文不同。
Each set: prefill, a 16-layer decode group (two groups), the output head, the 3072-patch ViT, two IO descriptor kernels + manifest.json; only the prefill and decode group change with the context.
权重只来自 GGUF:kernel 不含权重,加载时从 GGUF 转换到 NPU;NPU 内存里只放一份权重(prefill 和 decode 共用)。 The weights come only from the GGUFs: the kernels hold none; they are converted from the GGUF at load; one copy of the weights in NPU memory (shared by prefill and decode).
运行 / Run
环境 / Requirements:AX8860,SDK V0.5.0 或更新(cat /proc/ax_proc/version)/ SDK V0.5.0 or newer.
./run.sh "The capital of France is" 64 # 文本补全 / text completion
./run.sh -i assets/bus.jpg "Describe this image." 256 # 图像描述 / describe an image
./run.sh -c # 命令行多轮对话 / multi-turn chat in the terminal
./run.sh -s 8080 # OpenAI 兼容服务 / OpenAI-compatible server
KERNELS=16k ./run.sh -s 8080 # 16k 套件(省内存)/ the 16k set
KERNELS=256k CTX=200000 ./run.sh -s 8080 # 256k 套件,llama.cpp 上下文 200000
curl http://<board>:8080/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"你好"}]}'
KERNELS(128k 默认 / 16k / 256k)选 kernel 套件;CTX 是传给 llama.cpp 的 -c,默认等于套件的上下文,可以更小。
KERNELS (128k, the default / 16k / 256k) picks the kernel set; CTX is llama.cpp's -c, the set's context by default, may be smaller.
直接调用程序时设置 / When calling the programs directly: LD_LIBRARY_PATH=/opt/lib:$PWD/bin GGML_AXERA_KERNEL_DIR=<repo>/kernels
(或 kernels_16k / kernels_256k),-ngl 99,-c 不超过套件的上下文,服务端 -np 1。
GGML_AXERA_PROF=1 退出时打印各阶段耗时;GGML_AXERA_TEMP_MAX=<°C>(默认 100,0 关闭)在 NPU 温度过高时暂停 kernel。
性能 / Performance
AX8860,SDK V0.5.1,NPU 4 核 / 4 cores,贪心解码 / greedy decoding:
| 项 / Item | kernels_16k |
kernels(128k) |
kernels_256k |
|---|---|---|---|
| 加载后 NPU 内存(CMM)/ NPU memory after load | 6.27 GB | 10.18 GB | 14.61 GB |
| 加载后系统内存 VmHWM / host memory after load | 1.31 GiB | 1.32 GiB | 1.32 GiB |
| 加载 / load | 30 s | 33 s | 35 s |
| 4k prompt 的 prefill 页耗时 / per-page prefill | 57.1 ms(16 页 / pages,913.8 ms) | - | - |
| 短上下文 decode / short-context decode | 42.7 tokens/s | - | - |
| 32k prompt prefill / decode | - | 2434 tokens/s / 30.5 tokens/s | 2458 tokens/s / 30.3 tokens/s |
| 64k prompt prefill / decode | - | 2028 tokens/s / 23.6 tokens/s | 1990 tokens/s / 23.3 tokens/s |
| 120k prompt(113,463 token)prefill / decode | - | 1529 tokens/s / 17.9 tokens/s | 1481 tokens/s / 17.7 tokens/s |
英文小说 PPL(-c 4096)/ long-text PPL |
- | 5.0061 | 5.0139 |
所有长上下文 decode 计时均为 23 次。长上下文下 attention 要读整个 KV,decode 随 -c 变慢。
All long-context decode timings have 23 runs; attention reads the whole KV, so decode slows with context.
正确性 / Correctness
- 16k 贪心文本 / 16k greedy text:rc 0,md5
a7785d21b97952f6e180618317c8c836;输出连贯,补充的-n 256运行回答 “Paris”。 - 16k 中文 PPL(内部测试集,
-c 512)/ Chinese PPL: NPU 20.8258 +/- 2.88086,同 GGUF 的 host CPU 20.5512 +/- 2.89327(+1.34%,门限 5%)/ same-GGUF host CPU control. - 16k 图像 / 16k image:rc 0,与旧 host 逐字节一致,md5
4b8ad6e3a712219b00f65917be7ad658;内容正确 / coherent. - 大海捞针 / needle in a haystack(暗号
7391-ALPHA-BRAVO藏在英文小说 30% 处 / code at 30% of an English novel):128k 套件 32k / 64k / 120k 全部命中;256k 套件 32k / 64k / 120k 全部命中。 - 三套 kernel 的 prefill / quantized KV 索引范围检查通过;真实 32k / 64k / 120k prompt 分别为 30,917 / 61,177 / 113,463 token。128k prefill 四段 8 层 call 的链式 cos 为 mean
0.999894/ min0.999134;256k 八段 4 层 call 为 mean0.999894/ min0.999347。 - 同一输入多次运行,结果偶有极小差异(NPU 上累加顺序不固定),不影响输出质量。 Repeated runs of one input may differ slightly (the NPU's accumulation order varies); the output quality is the same.
已知限制 / Known limits
- 运行时独占 NPU 4 核,同时运行其他 NPU 程序会出错 / takes all 4 NPU cores; do not run other NPU programs alongside.
- 单序列:服务端须
-np 1/ one sequence: the server needs-np 1. - 板子 16 GB 系统内存:
llama-perplexity的-c不超过 4096(它把整段上下文的 logits 放在系统内存里)/ with the board's 16 GB host memory,llama-perplexityworks up to-c 4096. - 上下文随
-c增大,decode 变慢(attention 要读整个 KV):64k 上下文 23.3 tokens/s,113k 上下文 17.7 tokens/s / decode slows with the context. - 长 prefill 会加热 NPU;host 在温度超过
GGML_AXERA_TEMP_MAX(默认 100 °C)时暂停 kernel,这是保护,不是错误 / long prefill heats the NPU; the host pauses above the limit.
源码 / Sources
- llama.cpp:ZHEQIUSHUI/llama.cpp
axera-dev@20a3e30(ggml/src/ggml-axera/models/qwen35_whole) - kernel:ZHEQIUSHUI/ax-dsl-kernels
main@a6064b5(models/qwen35_9b/whole,kernels.md5列出三套 / lists the three sets)
- Downloads last month
- 7
4-bit