From cc17b02b23eb65b01e8bb82e20dc407edeff0a4b Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Wed, 28 Aug 2024 09:58:23 -0700 Subject: [PATCH] update --- .gitattributes | 1 + llm/llm.go | 1 + server/images.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index f1c8bcb4..af2a9cc5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ llm/ext_server/* linguist-vendored +llm/*.h linguist-vendored * text=auto *.go text eol=lf diff --git a/llm/llm.go b/llm/llm.go index 9a05ebea..4e2926e5 100644 --- a/llm/llm.go +++ b/llm/llm.go @@ -20,6 +20,7 @@ package llm import "C" import ( + "errors" "fmt" "sync/atomic" "time" diff --git a/server/images.go b/server/images.go index eff2a311..6266a788 100644 --- a/server/images.go +++ b/server/images.go @@ -435,7 +435,7 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio return err } - tensorCount := len(baseLayer.GGML.Tensors()) + tensorCount := len(baseLayer.GGML.Tensors().Items) ft := baseLayer.GGML.KV().FileType() if !slices.Contains([]string{"F16", "F32"}, ft.String()) { return errors.New("quantization is only supported for F16 and F32 models")