fs(ggml): fill in arch prefix if necessary (#12646)

This commit is contained in:
Michael Yang
2025-10-20 16:42:18 -07:00
committed by GitHub
parent 94f110b35a
commit d2b63c19b3
6 changed files with 82 additions and 54 deletions

View File

@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"io"
"maps"
"os"
"strings"
"testing"
@@ -799,7 +800,10 @@ func createBinFile(t *testing.T, kv map[string]any, ti []*ggml.Tensor) (string,
}
defer f.Close()
if err := ggml.WriteGGUF(f, kv, ti); err != nil {
base := map[string]any{"general.architecture": "test"}
maps.Copy(base, kv)
if err := ggml.WriteGGUF(f, base, ti); err != nil {
t.Fatal(err)
}
// Calculate sha256 of file