From d9a250e9b5151417c4b7a6e2971c1e683cbd2aff Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sat, 9 Dec 2023 21:14:35 -0500 Subject: [PATCH] seek to end of file when decoding older model formats --- llm/ggml.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llm/ggml.go b/llm/ggml.go index e81c7a8b..8d421e03 100644 --- a/llm/ggml.go +++ b/llm/ggml.go @@ -93,6 +93,8 @@ func (c *containerGGML) Name() string { } func (c *containerGGML) Decode(ro *readSeekOffset) (model, error) { + // file contents aren't decoded + ro.Seek(0, io.SeekEnd) return nil, nil } @@ -115,6 +117,10 @@ func (c *containerGGMF) Decode(ro *readSeekOffset) (model, error) { } c.version = version + + // remaining file contents aren't decoded + ro.Seek(0, io.SeekEnd) + return nil, nil } @@ -167,6 +173,10 @@ func (c *containerLORA) Decode(ro *readSeekOffset) (model, error) { } c.version = version + + // remaining file contents aren't decoded + ro.Seek(0, io.SeekEnd) + return nil, nil }