mirror of
https://github.com/ollama/ollama.git
synced 2025-03-28 02:33:14 +01:00
only quantize language models
This commit is contained in:
parent
b535afe35c
commit
3244a25c79
@ -349,7 +349,10 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, c
|
||||
}
|
||||
|
||||
for _, baseLayer := range baseLayers {
|
||||
if quantization != "" && baseLayer.GGML != nil && baseLayer.GGML.Name() == "gguf" {
|
||||
if quantization != "" &&
|
||||
baseLayer.MediaType == "application/vnd.ollama.image.model" &&
|
||||
baseLayer.GGML != nil &&
|
||||
baseLayer.GGML.Name() == "gguf" {
|
||||
ftype, err := llm.ParseFileType(quantization)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -555,7 +558,6 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, c
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func CopyModel(src, dst model.Name) error {
|
||||
if !dst.IsFullyQualified() {
|
||||
return model.Unqualified(dst)
|
||||
|
Loading…
x
Reference in New Issue
Block a user