Skip to content

Commit

Permalink
fix quantize file types
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed May 17, 2024
1 parent 0aba2d5 commit 882041e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
return err
}

f16digest := baseLayer.Layer.Digest

baseLayer.Layer, err = NewLayer(temp, baseLayer.Layer.MediaType)
if err != nil {
return err
layers, err := parseFromFile(ctx, temp, "", fn)

Check failure on line 418 in server/images.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest, amd64)

ineffectual assignment to err (ineffassign)
if len(layers) != 1 {
return errors.New("quantization failed")
}

intermediateBlobs.Store(f16digest, baseLayer.Layer.Digest)
intermediateBlobs.Store(baseLayer.Layer.Digest, layers[0].Layer.Digest)
baseLayer.Layer = layers[0].Layer
baseLayer.GGML = layers[0].GGML
}
}

Expand Down

0 comments on commit 882041e

Please sign in to comment.