This commit is contained in:
Josh Yan 2024-07-11 17:56:51 -07:00
parent 47353f5ee4
commit 29ecfe493b

View File

@ -695,3 +695,21 @@ func (llm *gguf) Encode(ws io.WriteSeeker, kv KV, tensors []Tensor) error {
func (gguf) padding(offset, align int64) int64 {
return (align - offset%align) % align
}
// Reader and WriterTo
type GGUFWriter struct {
KV KV
T []*Tensor
}
var _ io.Reader = (*GGUFWriter)(nil)
var _ io.WriterTo = (*GGUFWriter)(nil)
func (GGUFWriter) Read([]byte) (int, error) {
panic("not implemeneted")
}
func (gguf GGUFWriter) WriteTo(w io.Writer) (int64, error) {
}