wooh
This commit is contained in:
parent
26ed829415
commit
369113970a
@ -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",
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user