ollama/llama/llama_metal.go
Michael Yang 1b7183c5a1 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
2023-07-06 16:34:44 -04:00

5 lines
125 B
Go

//go:build metal
package llama
//go:generate cmake -S . -B build --fresh -DLLAMA_METAL=on
//go:generate cmake --build build