seek to eof for older model binaries
This commit is contained in:
parent
2dd040d04c
commit
944519ed16
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue