fix padding in decode

TODO: update padding() to _only_ returning the padding
This commit is contained in:
Michael Yang 2024-04-15 17:26:59 -07:00
parent 0efb7931c7
commit 969238b19e

View file

@ -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
}