Merge pull request #3663 from ollama/mxyng/fix-padding

This commit is contained in:
Michael Yang 2024-04-15 17:44:54 -07:00 committed by GitHub
commit 6d53b67c2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,7 +248,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
}