enable metal gpu acceleration

ggml-metal.metal must be in the same directory as the ollama binary
otherwise llama.cpp will not be able to find it and load it.

1. go generate llama/llama_metal.go
2. go build .
3. ./ollama serve
This commit is contained in:
Michael Yang
2023-07-05 17:45:11 -07:00
committed by Jeffrey Morgan
parent b9fb988112
commit 1b7183c5a1
3 changed files with 15 additions and 15 deletions

5
llama/llama_metal.go Normal file
View File

@@ -0,0 +1,5 @@
//go:build metal
package llama
//go:generate cmake -S . -B build --fresh -DLLAMA_METAL=on
//go:generate cmake --build build