Commit 6694be5e authored by Michael Yang's avatar Michael Yang
Browse files

convert/llama: use WriteSeeker

parent f5e8b207
......@@ -5,7 +5,6 @@ import (
"fmt"
"io"
"log/slog"
"os"
"regexp"
"strings"
......@@ -159,11 +158,5 @@ func (m *LlamaModel) WriteGGUF(ws io.WriteSeeker) error {
"tokenizer.ggml.add_eos_token": false,
}
f, err := os.CreateTemp("", "ollama-gguf")
if err != nil {
return err
}
defer f.Close()
return llm.NewGGUFV3(m.Params.ByteOrder).Encode(f, kv, m.Tensors)
return llm.NewGGUFV3(m.Params.ByteOrder).Encode(ws, kv, m.Tensors)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment