Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

only quantize language models

Michael Yangd24546036265
diff --git a/server/images.go b/server/images.go
index 5da47b795..2817b1d31 100644
--- a/server/images.go
+++ b/server/images.go
@@ -377,7 +377,10 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
}
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
@@ -582,7 +585,6 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
return nil
}
-
func CopyModel(src, dst model.Name) error {
if !dst.IsFullyQualified() {
return model.Unqualified(dst)