fix quantize file types

This commit is contained in:
Michael Yang 2024-05-17 11:29:04 -07:00
parent f36f1d6be9
commit 807d092761

View file

@ -415,10 +415,17 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
return err
}
baseLayer.Layer, err = NewLayer(temp, baseLayer.Layer.MediaType)
layers, err := parseFromFile(ctx, temp, "", fn)
if err != nil {
return err
}
if len(layers) != 1 {
return errors.New("quantization failed")
}
baseLayer.Layer = layers[0].Layer
baseLayer.GGML = layers[0].GGML
}
}