mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 08:17:03 +00:00
remove tmp directories created by previous servers (#559)
* remove tmp directories created by previous servers * clean up on server stop * Update routes.go * Update server/routes.go Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com> * create top-level temp ollama dir * check file exists before creating --------- Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com> Co-authored-by: Michael Yang <mxyng@pm.me>
This commit is contained in:
13
llm/ggml.go
13
llm/ggml.go
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"io"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type GGML struct {
|
||||
@@ -165,18 +164,6 @@ func (c *containerLORA) Decode(r io.Reader) (model, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var (
|
||||
ggmlInit sync.Once
|
||||
ggmlRunners []ModelRunner // a slice of ModelRunners ordered by priority
|
||||
)
|
||||
|
||||
func ggmlRunner() []ModelRunner {
|
||||
ggmlInit.Do(func() {
|
||||
ggmlRunners = chooseRunners("ggml")
|
||||
})
|
||||
return ggmlRunners
|
||||
}
|
||||
|
||||
const (
|
||||
// Magic constant for `ggml` files (unversioned).
|
||||
FILE_MAGIC_GGML = 0x67676d6c
|
||||
|
||||
Reference in New Issue
Block a user