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 AXERA-TECH/Qwen3.5-4B-AX8860-llama.cpp:BF16
# Run inference directly in the terminal:
llama cli -hf AXERA-TECH/Qwen3.5-4B-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-4B-AX8860-llama.cpp:BF16
# Run inference directly in the terminal:
llama cli -hf AXERA-TECH/Qwen3.5-4B-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-4B-AX8860-llama.cpp:BF16
# Run inference directly in the terminal:
./build/bin/llama cli -hf AXERA-TECH/Qwen3.5-4B-AX8860-llama.cpp:BF16
Use Docker
docker model run hf.co/AXERA-TECH/Qwen3.5-4B-AX8860-llama.cpp:BF16
Quick Links

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Qwen3.5-4B on AX8860 (llama.cpp + ggml-axera, 2026-11-05)

在爱芯 AX8860 的 NPU(4 核)上用 llama.cpp 运行 Qwen3.5-4B,支持文本和图像输入;16k 上下文。 Qwen3.5-4B with text and image input on the 4-core NPU of the Axera AX8860, with llama.cpp; 16k context.

文件 / Files

文件 / File 说明 / Description
qwen3.5-4b-mxfp4.gguf 模型权重(GGUF MXFP4,2.66 GB,md5 e82f054c77152821eb8edd5ae572f2eb)/ weights
mmproj-qwen3.5-4b-bf16.gguf 视觉编码器权重(BF16,676 MB,md5 d64c1da66e6bd59ecbec5d57ccc13ec7)/ vision encoder weights
bin/ llama.cpp 板端程序与共享库(run.sh 设置 LD_LIBRARY_PATH;还需系统 /opt/lib 与 libc)/ the board programs and shared libraries (run.sh sets LD_LIBRARY_PATH; the system /opt/lib and libc are also needed)
kernels/ NPU kernel + manifest.json:prefill、16 层 decode group(两组)、输出头、3072-patch ViT、两个 IO 描述 kernel / the NPU kernels + manifest.json: prefill, a 16-layer decode group (two groups), the output head, the 3072-patch ViT, two IO descriptor kernels
run.sh 运行脚本 / run script

权重只来自 GGUF:kernel 不含权重,加载时从 GGUF 转换到 NPU(约 9 s);NPU 内存里只放一份权重(prefill 和 decode 共用)。 The weights come only from the GGUFs: the kernels hold none; they are converted from the GGUF at load (~9 s); 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 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
curl http://<board>:8080/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"messages":[{"role":"user","content":"你好"}]}'

直接调用程序时设置 / When calling the programs directly: LD_LIBRARY_PATH=/opt/lib:<repo>/bin GGML_AXERA_KERNEL_DIR=<repo>/kernels,-ngl 99,-c 不超过 16384,服务端 -np 1。GGML_AXERA_PROF=1 退出时打印各阶段耗时 / prints per-stage times at exit。

性能 / Performance

AX8860,SDK V0.5.1,NPU 4 核 / 4 cores,贪心解码 / greedy decoding:

项 / Item 值 / Value
加载后 NPU 内存(CMM)/ NPU memory after load 3.4 GB
加载后系统内存 / host memory after load 1.0 GB
加载 / load 9 s(服务端 / server 21 s)
4k prompt prefill(4008 token) 7.7k tokens/s(每 256 token 页 32.6 ms / 32.6 ms per 256-token page)
decode(短上下文 / short context) 60.6 tokens/s
图像编码 / image encoding(3072 patch = 768 图像 token / image tokens) 0.20 s

正确性 / Correctness

  • "The capital of France is" → "Paris. …";图像描述正确(车辆、文字、人物)/ image descriptions correct.
  • 中文 PPL(内部测试集,-c 512):25.57,同一 GGUF 在 CPU 上 25.15 / Chinese PPL on an internal set: 25.57 (the same GGUF on the CPU: 25.15).
  • 同一输入多次运行,结果偶有极小差异(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.
  • 上下文最大 16384 / the context is at most 16384.

源码 / Sources

Downloads last month
-
GGUF
Model size
4B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support