llama.cpp 四后端横评:Vulkan / SYCL / OpenVINO / CPU 谁最快

llama.cpp 有多后端,但后端不是随便选都一样的。同一个 Intel Arc 140T 核显、同一个 Gemma-4-E4B 模型,Vulkan / SYCL / OpenVINO / 原生 CPU 四个后端跑出来,预填充差距最大达到 20 倍。这篇用五组实测数据讲清楚:什么场景该用哪个后端。

基准:llama-bench pp512 / tg128,8 线程。模型 gemma-4-E4B-it-Q4_K_M(4.62GiB,7.52B MoE)。Arc 140T 核显,共享显存已调大。2026-09-01 实测。

完整成绩单(E4B)

后端参数pp512 (t/s)tg128 (t/s)
Vulkan(核显)-ngl 99380.80 ± 4.1720.34 ± 0.25
SYCL(核显)-ngl 99366.60 ± 2.5416.43 ± 0.01
OpenVINO GPU-ngl 99 -fa 11666.84 ± 13.8712.53 ± 0.09
OpenVINO CPU-ngl 99116.21 ± 4.798.81 ± 0.06
原生 CPU-ngl 084.37 ± 2.4914.92 ± 0.03

柱状图更直观(生成速度):

生成速度 tg128(t/s)
Vulkan20.3
SYCL16.4
原生 CPU14.9
OpenVINO GPU12.5
OpenVINO CPU8.8
预填充速度 pp512(t/s)
OpenVINO GPU1667
Vulkan381
SYCL367
OpenVINO CPU116
原生 CPU84

逐后端解读

Vulkan:最均衡,默认首选

pp 380.8 / tg 20.3,两项都在第一梯队,没有明显短板。日常聊天、文档生成、Agent 交互,闭眼选 Vulkan。它是 llama.cpp 在核显上的默认主力,驱动成熟,坑最少。

SYCL:与 Vulkan 同门,略慢一档

pp 366.6 / tg 16.4,全面比 Vulkan 慢 ~10-20%。SYCL 的优势主要在支持更多硬件(NVIDIA/AMD/Intel 通吃),Intel 核显上没必要,但在 26B 部分 offload 时它反而是唯一能跑的(调显存前)。

OpenVINO GPU:预填充怪兽,生成拉胯

pp 1666.8 t/s,是 Vulkan 的 4.4 倍、原生 CPU 的 20 倍——Intel 自家的东西在自家核显上预填充就是不讲道理地快。但 tg 只有 12.5,比 CPU 还慢。适合重 prompt 轻生成的场景:长系统提示词的 Agent、RAG 检索、大批量文档分析。

原生 CPU vs OpenVINO CPU:CPU 版反杀

原生 CPU tg 14.9、pp 84.4;OpenVINO CPU tg 8.8、pp 116。反直觉的是生成速度原生 CPU 快 70%,只有预填充 OpenVINO 略快。纯 CPU 场景用原生版就好,OpenVINO CPU 没有优势。

选择矩阵

场景推荐后端理由
日常聊天 / 文档 / Agent 交互Vulkanpp 380 / tg 20 均衡无短板
重 prompt(长系统提示词 / RAG)OpenVINO GPUpp 1667 一骑绝尘
无 GPU / 纯 CPU 机器原生 CPUtg 14.9 比 OpenVINO CPU 快 70%
多厂商硬件兼容SYCLNVIDIA/AMD/Intel 通吃
大模型显存不够时SYCL 部分 offload调显存前唯一能跑 26B 的后端

后端的差异本质是底层调度实现:Vulkan 对 MoE 有异步专家调度优化(生成快),OpenVINO 对 Intel 核显做了预填充深度优化。选对后端,同一块核显能白拿 4 倍预填充性能。

别忘了环境前提:OpenVINO GPU 在 llama.cpp 里需设 GGML_OPENVINO_DEVICE=GPU 才走核显,默认是 CPU;且 gemma4 在 OpenVINO 上仅 stateless 模式可用。

llama.cpp has multiple backends, and they are not interchangeable. On the same Intel Arc 140T iGPU with the same Gemma-4-E4B model, Vulkan / SYCL / OpenVINO / native CPU produced prefill results up to 20× apart. Five measured runs, one clear answer per use case.

Bench: llama-bench pp512 / tg128, 8 threads. Model gemma-4-E4B-it-Q4_K_M (4.62GiB, 7.52B MoE). Arc 140T iGPU, shared memory enlarged. Tested 2026-09-01.

Full scorecard (E4B)

BackendFlagspp512 (t/s)tg128 (t/s)
Vulkan (iGPU)-ngl 99380.80 ± 4.1720.34 ± 0.25
SYCL (iGPU)-ngl 99366.60 ± 2.5416.43 ± 0.01
OpenVINO GPU-ngl 99 -fa 11666.84 ± 13.8712.53 ± 0.09
OpenVINO CPU-ngl 99116.21 ± 4.798.81 ± 0.06
Native CPU-ngl 084.37 ± 2.4914.92 ± 0.03

As bars (decode speed):

Decode tg128 (t/s)
Vulkan20.3
SYCL16.4
原生 CPU14.9
OpenVINO GPU12.5
OpenVINO CPU8.8
Prefill pp512 (t/s)
OpenVINO GPU1667
Vulkan381
SYCL367
OpenVINO CPU116
原生 CPU84

Backend by backend

Vulkan: most balanced, the default pick

pp 380.8 / tg 20.3 — top tier in both, no real weakness. For daily chat, document generation and agent interactions, just pick Vulkan. It's llama.cpp's default workhorse on iGPUs: mature drivers, fewest surprises.

SYCL: Vulkan's sibling, a notch slower

pp 366.6 / tg 16.4, uniformly ~10-20% behind Vulkan. SYCL's edge is broader hardware support (NVIDIA/AMD/Intel alike); on an Intel iGPU it's unnecessary — though before VRAM tuning it was the only backend that could partially offload the 26B.

OpenVINO GPU: prefill monster, weak decode

pp 1666.8 t/s — 4.4× Vulkan, 20× native CPU. Intel's own stack on Intel silicon is brutally fast at prefill. But tg is only 12.5 — slower than CPU. Made for prompt-heavy, decode-light jobs: long-system-prompt agents, RAG retrieval, bulk document analysis.

Native CPU vs OpenVINO CPU: native wins

Native CPU: tg 14.9, pp 84.4; OpenVINO CPU: tg 8.8, pp 116. Counter-intuitively, native CPU decodes 70% faster; only prefill favors OpenVINO. For CPU-only, stick with native — OpenVINO CPU earns its keep nowhere here.

Pick matrix

ScenarioBackendWhy
Daily chat / documents / agentsVulkanbalanced: pp 380 / tg 20, no weak point
Heavy prompts (long system prompts / RAG)OpenVINO GPUpp 1667 crushes everything
No GPU / CPU-only machineNative CPUtg 14.9, 70% faster than OpenVINO CPU
Cross-vendor compatibilitySYCLworks on NVIDIA/AMD/Intel
Big model doesn't fit VRAMSYCL partial offloadthe only backend that ran 26B pre-tuning

The differences are fundamentally underlying scheduling: Vulkan has async expert scheduling for MoE (fast decode), OpenVINO deeply optimizes prefill on Intel silicon. Pick the right backend and the same iGPU gains a free 4× in prefill.

Don't forget the prerequisite:In llama.cpp, set GGML_OPENVINO_DEVICE=GPU or OpenVINO runs on CPU; and gemma4 only works on OpenVINO in stateless mode.
返回文章列表