From 369113970a39b5f5dea3dc9ba611af97fde0e3f4 Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Tue, 9 Jul 2024 17:04:33 -0700 Subject: [PATCH] wooh --- llm/llm.go | 1 + server/images.go | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/llm/llm.go b/llm/llm.go index 064ea209f..3e44a28b6 100644 --- a/llm/llm.go +++ b/llm/llm.go @@ -63,6 +63,7 @@ func Quantize(infile, outfile string, ftype fileType, fn func(resp api.ProgressR Status: fmt.Sprintf("quantizing model %d%%", int(progress*100)), Quantize: "quant", }) + fmt.Println("Progress: ", progress) case <-done: fn(api.ProgressResponse{ Status: "quantizing model", diff --git a/server/images.go b/server/images.go index a050e78fb..4accb464c 100644 --- a/server/images.go +++ b/server/images.go @@ -422,12 +422,7 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio if err != nil { return err } - - fn(api.ProgressResponse{ - Status: "quantizing model", - Quantize: "quant", - }) - + 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") @@ -467,11 +462,6 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio baseLayer.Layer = layer baseLayer.GGML = ggml } - - fn(api.ProgressResponse{ - Status: "quantizing model done", - Quantize: quantization, - }) } if baseLayer.GGML != nil {