Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
llm: prevent loading too large models on windows (#5926)
Daniel Hiltgen25906d72d148
diff --git a/llm/server.go b/llm/server.goindex 41736068c..0bd94f355 100644--- a/llm/server.go+++ b/llm/server.go@@ -125,8 +125,9 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr}}- // On linux, over-allocating CPU memory will almost always result in an error- if runtime.GOOS == "linux" {+ // On linux and windows, over-allocating CPU memory will almost always result in an error+ // Darwin has fully dynamic swap so has no direct concept of free swap space+ if runtime.GOOS != "darwin" {systemMemoryRequired := estimate.TotalSize - estimate.VRAMSizeavailable := systemFreeMemory + systemSwapFreeMemoryif systemMemoryRequired > available {