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

Check out the documentation for more information.

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

在爱芯 AX8860 的 NPU(4 核)上用 llama.cpp 运行 Qwen3.5-0.8B,支持文本和图像输入;整个模型的 prefill 是一个 kernel、decode 是每 12 层一个 kernel,权重在 NPU 内存里只放一份。 Qwen3.5-0.8B with text and image input on the 4-core NPU of the Axera AX8860, with llama.cpp; the whole model's prefill is one kernel, decode one kernel per 12 layers, one copy of the weights in NPU memory.

文件 / Files

文件 / File 说明 / Description
qwen3.5-0.8b-q8_0.gguf 模型权重(GGUF,Q8_0,加载时转为 MXFP8:E4M3 + 每 32 个一个 E8M0 缩放,0.83 GB,md5 8167012492ec5c3902f2dbd81baba4f7)/ weights (Q8_0, converted to MXFP8 at load: E4M3 + an E8M0 scale per 32; embedding / output head Q8_0)
mmproj-qwen3.5-0.8b-bf16.gguf 视觉编码器权重(BF16,0.21 GB,md5 edf65f304280f5b88acc39eb76876855)/ vision encoder weights
bin/ llama.cpp 板端程序(含 libggml-axera.so,只依赖系统 /opt/lib 与 libc)/ the board programs (with libggml-axera.so; need only the system /opt/lib and libc)
kernels/ NPU kernel:prefill(整模型)、decode(12 层一组)、ViT、输出头 + manifest.json(上下文 16384)/ prefill (whole model), decode (16-layer groups), ViT, output head + manifest.json (context 16384)
run.sh 运行脚本 / run script

权重只来自 GGUF:kernel 不含权重,加载时从 GGUF 转换到 NPU(6.9 s);NPU 内存里只放一份权重(prefill 和 decode 共用)。 The weights come only from the GGUFs: the kernels hold none; they are converted from the GGUF at load (6.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 GGML_AXERA_KERNEL_DIR=<repo>/kernels,-ngl 99,上下文 -c 最大 16384,服务端 -np 1;prompt 用 -ub 4096 -b 4096 最快 / -ub 4096 -b 4096 for the fastest prompt processing。GGML_AXERA_PROF=1 退出时打印各阶段耗时 / prints per-stage times at exit;GGML_AXERA_TEMP_MAX=<°C>(默认 100,0 关闭)NPU 温度超过时暂停 kernel / pauses kernels above that NPU temperature.

性能 / Performance

AX8860,SDK V0.5.1,NPU 4 核 / 4 cores:

项 / Item 结果 / Result
4k prompt(4000 token)prefill 21600 tokens/s(每 256 token 一页 11.9 ms;首次 prompt 另加 6.9 s 权重转换 / plus a one-time 6.9 s weight conversion on the first prompt)
decode(短上下文 / short context) 125.6 tokens/s
图像编码 / image encoding 80 ms(整个 ViT 一个 kernel / the whole ViT in one kernel)+ 20 ms CPU 预处理 / preprocessing;输入缩放到约 1024 x 768(最多 768 个图像 token = 3072 个 16 x 16 patch,--image-max-tokens 768;更大的图缩小、更小的图放大到这个面积)/ the image is scaled to ~1024 x 768 (up to 768 image tokens = 3072 patches of 16 x 16; larger images are scaled down, smaller ones up)
加载 / load 8.3 s
NPU 内存(CMM)/ NPU memory 加载后 / after load 1.26 GB,峰值 / peak 1.26 GB
系统内存峰值 / host memory peak 0.47 GB

正确性 / Correctness

  • "The capital of France is" → "Paris. …";图像描述正确(车辆、文字、人物)/ image descriptions correct.
  • 中文 PPL(内部测试集,-c 512):NPU 40.76,同一 GGUF 在 CPU 上 40.13(+1.6%)/ Chinese PPL on an internal set: NPU 40.76 vs 40.13 for the same GGUF on the CPU (+1.6%).
  • 同一输入多次运行,结果偶有极小差异(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(长上下文版本随后)/ context up to 16384 (longer contexts to follow).
  • 没有投机解码(这个尺寸的模型没有 MTP 头)/ no speculative decoding (no MTP head at this size).

源码 / Sources

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

8-bit

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