mirror of
https://github.com/ollama/ollama.git
synced 2025-06-02 16:29:15 +02:00
seek to end of file when decoding older model formats
This commit is contained in:
parent
944519ed16
commit
d9a250e9b5
10
llm/ggml.go
10
llm/ggml.go
@ -93,6 +93,8 @@ func (c *containerGGML) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *containerGGML) Decode(ro *readSeekOffset) (model, error) {
|
func (c *containerGGML) Decode(ro *readSeekOffset) (model, error) {
|
||||||
|
// file contents aren't decoded
|
||||||
|
ro.Seek(0, io.SeekEnd)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,6 +117,10 @@ func (c *containerGGMF) Decode(ro *readSeekOffset) (model, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.version = version
|
c.version = version
|
||||||
|
|
||||||
|
// remaining file contents aren't decoded
|
||||||
|
ro.Seek(0, io.SeekEnd)
|
||||||
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,6 +173,10 @@ func (c *containerLORA) Decode(ro *readSeekOffset) (model, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.version = version
|
c.version = version
|
||||||
|
|
||||||
|
// remaining file contents aren't decoded
|
||||||
|
ro.Seek(0, io.SeekEnd)
|
||||||
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user