forked from third-party-mirrors/ollama
lint
This commit is contained in:
parent
76ca2de06e
commit
1da6c40f4f
@ -302,7 +302,7 @@ func (m *Model) Tokenize(text string, addSpecial bool, parseSpecial bool) ([]int
|
||||
}
|
||||
|
||||
tokens := make([]int, result)
|
||||
for i := 0; i < int(result); i++ {
|
||||
for i := range result {
|
||||
tokens[i] = int(cTokens[i])
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,10 @@ func main() {
|
||||
server.model = llama.LoadModelFromFile(*mpath, params)
|
||||
|
||||
if *lpath != "" {
|
||||
server.model.ApplyLoraFromFile(*lpath, 1.0, "", *threads)
|
||||
err := server.model.ApplyLoraFromFile(*lpath, 1.0, "", *threads)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
ctxParams := llama.NewContextParams(*numCtx, *threads, *flashAttention)
|
||||
|
Loading…
x
Reference in New Issue
Block a user