only quantize language models
This commit is contained in:
parent
4d0d0fa383
commit
d245460362
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue