r/LocalAIStack • u/Strict-Elevator9352 • Oct 16 '26
I built a from-scratch LLM inference engine for the Intel Core Ultra 5 125H’s integrated Arc GPU
Benchmark highlights · Core Ultra 5 125H
| Qwen3.8 27B · 11.2K prompt 97 s vs 590 s Vulkan 6.1× faster | Qwen3.8 27B · 33.9K prompt 5.5 min vs 40 min Vulkan 7.4× faster | Qwen3.5 4B · prefill 911 tok/s vs 242 Vulkan 3.8× faster |
|---|
Post
I’ve been working on arcinfer, a local LLM inference engine built specifically for Intel’s Meteor Lake integrated graphics (Xe-LPG / Arc iGPU).
The latest Level Zero results add another angle: speculative decoding raised Qwen3.6 35B-A3B from 19.9 to 31.5 tok/s, Qwen3.8 27B from 5.1 to 9.1 tok/s, and Gemma 4 E4B from 21.6 to 39.6 tok/s in the documented tests. The Level Zero engine also enables Qwen3.6 35B-A3B to run at up to 262K context by streaming MoE experts from SSD; the earlier all-resident engine fit about 40K. MTP outputs were reported identical in the tested comparisons.
The reference machine is a Core Ultra 5 125H with 32 GB RAM. The engine runs GGUF models directly on the iGPU using Intel’s low-level Level Zero API, with an OpenCL option too. It’s aimed especially at prompt processing and time-to-first-token, and includes an OpenAI-compatible API and web UI. The early llama.cpp comparison is striking: for a 11,240-token Qwen3.8 27B prompt, arcinfer’s OpenCL engine took 97 seconds, versus 590 seconds on llama.cpp Vulkan and 504 seconds on SYCL—about 6.1× and 5.2× faster. At 33,937 tokens, it took about 5.5 minutes versus 40 minutes on Vulkan (7.4× faster). Qwen3.5 4B prefill reached 911 tok/s versus 242 on Vulkan and 337 on SYCL. These are historical OpenCL-engine measurements on this laptop, not universal guarantees; arcinferzero is now the default, and the repo links to newer results.
Some things it supports:
· Qwen and Gemma GGUF models, including larger models that are a tight fit for shared GPU memory
· An optional Level Zero engine that streams MoE expert weights from SSD
· Speculative decoding, image input for supported models, and Gemma 4 audio input
· OpenAI-, Anthropic-, and Ollama-compatible API endpoints
· Integration with the Pi coding agent
It’s an experimental, hardware-specific project—not a general replacement for llama.cpp, and it currently targets Windows and Intel Xe-LPG graphics. Alongside the code, I share what has and hasn’t worked when building and tuning inference for this generation of Intel Arc integrated graphics, including implementation lessons and benchmark results. The repo has setup instructions, supported models, and more details.
Repo: https://github.com/rizagp/arcinfer
If you have a Meteor Lake/Core Ultra laptop, I’d especially appreciate feedback on setup, compatibility, and what models you’re able to run. Also happy to answer questions about the GPU kernels or how the project compares with other options.
1
u/Zestyclose-Plantain6 Oct 21 '26
This tool is sporting some phenomenal decode speeds, perfect for agentic work
I had to modify it to work on my Intel core ultra x7 358h with integrated Arc B390 iGPU
Looking forward to where this is going.
1
u/Strict-Elevator9352 Oct 21 '26
how fast prompt processing speed and token generation speed in your machine? I am still doing correction to make Gemma4 series output to be accurate. Qwen series already at the peak. You can get way more prompt processing speed if you have high end PCIe gen 5 SSD for MoE models.
1
u/Possible_Ingenuity69 13d ago
Tested inferzero 2026.11.10.5 on Panther Lake, worked out of the box (no modifications needed).
HW: HP OmniBook 7 14, Core Ultra X7 358H, Arc B390 (Xe3), 32 GB LPDDR5X-8533 dual-channel,
GPU driver 32.0.101.9150, Windows 11 Pro.
Startup log: 16-lane kernels (no 8-lane sub-groups), XMX check DP4a 6.5 ms vs XMX 4.0 ms -> XMX on.
Model: NousResearch Arete-27B (Qwen3.8-27B fine-tune), bartowski Q3_K_M, ctx 16K, thinking off, temp 0.
Same GGUF in both engines, 2 runs each:
| | prefill ~670 tok | prefill ~10.2K tok (TTFT) | decode |
|---|---|---|---|
| llama.cpp Vulkan b12125 | 124 tok/s | 170 tok/s (60 s) | 6.1-7.3 tok/s |
| inferzero (Level Zero) | 195 tok/s | 245-255 tok/s (40 s) | 7.4-7.7 tok/s |
So ~1.5x faster prefill and ~15-20% faster decode on Xe3. Smaller gap than on Meteor Lake,
because llama.cpp Vulkan is already much faster on the B390 than on the 125H.
Load: 14.4 GiB GPU memory, 50 s first start (kernel build), 24 s after.
Notes:
- --mtp does nothing with this GGUF: it has no MTP tensors (Nous disabled the MTP head in training).
- The server seems to ignore "cache_prompt": false (a repeated prompt came back cached in 0.2 s),
so for benchmarks I put a random id at the start of the system prompt.
- It auto-attached an unrelated mmproj-*.gguf from the same folder; --no-mmproj fixes that.
Nice work, thanks!
1
u/Strict-Elevator9352 13d ago
Thank you for testing it on a B390, that is the first Xe3 report with numbers, and good to see the XMX check pick XMX there.
Both things you noticed are fixed in 2026.11.11.1:
"cache_prompt": falsewas ignored: it now evaluates the whole prompt, as in llama.cpp (a repeated 376-token prompt: 376 evaluated with it, 371 cached without).The projector: in a folder of several models, the server took the folder's first
mmproj*.gguffor any model. Now a model takes only one named after it (mmproj-<model name>-f16.gguf); a Hugging Face snapshot folder or a folder with one model work as before, and--mmproj FILEtakes any. The log says when it skipped others.On MTP: right, Arete has no MTP tensors, so
--mtphas nothing to use there.1
u/Possible_Ingenuity69 4d ago
Re-tested on the B390 with the new driver and inferzero 2026.11.20.02. Thanks for the quick fixes!
HW: HP OmniBook 7 14, Core Ultra X7 358H, Arc B390 (Xe3), 32 GB LPDDR5X-8533 dual-channel,
GPU driver 32.0.101.9175 (was 9150), Windows 11 Pro. inferzero reports a 16.4 GiB GPU share.
Startup log: 16-lane kernels, XMX check DP4a 6.4 ms vs XMX 3.8 ms -> XMX on, H8 GEMMs on XMX,
prompt attention as flash attention on XMX (attn_fx). Compared with llama.cpp Vulkan b12556.
Both fixes confirmed:
- "cache_prompt": false is respected now: the same 645-token prompt twice gives the same TTFT (3.05 / 2.96 s).
- mmproj: "vision: 2 projector file(s) next to the model, none named after it" -> no foreign projector.
NousResearch Arete-27B (dense Qwen3.8-27B fine-tune), bartowski Q3_K_M, ctx 16K, thinking off, temp 0:
| | prefill ~670 tok | prefill 10.2K (TTFT) | decode code / text / after 10K |
|---|---|---|---|
| llama.cpp b12556 | 228 tok/s | 197 tok/s (52 s) | 7.7 / 7.6 / 6.7 |
| inferzero | 140-220 tok/s | 659 tok/s (15.5 s) | 7.8 / 7.8 / 7.6 |
| llama.cpp + DFlash2 (z-lab GGUF) | 215 tok/s | 191 tok/s (54 s) | 23 / 14.2 / 7.8 |
| inferzero + DFlash2 (z-lab) | 197 tok/s | 652 tok/s (15.7 s) | 36 / 17.7 / 11.9 |
The long-prompt path (H8 + XMX attention) is the big win: 3.3x llama.cpp and 2.6x what 2026.11.10.5 did on this
laptop (250 tok/s). llama.cpp also got faster since my first test (short prefill 124 -> 228, decode 7.3 -> 7.7),
so plain decode is now a tie (memory-bound). With DFlash2, inferzero decodes ~1.5x faster on code.
2) Qwen3.6-27B-A3B CoderX IQ4_NL (pruned 35B-A3B, 184 experts, native MTP head), ctx 32K, thinking off:
| | prefill 10.2K (TTFT) | decode code / text / after 10K |
|---|---|---|
| llama.cpp b12556, MTP n=3 | 601 tok/s (17 s) | 59 / 37.5 / 30.7 |
| inferzero --mtp | 1070 tok/s (9.6 s) | 59-66 / 39 / 43.9 |
| inferzero + DFlash2 (incoai 35B-A3B drafter) | 1084 tok/s (9.5 s) | 82-102 / 36-40 / 33.3 |
At temp 0 the code answer was identical to llama.cpp's, character for character.
Two small local patches I needed (happy to share a diff):
- MoE with an expert count that is not a multiple of 16: engine_setup.h only accepts 256 (512 for Flash Next),
and moe_route / moe_route1 read NE / 16 logits per lane, so 184 experts would silently drop 8. I round up
(NEV = ceil(NE/16)) and mask ids >= NE to -inf (column NE is the shared-expert gate). For NE % 16 == 0
the kernel source stays the same, and I allowed 16..256 experts.
- --mtp-model for dense qwen35: adopt_mtp_file() only takes qwen4exp. Allowing qwen35 lets Arete (no nextn
tensors) borrow blk.64.nextn from the base Qwen3.8-27B GGUF (15 tensors, 51-76 % of drafts accepted,
decode 14.2 tok/s after a 10K prompt vs 7.6 plain). The fits() check also compares expert_count with
defaults -1 vs -2, which never matches for dense models; I used the same default on both sides.
init() then applies the QSA setup only to a qwen4exp head file.
Run-to-run variance on the iGPU is about 10 %; each config ran on a fresh server with nothing else on the GPU.
1
u/Strict-Elevator9352 4d ago
Thank you, this is a great report. Both fixes confirmed, real numbers against llama.cpp on the same files, and the identical code answer at temp 0 is reassuring.
Your two patches point at real gaps, and I’d love them as pull requests on GitHub (github.com/rizagp/inferzero) so they get proper credit:
expert counts that aren’t a multiple of 16 (your round-up + mask in moe_route): pruned MoE models like the 184-expert CoderX should just work;
--mtp-model for dense Qwen3.5/3.8, so fine-tunes like Arete can borrow the base model’s nextn head, plus the fits() default you found.
The short-prompt side (~670 tokens, 140-220 vs 228 tok/s) is a known weak spot on the iGPUs: short chunks pay for decoding the weights and the H8 setup. It’s on the list. If you can, a
runz <model> --bench-pp 512 --n 0 --proffrom the B390 would help pin it down.1
u/Possible_Ingenuity69 3d ago
Checked on main 82c247e (built locally, B390): Arete-27B with the base Qwen3.8-27B head still loads
with the new checks: "MTP head ... (15 tensors)", 98 / 166 drafts accepted (59 %), the same as on my branch.
CoderX (184 experts) runs too: 63.7 tok/s with its own MTP head, 71.8 % accepted.
Side note: a Qwen3.6-27B head also passes (same heads, head sizes, FFN width and vocabulary as 3.8)
and drafts 57.6 % for Arete, so the check lets through what is actually compatible. Thanks for merging!
1
1
u/Possible_Ingenuity69 3d ago
Thanks again for merging #67 / #68. Some results from the B390 that may be useful (driver 32.0.101.9175, release 2026.11.20.02, nothing else on the GPU): 1) Expert streaming on a model larger than the GPU share: KAT-Coder-V2.5-Dev (Kwaipilot, Qwen3.6-35B-A3B fine-tune, bartowski IQ4_XS 18.8 GB) on a 16.4 GiB share. Expert file 17.1 GB (written in 38 s), cache 73 % at ctx 32K, 67 % with DFlash2, 61 % at ctx 128K. - plain: decode 26-31 tok/s code, 26-35 text; 10K prompt 877 tok/s - DFlash2 (incoai Qwen3.6-35B-A3B drafter on the fine-tune): code 49-54 tok/s (80-86 % of drafts accepted), text 29-38, after 10K 26.5; 10K prompt 1197 tok/s llama.cpp b12556 cannot load it on this laptop: with --n-cpu-moe 10 it logs "ggml_vulkan: Failed to allocate pinned memory" and hangs at 0 % CPU/GPU. So this is a model that only runs here thanks to the SSD tier. 2) Long-context needle test (3 sentences at 10 / 50 / 90 % of English docs, length set exactly with /tokenize), ctx 131072, both models found 3/3 at every size: prompt tokens 15.9K 31.7K 64.4K 128.7K KAT-Coder prefill 1408 1273 1064 773 tok/s (TTFT 167 s at 128K) CoderX (184 exp.) 1125 1031 907 720 tok/s (TTFT 179 s at 128K) Decode after 128K: KAT 20 tok/s, CoderX 27 tok/s. 3) The pruned CoderX runs fine on main: 63.7 tok/s with its own MTP head (71.8 % accepted). 4) Small things: - --think-budget 0 works as "reasoning off" for Qwen3.6 templates. - After the driver update from 9150 to 9175 the reported GPU share dropped from 18.2 to 16.4 GiB (the Intel Graphics Software override seems to reset on driver updates). Maybe worth a line in the docs, as it changes which models fit.1
u/Strict-Elevator9352 3d ago
Driver updates always reset VRAM allocation and Windows Update brings back driver from 2024.
Users may gets confused with this, so I check on driver but for VRAM allocation, it's users' preference whether they want to increase or not
1
u/Strict-Elevator9352 3d ago
Btw, that's a great prefill from B390. It's such a shame the card can't get enough bandwidth, it needs at least 360GB/s to reach it's full potential
1
1
u/Strict-Elevator9352 13d ago
Btw, there are still rooms for improvement for B390, if you want to become tester, I'll be glad to provide support. Hopefully we can push 50% or more prefill.
1
u/mkschreder2 Oct 20 '26
Nice work. Check out brain. It is extremely capable at both training and inference: https://github.com/swedishembedded/brain