update convert test to check result data

This commit is contained in:
Michael Yang
2024-06-03 09:49:13 -07:00
parent c4c84b7a0d
commit 6b252918fb
8 changed files with 924 additions and 37 deletions

View File

@@ -112,11 +112,14 @@ func (kv KV) ChatTemplate() string {
return s
}
type Tensors []*Tensor
type Tensors struct {
Items []*Tensor
Offset uint64
}
func (ts Tensors) Layers() map[string]Layer {
layers := make(map[string]Layer)
for _, t := range ts {
for _, t := range ts.Items {
parts := strings.Split(t.Name, ".")
if parts[0] == "blk" {
// join first and second part, e.g. blk.%d