From c6a51289b092d6aaf17a95a3799d550ab0416fac Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Sun, 15 Mar 2026 21:06:35 +0100 Subject: [PATCH] fix: Automatically disable mmap for Intel SYCL backends (#9012) (#9015) * fix: Automatically disable mmap for Intel SYCL backends Fixes issue #9012 where Qwen3.5 models fail to load on Intel Arc GPU with RPC EOF error. The Intel SYCL backend has a known issue where mmap enabled causes the backend to hang. This change automatically disables mmap when detecting Intel or SYCL backends. References: - https://github.com/mudler/LocalAI/issues/9012 - Documentation mentions: SYCL hangs when mmap: true is set * feat: Add logging for mmap auto-disable on Intel SYCL backends As requested in PR review, add xlog.Info call to log when mmap is automatically disabled for Intel SYCL backends. This helps with debugging and confirms the auto-disable logic is working. --------- Co-authored-by: localai-bot --- core/backend/options.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/backend/options.go b/core/backend/options.go index 3268c9287..85c67f60d 100644 --- a/core/backend/options.go +++ b/core/backend/options.go @@ -1,6 +1,7 @@ package backend import ( + "strings" "math/rand" "os" "path/filepath" @@ -109,6 +110,16 @@ func grpcModelOpts(c config.ModelConfig, modelPath string) *pb.ModelOptions { mmap = *c.MMap } + // Intel SYCL backend has issues with mmap enabled + // See: https://github.com/mudler/LocalAI/issues/9012 + // Automatically disable mmap for Intel SYCL backends + if c.Backend != "" { + if strings.Contains(strings.ToLower(c.Backend), "intel") || strings.Contains(strings.ToLower(c.Backend), "sycl") { + mmap = false + xlog.Info("Auto-disabling mmap for Intel SYCL backend", "backend", c.Backend) + } + } + ctxSize := 4096 if c.ContextSize != nil { ctxSize = *c.ContextSize