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)),
|
Status: fmt.Sprintf("quantizing model %d%%", int(progress*100)),
|
||||||
Quantize: "quant",
|
Quantize: "quant",
|
||||||
})
|
})
|
||||||
|
fmt.Println("Progress: ", progress)
|
||||||
case <-done:
|
case <-done:
|
||||||
fn(api.ProgressResponse{
|
fn(api.ProgressResponse{
|
||||||
Status: "quantizing model",
|
Status: "quantizing model",
|
||||||
|
@ -423,11 +423,6 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fn(api.ProgressResponse{
|
|
||||||
Status: "quantizing model",
|
|
||||||
Quantize: "quant",
|
|
||||||
})
|
|
||||||
|
|
||||||
ft := baseLayer.GGML.KV().FileType()
|
ft := baseLayer.GGML.KV().FileType()
|
||||||
if !slices.Contains([]string{"F16", "F32"}, ft.String()) {
|
if !slices.Contains([]string{"F16", "F32"}, ft.String()) {
|
||||||
return errors.New("quantization is only supported for F16 and F32 models")
|
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.Layer = layer
|
||||||
baseLayer.GGML = ggml
|
baseLayer.GGML = ggml
|
||||||
}
|
}
|
||||||
|
|
||||||
fn(api.ProgressResponse{
|
|
||||||
Status: "quantizing model done",
|
|
||||||
Quantize: quantization,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if baseLayer.GGML != nil {
|
if baseLayer.GGML != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user