Josh Yan 9 months ago
parent
commit
369113970a
2 changed files with 2 additions and 11 deletions
  1. 1 0
      llm/llm.go
  2. 1 11
      server/images.go

+ 1 - 0
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",

+ 1 - 11
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 {