Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
scale graph based on gpu count
Michael Yang26df67478590
diff --git a/gpu/gpu_darwin.go b/gpu/gpu_darwin.goindex 39e257e4d..bf764ce66 100644--- a/gpu/gpu_darwin.go+++ b/gpu/gpu_darwin.go@@ -55,6 +55,6 @@ func getCPUMem() (memInfo, error) {return memInfo{TotalMemory: uint64(C.getPhysicalMemory()),FreeMemory: 0,- DeviceCount: 0,+ DeviceCount: 1,}, nil}diff --git a/llm/server.go b/llm/server.goindex 0bbdebce3..4e8080851 100644--- a/llm/server.go+++ b/llm/server.go@@ -79,6 +79,9 @@ func NewLlamaServer(model string, adapters, projectors []string, opts api.OptiongraphFullOffload = graphPartialOffload}+ graphFullOffload *= uint64(info.DeviceCount)+ graphPartialOffload *= uint64(info.DeviceCount)+// memoryRequiredTotal represents the memory required for full GPU offloading (all layers)memoryRequiredTotal := memoryMinimum + graphFullOffload