Hf model card research

From AtlasOmnia/hermes-custom-pack · View interactive version

Hf model card research is an AI agent skill from the GitHub repository AtlasOmnia/hermes-custom-pack. hf-model-card-research — Pull structured benchmark metadata, download stats, and quality claims from HuggingFace model cards for comparison across model variants.

How to use this skill

Skill file

HF Model Card Research

Extract structured metadata — downloads, likes, benchmark claims, file sizes, author statements — from HuggingFace model cards. Used when the user asks you to "check these models on HF", "pull benchmarks for these variants", or "compare what authors claim."

When to Use

Workflow

1. Discover model repo names

Search HF for each author's models using site:huggingface.co queries:

site:huggingface.co <author> <model-family> <variant-keyword>

Try variant-specific keywords: the author's handle, the model name, key terms like "uncensored", "abliterated", "Opus", "NVFP4", "MTP", etc.

For community quantizers (mradermacher, unsloth, byteshape), search with: site:huggingface.co <author> Qwen3.6-27B.

If search results are sparse, try the author's HF profile page directly: https://huggingface.co/<author>/models — use web_extract on that.

2. Pull structured stats via HF API

The HF API endpoint returns the metadata you need. Pull JSON, don't scrape the web view for stats:

https://huggingface.co/api/models/{owner}/{repo}

Returns JSON with:

Pitfall — delegated subagents hit terminal guardrails on HF pulls. Three dispatched subagents (each on different HF research tasks, all variants) hit same_tool_failure_halt after 4 repeated terminal retries on failed HF calls. The failure mode is predictable: subagents loop on the same failing terminal (curl to HF API) because they think "retry the same call until it works." The per-turn tool guardrail halts them after 4 non-progressing attempts with zero data produced. This happened across three separate delegations in the same session.

Fix — use a bounded host-side Python script through terminal in a profile that permits execution (or a no-agent cron script), not delegation for HF pulls. When you need stats for a list of repos, run the loop as one bounded process with direct requests.Session() and per-repo exception handling so one failure does not stop the rest.

Working pattern (copy-pasteable):

import json, requests, time, pathlib

repos = [
    ("owner1", "repo1"),
    ("owner2", "repo2"),
    # ... one tuple per repo
]

s = requests.Session()
s.headers.update({"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) HermesResearch/1.0"})

lines = ["# HuggingFace Model Stats", ""]
for owner, repo in repos:
    try:
        r = s.get(f"https://huggingface.co/api/models/{owner}/{repo}", timeout=20)
        if r.status_code != 200:
            lines.append(f"## {owner}/{repo}\n**Error:** HTTP {r.status_code}\n")
            time.sleep(0.5); continue
        j = r.json()
        lines.append(f"## {owner}/{repo}")
        lines.append(f"- **URL:** https://huggingface.co/{owner}/{repo}")
        lines.append(f"- **Downloads:** {j.get('downloads', 0):,}")
        lines.append(f"- **Likes:** {j.get('likes', 0):,}")
        ggufs = [f for f in [x.get('rfilename','') for x in j.get('siblings',[])] if f.lower().endswith('.gguf')]
        if ggufs:
            lines.append(f"- **GGUF files ({len(ggufs)}):** {', '.join(ggufs[:6])}" + ("…" if len(ggufs) > 6 else ""))
        lines.append("")
    except Exception as e:
        lines.append(f"## {owner}/{repo}\n**Error:** {e}\n")
    time.sleep(0.3)

out = pathlib.Path("~/Desktop/hf-verified-stats.md")
out.write_text("\n".join(lines))
print(f"Wrote {out}")

Why this works where delegation fails:

When delegation IS still appropriate for HF research: Extracting README prose (benchmarks, claims) via web_extract on the web-view URL. One failed web_extract URL → move on, don't retry. For the stats-only pass (downloads/likes/file list), use the same bounded host-side Python path. For README benchmark prose extraction, web_extract on individual web-view URLs still works fine from the parent because the failure mode is different (one URL at a time, not a list).

Batching for the web_extract README pass: After the stats pass, you may want README content (benchmarks, claims) that isn't in the API JSON. Pass up to 5 URLs per web_extract(urls=[...]) call against the web view (https://huggingface.co/{owner}/{repo}). char_limit=8000 gets the head + tail of large cards; look for the footer line showing where the full text is cached and read_file the middle if needed.

Pitfall — "base model benchmark" cards. Many fine-tune cards list the base model's official benchmarks (e.g., "Qwen3.6-27B SWE-bench 77.2, AIME 94.1") without providing any delta data showing how the distilled/uncensored variant compares to base. Always flag when a card's benchmark numbers are for the BASE model, not the variant itself. Confirmed examples from July 2026: rico03 Opus 4.6 Distilled lists base Qwen3.6-27B's benchmarks only; lordx64 Opus 4.7 Distilled lists NO benchmark deltas at all. Only DavidAU Heretic (KL=0.0469, 4/100 refusals, per-quant accuracy table) and Jackrong Qwopus v2 (30-question throughput bench) provided variant-vs-base numbers among the top 22 variants checked.

3. Extract README benchmark claims

The README at https://huggingface.co/{owner}/{repo}/resolve/main/README.md is where authors publish benchmark tables.

Key fields to look for:

Pitfalls:

4. Get file sizes for recommended quants

From the HF API JSON, check siblings array for file names and sizes. For GGUF repos, the README often has a download table with explicit sizes.

Alternatively, use gguf.totalFileSize from the API for the total repo size.

5. Compile structured output

For each variant, report:

Signal wording rules:

6. Cross-check claims across variants

When the user wants a comparison, produce a summary table at the end grouping:

Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.