This commit is contained in:
Josh Yan 2024-07-09 17:04:33 -07:00
parent 26ed829415
commit 369113970a
2 changed files with 2 additions and 11 deletions

View File

@ -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",

View File

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