Skip to content
skipzx-labPublic
forked from rizagp/inferzero

About

arcinferzero

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

inferzero

Formerly arcinferzero (renamed 2026-11-10): links to the old GitHub address still lead here, and an existing data folder and Pi setup carry over by themselves.

Fast local LLMs on an Intel laptop iGPU. A from-scratch inference engine for Intel integrated GPUs (Xe-LPG / Meteor Lake "Arc Graphics"; Xe2 / Xe3 such as Lunar Lake and Panther Lake's Arc B390 too), written in C++ on Level Zero. It loads GGUF files directly, serves an OpenAI-, Anthropic- and Ollama-compatible API with a web UI (web search and voice conversation included), and plugs into the Pi coding agent with one command. Built and tuned on a Core Ultra 5 125H with 32 GB of RAM: no discrete GPU, no XMX matrix engines.

Download · Features · Usage guide · Install and build · Measured results · Changelog · Contribute

Why it is worth a look

  • Prompts 2.7-7.4x faster than llama.cpp (Vulkan / SYCL) on the same GGUF files and laptop, by building every matrix product on the iGPU's int8 DP4a units: a 34K-token code prompt on Qwen3.8 27B takes 5.5 minutes instead of 40 (Vulkan).
  • Mixture-of-experts models larger than the GPU memory, experts streamed from the SSD into a GPU cache while the GPU computes: Qwen3.6 35B-A3B with a 131K-262K context, Qwen3.8 Flash Next (52 GB of experts) on a 32 GB laptop.
  • Speculative decoding that never changes the answer: the model's MTP block and a DFlash2 block drafter guess up to 7 tokens per step; Python code on the 35B runs at ~50 tok/s, the text identical to plain decoding.
  • Accuracy measured, not assumed: every model is checked against an independent f32 CPU implementation, and perplexity is at or below llama.cpp's on the same files.
  • Deterministic: the same prompt gives the same logits bit for bit, run after run, whatever the expert cache size or engine, and the drafters give exactly the text of plain decoding. Every speed change is held to that.
  • Built for agents and long documents: prompt and session caches (a new message only processes itself), system prompts kept on disk per project, images and audio input, schema-constrained tool calls, model switching from inside Pi, two Pi sessions at once on one model (--slots 2): when both are writing, their next tokens run in one engine pass (27B prose 7.3 -> 10.5 tok/s together, 35B 20.2 -> 24.7, Gemma 4 26B 19.8 -> 26.2).
  • A web UI that searches and talks: the model can search the web and read pages (the server fetches them, public addresses only), and you can talk to it: the microphone stays open (Gemma 4 E4B / 12B hear the audio themselves; with --whisper auto Qwen3-ASR writes it down for any model), it answers aloud sentence by sentence, can be interrupted, and looks things up while it talks. Speech to text also fills the Transcripts menu: audio and video files, recordings, and meetings (your microphone and the meeting's sound, written as Me / Others), each with a summary. From a phone or anywhere it works through a Cloudflare Tunnel with a password, installable as an app (docs/remote-access.md).
  • Long documents read properly: a document the context takes comes whole; a longer one by its outline, page ranges or a search; and for all of it, digest_file has the model read it part by part (sections and functions kept whole) into notes saved with the chat. Answers say which page they come from.
  • OCR of PDFs and images with Xiaomi-OCR-0: a PDF read page by page to its last page, saved to a Markdown file, tables as tables; a chat model reads that file afterwards.
  • Conversations that keep their cache, Gemma 4 too: after a 20K-token tool result a one-line follow-up takes 0.8 s on Gemma 4 E4B, not 38 s.

The whole tour, with how to use each feature: docs/features.md.

Try it

You need:

  • Windows 11 (64-bit) and Intel's graphics driver;
  • an Intel Core Ultra with Arc integrated graphics;
  • 16 GB of RAM for the 4B / E4B models, 32 GB for the 12B-35B ones.

Discrete Arc cards work too, experimentally: the B-series (Xe2: B580, Pro B60, Pro B70) and the A-series (Alchemist: A770, A750, A580). A user runs 1-4 Arc Pro B60s, another two A770s, and one model can be split over several cards (--gpus N). See Discrete GPUs.

Linux (Ubuntu 24.04 or newer): download inferzero-<version>-linux-x64.tar.gz from the same release, unpack it, and run ./zero-launcher.sh (a terminal menu that downloads a model and starts the headless server). It needs Intel's GPU runtime and nothing else (bash, curl): docs/install.md. A Dockerfile, a compose.yaml (run on Unraid with an Arc B580) and a Kubernetes file (not tested yet) are in docker/.

On Windows:

  1. Download inferzero-<version>-win64.zip (9 MB) from the latest release and unpack it anywhere.
  2. Double-click zero-launcher.cmd (Windows may ask once: "More info", "Run anyway"). Packages released before the rename (up to 2026.11.10.3) are named arcinferzero-<version>-win64.zip and start with arc-launcher.cmd.
  3. Pick a model (the one that suits the laptop's RAM is ticked) and "Download and start": the web UI opens at http://127.0.0.1:8090/.

No compiler and no Python needed. From the sources: install Visual Studio Build Tools (C++), then .\setup.cmd builds everything, downloads the models you pick and connects the Pi coding agent (docs/install.md). Day-to-day use, the web UI, Pi and the server's options: USAGE.md.

Results at a glance

On the laptop (Core Ultra 5 125H, 32 GB, Windows 11; bench/website_bench.ps1, 2026-11-09, the 27B's 131K row and Gemma's KL again on 2026-11-10). Prompt in tok/s with the wait for the first token; generation in tok/s for 256 tokens, plain and with the model's drafters; KL on 480 tokens of USAGE.md:

Model 8K prompt 32K prompt 131K prompt Generation With drafting KL vs f32
Qwen3.6 35B-A3B (MoE, experts on the SSD) 851, 9.6 s 637, 51 s 324, 6.7 min 21.6 38.1 (MTP + DFlash2) 0.0040
Qwen3.8 Flash Next (MoE, 52 GB of experts on the SSD) 205, 40 s 174, 3.1 min 146, 15 min 6.3 7.6 (DFlash2) 0.0117
Qwen3.8 27B (dense) 135, 61 s 125, 4.4 min 81, 27 min 5.1 12.9 (MTP + DFlash2) 0.0005
Gemma 4 26B-A4B (MoE) 232, 35 s 124, 4.4 min 44, 50 min 19.8 – 0.0048
Qwen3.5 9B 487, 17 s 435, 75 s 278, 7.8 min 11.8 21.6 (MTP) 0.0014
Gemma 4 E4B 707, 12 s 494, 66 s 222, 9.8 min 19.1 41.8 (drafter) 0.0027
Qwen3.5 4B 896, 9.2 s 705, 47 s 366, 6.0 min 21.0 35.8 (MTP) 0.0010

Flash Next's precise mode (-Precise) lowers its KL on prose to 0.0060 (3,584 tokens, 0.0105 by default) at about half the prompt speed. The discrete cards' numbers: Discrete GPUs.

Against llama.cpp on the same files and laptop (2026-10-25):

vs llama.cpp (same file, same laptop) inferzero llama.cpp Vulkan llama.cpp SYCL
Qwen3.5 4B, 2K prompt 911 tok/s 242 337
Qwen3.8 27B, 2K prompt 113 tok/s 23 25
Qwen3.8 27B, 34K code prompt to first token 327 s 2,418 s 1,624 s
Qwen3.8 27B, generation after that prompt 3.7 tok/s 2.1 1.1
Perplexity, Qwen3.5 4B / 9B / 27B (lower is better) 6.056 / 5.417 / 4.274 6.141 / 5.499 / 4.311 6.138 / 5.497 / 4.310

On a Core Ultra 5 125H with 32 GB of RAM. KL is the divergence of the next-token distributions from an independent f32 reference (0 = identical; every model and change is held under 0.015). How each number was measured, and every change with its before and after: docs/before-after.md; notes on these rows: docs/models.md.

Supported models

Family Models Input Drafts tokens with
Qwen3.5 / 3.6 / 3.8 0.8B-27B dense, 35B-A3B MoE, Flash Next (512 experts; also with Intel's AutoRound INT4 experts, setup -Models flash-ar4) text, images (mmproj) MTP block, DFlash2
DeepSeek-V4.1 Flash (384 experts: ISTA's GSQ-RCO IQ2_XS, Unsloth's UD-Q8_K_XL), one GPU or several text
Gemma 4 E4B, 12B, 26B-A4B MoE, 31B (Google's QAT Q4_0) text, images, audio Gemma 4 assistant drafters
OCR Xiaomi-OCR-0 images, PDFs
Speech to text Qwen3-ASR, Whisper large-v3 audio, video

GGUF files as they are (IQ1-IQ4, Q2_K-Q8_0, Q5_1, MXFP4; F16 / BF16 matrices taken as Q8_0 at load, but a MoE model's experts in quantized types only: a BF16 MoE GGUF is refused before its expert file is written); the architectures, weight types and each model's details: docs/models.md.

The engine

inferzero (zero/, bin\serverz.exe, bin\runz.exe) runs OpenCL-compiled kernels through Level Zero. It streams mixture-of-experts weights from the SSD (only the experts in use stay in GPU memory; the next layer's missing experts are read while the GPU computes the current one), and drafts with the MTP block, a DFlash2 drafter or both. The automatic context gives the 35B and Flash Next 131,072 tokens, Gemma 4 26B 90K-131K. On GPUs without 8-lane sub-groups (Xe2 / Xe3) it builds its 8-lane kernels with 16 lanes, and where the GPU has XMX matrix engines the prompt GEMMs run on them after a start-up check against the DP4a kernels. A dense model that nearly fills a discrete card's memory keeps part of its weights in RAM, read over PCIe (ARC_HOST_KEEP_GB sets the room kept on the card): an Arc B580 12 GB runs Qwen3.8 27B that way.

Discrete Arc GPUs (experimental)

Arc B-series cards (Xe2: B580, Pro B60, Pro B70) and A-series cards (Alchemist: A770, A750, A580) run the same engine, with switches of their own in zero/xe2/ that the laptop's iGPU never takes; Alchemist cards take the Arc 140T's preset (H8 on the 8-lane XMX GEMM). Measured by users (Qwen3.8 27B GSQ-RCO IQ3_S unless named):

  • One Pro B60 (issue #4): 4K prompt 1,726 tok/s (release 2026.11.17.08; 1,522 on 2026.11.14.09, 1,322 before the weight prefetch), generation 22.7-23.3 tok/s (two runs, 2026.11.14.09), 51.6 with MTP (2026.11.13.11). Qwen3.6 35B-A3B: 4K prompt 3,536 tok/s (2026.11.14.09), generation 82.4 tok/s, 111.9 with MTP (2026.11.13.11). What each switch measured there: docs/xe2-tuning.md.
  • One Pro B70 on native Linux (issue #27, joshdev-de, Fedora 45): 4K prompt 2,972 tok/s (main 7368768 with ARC_H8_NORM, the default on discrete cards since 2026-11-18; 2,897 with the 2D GEMM and its prefetch alone), 8K 2,727 (2026.11.16.12), generation 35.2 tok/s, 70.6 with MTP (2026.11.16.02). Qwen3.6 35B-A3B: 8K prompt 5,647 tok/s (2026.11.17.04), 4K 5,177, 16K 5,445, generation 95-98 tok/s (2026.11.16.15). Flash Next, 46 % of its experts in the card's 32 GB: 4K prompt 1,414 (2026.11.17.04), 16K 1,145, generation 38.6 tok/s once the expert cache holds what the text uses (6.6 from a cold cache). Another B70 under Windows (issue #12, release 2026.11.13.06, before the weight prefetch; a rerun is asked for): 2,105 tok/s, generation 32.2, 75.2 with MTP.
  • One Arc B580 12 GB on Linux in a PCIe 3.0 slot (issue #37, d-dorok, commit 7703141, 4K prompts): Qwen3.5 4B 7,915 tok/s, generation 92.6; Qwen3.5 9B 5,341, 56.5; Qwen3.6 35B-A3B 2,469, 84.7. The 27B does not fit beside its buffers, so part of its weights stays in RAM: 1,783 tok/s and 3.53 tok/s generation by default (1.02 GiB in RAM, commit 438dfc4); with ARC_HOST_KEEP_GB=0.75 (0.49 GiB in RAM) 1,877 and 7.08, the setting to use on that card.
  • One Arc A770 16 GB under Windows (issue #35, issue #36): 4K prompt 1,223 tok/s (release 2026.11.17.08 with ARC_GEMM_SPLIT=17, the default on Alchemist since 2026.11.18.02), generation 21.6-22.7 tok/s, 30.1-31.3 with MTP, with ARC_BATCH=64, the default on Alchemist on Windows since 2026.11.18.08 (12.6-12.8 without). Qwen3.5 4B: 4K prompt 4,821 tok/s through the preset (2026.11.18.02, the default since 2026.11.18.03), generation 37.8-38.2; Qwen3.5 9B: 2,969-3,017 (2026.11.17.08).
  • Arc 140T (the Core Ultra 9 285H's iGPU, issue #5): 4K prompt 405 tok/s (release 2026.11.18.07, its defaults; 390 on 2026.11.17.07 with ARC_GEMM_XW_WGX=2, 357 on 2026.11.15.11), generation 6.1 tok/s, 14.6 with MTP (at its memory's limit).
  • Arc B390 (Panther Lake's Core Ultra X7 358H, Xe3, issue #1): 4K prompt 634-637 tok/s (release 2026.11.18.06) with H8 on the wide-tile XMX GEMM (the default for iGPUs with 16-lane XMX since 2026.11.17.01) and 16 GB of decoded weights kept resident (the default with a 64+ GiB GPU share since 2026.11.17.02; 546-560 without) (258-268 on the plain XMX path before; KL 0.0018 between the two), generation 5.9 tok/s, 16.8 with MTP. Qwen3.6 35B-A3B: 4K prompt 1,370 tok/s, generation 26 tok/s, 46 with MTP.
  • One model over several GPUs (runz / serverz --gpus N, tensor parallel):
    • 4 Pro B60s on Windows (issue #4; no peer access there, so the sums go through host memory): the 27B's 4K prompt 1,597 / 1,724 / 1,888 tok/s over 2 / 3 / 4 cards (2026.11.13.05 and .11, before the weight prefetch), generation 35.7 / 43 / 53 tok/s (run of 2026-10-31). Long prompts over 4 (2026.11.14.05, the middle of three passes): 64K / 131K / 262K tokens at 2,152 / 1,267 / 700 tok/s (the 35B), 1,258 / 970 / 640 (the 27B) and 948 / 778 / 526 (Flash Next); after 131K the 27B generates 32 tok/s. The 35B's 4K prompt over 4: 4,264 tok/s (2026-11-02).
    • 2 Pro B60s on Linux (scenic6942, issue #17, PCIe 4.0 x8 each): the sums go straight from GPU to GPU (ARC_TP_P2P, chosen at load since 2026.11.14.06): 4K prompt 1,630 tok/s against 1,442 through host memory, generation 37.8 tok/s, the same logits.
    • DeepSeek-V4.1-Flash over 4 Pro B60s with 1 TB of RAM (issue #4, release 2026.11.14.09): ISTA's IQ2_XS generates 10.3 / 18.0 / 16.6 / 17.6 tok/s on 1 / 2 / 3 / 4 cards, its 512-token prompt 171 / 227 tok/s over 3 / 4; Unsloth's UD-Q8_K_XL 109 / 7.6 over 3 (docs/multi-gpu.md). Over 4 with 32 GiB of its experts per card kept in RAM (the default since 2026.11.16.16): 512-token prompt 24.0 tok/s, generation 9.25 (3.55 without).
    • 2 Arc A770s on Windows (hansong80, issue #35, release 2026.11.18.02, no peer access): the 27B's 4K prompt 1,126 tok/s against one card's 1,169, generation 12.2 against 12.6-12.8: the 128 sums a token waited 73.5 ms of 81, a host round trip each. ARC_TP_EVSUM=1 (opt-in since 2026.11.18.05) lets the GPUs meet on events instead; not measured on two cards yet.
    • A slow link sets the pace: with one card in an x4 slot at 2.4 GB/s (issue #19, the 27B UD-Q5_K_XL) the prompt over 2 cards is half of one card's (620 against 1,223 tok/s). A layer split for such links is planned, not built.
    • Batched slots work over a split model.
    • A GPU that hangs makes the request fail and /health answer 503; the server itself stays up.
    • A model that cannot be split loads on one GPU.

Not built yet: MTP / DFlash2 drafting on a split model (off there).

How to measure on such a card, and every switch: docs/xe2-tuning.md. The split model and its failsafes: docs/multi-gpu.md. The plan: QUEUE.md, F31.

Documentation

docs/features.md the best features: what each is for, how to use it, what it measured
USAGE.md step by step: the launcher, the web UI, Pi, the server's options, troubleshooting
docs/install.md the package, building from source, downloading models, checking the install
docs/server.md running the server by hand (its API, caches, options), Pi, the runz CLI
docs/models.md supported architectures and weight types, notes on the results
docs/architecture.md how it works, the source layout, how it is validated
docs/before-after.md every speed and accuracy change with its numbers
docs/lessons-intel-arc-igpu.md what made LLM inference fast on this iGPU, and what did not
docs/review.md, docs/speed-progress.md results, the story of the build, speed by date
docs/npu-experiment.md, docs/multi-gpu.md the NPU next to the GPU; one model over several GPUs
docs/xe2-tuning.md discrete Arc B-series cards: what was measured, the switches, the scripts to run
docs/qwen3-asr.md, docs/whisper-native.md speech to text, transcripts and meetings
CHANGELOG.md, QUEUE.md what changed recently; open work and decisions
CONTRIBUTING.md where the speed is still missing, how to measure your card, how to send code

License

inferzero is licensed under the Apache License 2.0.

IQ codebook tables and Unicode category tables are generated from ggml / llama.cpp sources (MIT License). third_party/ contains minja (MIT) and nlohmann/json (MIT).

inferzero is an independent project, not made or endorsed by Intel. Intel, the Intel logo and Arc are trademarks of Intel Corporation or its subsidiaries.

About

arcinferzero

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages