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