---
title: "Check a Hugging Face repo before you build on it"
date: 2026-12-03
description: "Live, gated or gone: how to verify a model link, tell real weights from sidecars, pin the commit you tested, and read the license from the card instead of the name."
tags: ["huggingface", "models", "verification", "guide", "quantization"]
---

A model link is a promise that someone else keeps. Repositories get deleted, renamed, gated, or emptied down to a projector, and a link that worked in a post last month can be dead today. The checks below take a minute and do not require downloading weights.

They are about the repository. For what can hide inside a GGUF file once you have it, see the [GGUF pre-flight](/guides/check-a-gguf-before-you-load-it).

## Three states of a link

| State | What the API returns | What it means |
| --- | --- | --- |
| Live | `200`, `gated: false` | Metadata and files resolve. |
| Gated | `200`, `gated: "auto"` or `"manual"` | Metadata resolves; downloading needs an accepted agreement or the author's approval. |
| Gone | `401` or `404` | Deleted or private. Unusable for readers, whatever the page title says. |

A deleted repository can answer `401` on the API while the page renders a 404. We hit exactly that on a catalog entry this week: the API said `401`, the HTML title said `404`, and there was no repository behind either. Treat both codes as gone.

Gated is not the same as gone. A gated repository still lists its files and sizes, so you can plan around it before asking for access. It just cannot be fetched anonymously, which matters if a script or a CI job expects to download it.

## Read the metadata, not the page

Ask the API for the facts you would otherwise guess from the repository name:

```bash
repo="owner/model"
curl -s "https://huggingface.co/api/models/${repo}?full=true" \
  | python3 -c 'import json,sys; d=json.load(sys.stdin); c=d.get("cardData") or {}; print("id:", d["id"]); print("sha:", d.get("sha")); print("gated:", d.get("gated")); print("downloads:", d.get("downloads")); print("license:", c.get("license")); print("base:", c.get("base_model"))'
```

What each field tells you:

- **`id`** is the repo the API actually resolved. If it differs from the path you requested, the repo was renamed and your link depends on a redirect.
- **`sha`** is the commit that is live right now. Record it; more on that below.
- **`gated`** is `false`, `"auto"` or `"manual"`.
- **`downloads`** is a rolling 30-day count, not a lifetime total.
- **`license`** lives in `cardData`, and a repo named after one base model can be licensed under another.
- **`base_model`** is the card's claim about provenance. It is a claim, not a proof, but a missing one is a warning.

## Check that the weights are really there

A file list is the difference between a model and a folder of sidecars:

```bash
curl -s "https://huggingface.co/api/models/${repo}/tree/main?recursive=true" \
  | python3 -c 'import json,sys; [print(f["path"]) for f in json.load(sys.stdin) if f["path"].lower().endswith((".gguf",".safetensors"))]'
```

Then read the names, not just the count:

- **`mmproj-*.gguf`** is a vision projector. It is useless without the language model.
- **`mtp-*.gguf`** is a multi-token-prediction head, not the main weights.
- **`lora`, `adapter` and `draft` files** are add-ons for something else.
- **Split shards** such as `-00001-of-00005.gguf` are one file in pieces; add their sizes instead of reading the first one.

A repository can look like a 2 GB Q8 build until the file list shows that the only quant-named files are MTP heads and the full checkpoint is unlabeled. That happened in the first catalog pass. The entry was dropped rather than given a wrong memory figure.

The same trap applies in reverse: a repo can claim "24 GB" in its title and ship a 70 GB BF16 checkpoint. Trust the file sizes.

## Pin the commit you tested

`main` moves. A repository can be edited, re-quantized or replaced after you benchmark it, and the name stays the same.

Take the `sha` from the metadata call and use it in the download URL:

```bash
sha="0123456789abcdef0123456789abcdef01234567"
file="Model-Q4_K_M.gguf"
curl -sI "https://huggingface.co/${repo}/resolve/${sha}/${file}" \
  | grep -i -E 'HTTP/|x-linked-size|x-linked-etag'
```

The response carries `x-linked-size` in bytes and `x-linked-etag`, which is the LFS SHA-256. Compare both against your local copy. `x-linked-etag` is also the value you can record next to a benchmark row so the number stays attached to the exact bytes.

If you only record "Q4_K_M from owner/model", you have recorded a name, not an artifact.

## Read the license from the card

Repository names encode size and method, not terms. Two builds of the same base model can carry different licenses, and `license: other` is common on fine-tunes.

Check `cardData.license` and, when present, `cardData.license_name`. If the card says `other` with a name like a community license, open the license file. If there is no license field at all, assume you have no grant, regardless of what the base model allows.

Base model and license are also how you avoid a duplicate: a checkpoint already in your catalog under another uploader is still the same checkpoint.

## Treat downloads as a filter

Download counts are useful for finding candidates and bad for ranking them.

- They are a 30-day window and they move. Two refreshes a day apart can differ by tens of thousands on a popular repo.
- A deleted repository's count does not transfer to its successor. When the GLM-5.3-Flash-Uncensored entry was repointed to the author's live GGUF upload, the count went from 615,000 to 14,569. The old number described a repository that no longer existed.
- A repo can be popular and still ship a chat template you do not want. That is the [GGUF pre-flight](/guides/check-a-gguf-before-you-load-it) checklist.

## A five-minute checklist

| Check | Command or field | Fail looks like |
| --- | --- | --- |
| Link resolves | `gated` and HTTP status | `401` or `404` |
| Real weights | file list ends in `.gguf` or `.safetensors` | only `mmproj`, MTP heads or LoRA |
| Sizes are real | sum the file sizes | title says 24 GB, files say 70 GB |
| Commit pinned | `sha` in the resolve URL | only `main` |
| License read | `cardData.license` / `license_name` | missing, or `other` with no text |
| Downloads scoped | `downloads` in the same response | a number copied from an older post |

## What the catalog does with this

Every entry in the [catalog](/models) records the memory figure from the repository's real file listing, not from the model name. Where a repo ships GGUF, the model page shows the recommended file and the smallest one, because those are different choices.

The same checks run weekly against all 144 entries. A dead link, a repository with no weights, or an entry with no published size fails the audit rather than sitting quietly in the table. That is how the stale GLM link above was found: it was the only one of 144.

---

Canonical: https://www.wahloon.net/guides/check-a-hugging-face-repo

- Older: [How to check a GGUF before you load it](https://www.wahloon.net/guides/check-a-gguf-before-you-load-it)
