seek to eof for older model binaries

This commit is contained in:
Jeffrey Morgan 2023-12-09 20:48:57 -05:00
parent 2dd040d04c
commit 944519ed16

View file

@ -141,6 +141,10 @@ func (c *containerGGJT) Decode(ro *readSeekOffset) (model, error) {
// different model types may have different layouts for hyperparameters
var llama llamaModel
binary.Read(ro, binary.LittleEndian, &llama.hyperparameters)
// remaining file contents aren't decoded
ro.Seek(0, io.SeekEnd)
return &llama, nil
}