This commit is contained in:
jmorganca 2024-06-13 14:21:55 -07:00
parent 76ca2de06e
commit 1da6c40f4f
2 changed files with 5 additions and 2 deletions

View File

@ -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])
}

View File

@ -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)