惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
博客园 - 司徒正美
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
L
LangChain Blog
T
The Blog of Author Tim Ferriss
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ

マリウス

s/Neovim/Helix/g Hyperuplink: Discuss like it’s 1998 The Cables that Connect the World Flipper BUSY Bar Recovering BIOS Firmware on the Star Labs StarBook Teaching an Old Dog New Tricks: Forgejo + XMPP GL.iNet Mudi 7 The TEMU-fication of Software, Digital Goods & Services A GTK4 ssh-askpass in Zig I Regret Migrating to Codeberg More … Hyperuplink Bangkok, Thailand Apple iPhone Air The Day WhatsApp Goes Dark Lenovo X1 Carbon Gen 14 Aura Making My Content More Easily Digestible Updates 2026/Q2 I Do Not Recommend Google Hardware Hong Kong, China Minimal yet Productive Travel Desk Setup Bureaucracy is Eating the World 80Retros x HMX Monochrome Photography Workflow with ~~Darktable on Linux~~ Lightroom on GrapheneOS The Rise of the Bullshittery Seoul, South Korea I Do Not Recommend Bitwarden Privacy Setup for Android 16 with GrapheneOS KTT x 80Retros GAME 1989 Orange Updates 2026/Q1
llama.cpp with SYCL (oneAPI) for Intel Panther Lake on Ge...
marius@xn--gckvb8fzb.com (Marius) · 2026-09-15 · via マリウス

A brief write-up on how to get llama.cpp working with SYCL via Intel’s oneAPI for Intel Panther Lake processors with Arc iGPUs on Gentoo Linux.

llama.cpp with SYCL (oneAPI) for Intel Panther Lake on Gentoo

Alright, so if you’ve read the title and thought you were having a stroke, you might not be the target audience for this post. If, however, you thought “more tokens/s?”, you should keep on reading.

If you remember my review of the new Lenovo X1 Carbon Gen 14 Aura with Intel Panther Lake Core Ultra X7 368H vPro from a while ago, you might recall that I had tested its local “AI” performance using Ollama, via Vulkan, which obviously didn’t perform particularly well across various models. The proper way to run local LLMs is to use Intel’s official oneAPI framework and compile llama.cpp with SYCL enabled, which will greatly increase performance.

This post is a very brief write-up of how that can be done and primarily serves as yet another documentation for future-me.

Gentoo

I’m assuming that you’re already running your Gentoo system with the xe driver and VIDEO_CARDS="intel". First, install the necessary dependencies:

emerge -av dev-libs/intel-compute-runtime dev-libs/level-zero \
           dev-util/intel-graphics-compiler media-libs/gmmlib \
           dev-util/clinfo

You’ll likely have to unmask a couple of those packages, like clinfo, but that’s fine. When this is done, add your user to the video and render groups if you haven’t already and log back in. Test that the GPU is being recognized by clinfo -l:

Platform #0: Intel(R) OpenCL
 `-- Device #0: Intel(R) Core(TM) Ultra X7 368H
Platform #1: rusticl
Platform #2: Intel(R) OpenCL Graphics
 `-- Device #0: Intel(R) Arc(TM) B390 GPU

oneAPI

Next, go and get the “Intel Deep Learning Essentials” package and use ./intel-deep-learning-essentials-2026.1.2.25_offline.sh -a --cli to install it as a user. I chose the installation path ~/projects/intel/oneapi, but you’re free to install it anywhere you please.

Note: Even if you deselect the telemetry option, the installer will try to contact Intel’s servers post-installation, so make sure your OpenSnitch blocks all requests from that process towards the interwebs.

llama.cpp

While the FireBurn overlay has sci-misc/llama-cpp, it does not yet allow you to specify sycl as a USE flag, and the official Gentoo repository has no llama.cpp ebuild at all. Hence we clone the project’s Git repository and compile it manually:

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
source ~/projects/intel/oneapi/setvars.sh
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_F16=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j

Run

Once llama.cpp finishes building, you can start it and have it download a model, e.g., Mistral or Qwen3:

source ~/projects/intel/oneapi/setvars.sh
./build/bin/llama-server -hf bartowski/Mistral-7B-Instruct-v0.3-GGUF:Q4_K_M -ngl 99 -sm none -mg 0 -c 8192 --host 127.0.0.1 --port 8080

or:

./build/bin/llama-server -hf Qwen/Qwen3-4B-GGUF:Q4_K_M --jinja -ngl 99 --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0 --presence-penalty 1.5 -c 40960 -n 32768 --no-context-shift --host 127.0.0.1 --port 8080

Open a browser at http://127.0.0.1:8080, and you can try the model right away.

On my Lenovo, I managed to increase the tokens/second by roughly 60% compared to what Ollama (via Vulkan) was able to achieve. For example, the Mistral model went from approximately 13.88 tokens/s to 22.36 tokens/s.

Enjoyed this? Please consider supporting my work.