interface
This commit is contained in:
parent
e75fb73839
commit
554f3bdc0e
@ -29,8 +29,6 @@ func NewLayer(r io.Reader, mediatype string) (*Layer, error) {
|
||||
defer os.Remove(temp.Name())
|
||||
|
||||
sha256sum := sha256.New()
|
||||
if
|
||||
|
||||
n, err := io.Copy(io.MultiWriter(temp, sha256sum), r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -244,8 +244,11 @@ func parseFromFile(ctx context.Context, file *os.File, digest string, fn func(ap
|
||||
|
||||
var reader io.Reader = io.NewSectionReader(file, offset, n)
|
||||
if !sort.IsSorted(ggml.Tensors()) {
|
||||
// create a new Tensors containing Tensors that have a writeTo
|
||||
|
||||
reader = &llm.GGUFWriter{
|
||||
KV: ggml.KV(),
|
||||
KV: ggml.KV(),
|
||||
// Update .Tensors
|
||||
Tensors: ggml.Tensors(),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user