Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Intel oneAPI SYCL backend for Intel Arc/iGPU
Summary
ollama-sycl/build that compiles Ollama'sggml-syclbackend from source using Intel oneAPI (DPC++/icpx), enabling SYCL-accelerated GPU inference on Intel Arc and Intel Core Ultra iGPUs via Level Zero.libggml-sycl.soagainst Intel oneAPI and bundles the required runtime libs (oneMKL, TBB, Unified Runtime, Level Zero); stage 2 installs the officialollamabinary and drops the compiled SYCL runner into place, keeping the final image lean by stripping CUDA/MLX/Vulkan runners.patch-sycl.pyscript surgically patches API differences between upstreamggml-sycl(pinned llama.cpp commit) and Ollama's modified ggml backend (batch_sizeparameter), allowing a newer SYCL implementation to be swapped in without forking Ollama itself.docker-compose.ollama-sycl.ymlwithONEAPI_DEVICE_SELECTOR=level_zero:0, persistent SYCL kernel cache volume, and pre-configured Open WebUI integration..env.exampledocumenting all tunable Ollama environment variables (context length, VRAM cap, parallel slots, flash attention, etc.).Motivation
The Vulkan backend on Intel Arc has no native fp16 compute support (requires
GGML_VK_DISABLE_F16=1) and is limited to ~12–13 tok/s on llama3.2:3B. The SYCL/oneAPI path uses Intel's native GPU compiler and oneMKL BLAS, providing a more capable and performant backend for Intel iGPU hardware.Known limitation: hybrid recurrent architectures
The ggml-sycl backend only implements standard transformer ops. Models with hybrid recurrent+attention architectures (e.g. Qwen3.5 "qwen3next" layers) have ops that are not yet implemented in ggml-sycl, causing them to fall back to CPU execution. Each unsupported op creates a CPU↔GPU boundary crossing, and since these layers appear every few blocks, performance degrades severely:
This backend is best suited for pure transformer models (Llama, Mistral, Qwen2, Gemma, etc.). Hybrid recurrent models are currently better served by a CPU-only or Vulkan run. This is an upstream ggml-sycl gap, not a setup issue.
Kudos
Thanks to @eSlider for the contribution