Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

seek to eof for older model binaries

Jeffrey Morgan944519ed16c7
diff --git a/llm/ggml.go b/llm/ggml.go
index c3e71b880..e81c7a8b5 100644
--- a/llm/ggml.go
+++ b/llm/ggml.go
@@ -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
}