feat: add support for cublas/openblas in the llama.cpp backend (#258)

This commit is contained in:
Ettore Di Giacinto 2023-05-16 16:26:25 +02:00 committed by GitHub
parent a035de2fdd
commit acd03d15f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 31 deletions

View file

@ -31,6 +31,10 @@ func defaultLLamaOpts(c Config) []llama.ModelOption {
llamaOpts = append(llamaOpts, llama.EnableEmbeddings)
}
if c.NGPULayers != 0 {
llamaOpts = append(llamaOpts, llama.SetGPULayers(c.NGPULayers))
}
return llamaOpts
}