package gguf import ( "os" "strings" "testing" ) // TestRealHeaders reads real files when LLMGW_GGUF_URLS names them (space // separated), and prints the shape and memory estimate for a 16384-token pool. // Skipped otherwise: CI has no mirror to read. func TestRealHeaders(t *testing.T) { urls := strings.Fields(os.Getenv("LLMGW_GGUF_URLS")) if len(urls) == 0 { t.Skip("LLMGW_GGUF_URLS not set") } for _, u := range urls { h, err := FromURL(t.Context(), nil, u) if err != nil { t.Errorf("%s: %v", u, err) continue } t.Logf("%s: arch=%s layers=%d heads=%d kv_heads=%d embd=%d key_len=%d kv/token=%d B, kv@16k=%.2f GiB", u[strings.LastIndex(u, "/")+1:], h.Architecture, h.BlockCount, h.HeadCount, h.HeadCountKV, h.EmbeddingLength, h.KeyLength, h.KVBytesPerToken(), float64(16384*h.KVBytesPerToken())/(1<<30)) if h.KVBytesPerToken() == 0 { t.Errorf("%s: no KV shape read", u) } } }