From 969238b19e9f6c564fe419424ab60c20ff779bb7 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Mon, 15 Apr 2024 17:26:59 -0700 Subject: [PATCH] fix padding in decode TODO: update padding() to _only_ returning the padding --- llm/gguf.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm/gguf.go b/llm/gguf.go index 796642e3..b907d7f1 100644 --- a/llm/gguf.go +++ b/llm/gguf.go @@ -243,7 +243,7 @@ func (llm *gguf) Decode(rs io.ReadSeeker) error { } padding := llm.padding(offset, int64(alignment)) - if _, err := rs.Seek(padding, io.SeekCurrent); err != nil { + if _, err := rs.Seek(padding-offset, io.SeekCurrent); err != nil { return err }