Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
runner: simplify tensor split parsing
Michael Yangd6af13efedb5
diff --git a/runner/llamarunner/runner.go b/runner/llamarunner/runner.goindex f9d204015..1afc793ef 100644--- a/runner/llamarunner/runner.go+++ b/runner/llamarunner/runner.go@@ -943,12 +943,11 @@ func Execute(args []string) error {var tensorSplitFloats []float32if *tensorSplit != "" {- stringFloats := regexp.MustCompile(",").Split(*tensorSplit, -1)-- tensorSplitFloats = make([]float32, 0, len(stringFloats))- for _, s := range stringFloats {+ splits := strings.Split(*tensorSplit, ",")+ tensorSplitFloats = make([]float32, len(splits))+ for i, s := range splits {f, _ := strconv.ParseFloat(s, 32)- tensorSplitFloats = append(tensorSplitFloats, float32(f))+ tensorSplitFloats[i] = float32(f)}}diff --git a/runner/ollamarunner/runner.go b/runner/ollamarunner/runner.goindex d39981204..b39d747f8 100644--- a/runner/ollamarunner/runner.go+++ b/runner/ollamarunner/runner.go@@ -881,12 +881,11 @@ func Execute(args []string) error {var tensorSplitFloats []float32if *tensorSplit != "" {- stringFloats := regexp.MustCompile(",").Split(*tensorSplit, -1)-- tensorSplitFloats = make([]float32, 0, len(stringFloats))- for _, s := range stringFloats {+ splits := strings.Split(*tensorSplit, ",")+ tensorSplitFloats = make([]float32, len(splits))+ for i, s := range splits {f, _ := strconv.ParseFloat(s, 32)- tensorSplitFloats = append(tensorSplitFloats, float32(f))+ tensorSplitFloats[i] = float32(f)}}