mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-18 11:47:07 +00:00
subprocess improvements (#524)
* subprocess improvements - increase start-up timeout - when runner fails to start fail rather than timing out - try runners in order rather than choosing 1 runner - embed metal runner in metal dir rather than gpu - refactor logging and error messages * Update llama.go * Update llama.go * simplify by using glob
This commit is contained in:
10
llm/gguf.go
10
llm/gguf.go
@@ -370,14 +370,14 @@ func (llm *ggufModel) readArray(r io.Reader) (arr []any, err error) {
|
||||
}
|
||||
|
||||
var (
|
||||
ggufInit sync.Once
|
||||
ggufRunnerPath string
|
||||
ggufInit sync.Once
|
||||
ggufRunners []ModelRunner // a slice of ModelRunners ordered by priority
|
||||
)
|
||||
|
||||
func ggufRunner() ModelRunner {
|
||||
func ggufRunner() []ModelRunner {
|
||||
ggufInit.Do(func() {
|
||||
ggufRunnerPath = chooseRunner("gguf")
|
||||
ggufRunners = chooseRunners("gguf")
|
||||
})
|
||||
|
||||
return ModelRunner{Path: ggufRunnerPath}
|
||||
return ggufRunners
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user