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

@@ -18,6 +18,7 @@ import (
"strings"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/ollama/ollama/fs/ggml"
)
@@ -339,13 +340,8 @@ func TestConvertAdapter(t *testing.T) {
}
actual := generateResultsJSON(t, r, m.KV(), m.Tensors())
for _, k := range slices.Sorted(maps.Keys(c.Expected)) {
if v, ok := actual[k]; !ok {
t.Errorf("missing %s", k)
} else if v != c.Expected[k] {
t.Errorf("unexpected %s: want %s, got %s", k, c.Expected[k], v)
}
if diff := cmp.Diff(c.Expected, actual); diff != "" {
t.Errorf("mismatch (-want +got):\n%s", diff)
}
})
}