web-check / README.md
model-guard's picture
Model Guard web check
0c61687 verified
|
Raw History Blame Contribute Delete
3.21 kB
metadata
title: Model Guard
emoji: 🛡️
colorFrom: blue
colorTo: gray
sdk: static
app_file: index.html
license: apache-2.0
pinned: false
tags:
  - security
  - provenance
  - safetensors
  - pickle
  - gguf
  - supply-chain
short_description: Provenance and risk check for HF models, in your browser

🛡️ Model Guard: check a model before you run it

Paste a Hugging Face model id or link and get two separate scores in a few seconds:

  • Risk (0–100): Hugging Face's own scanner results, code-executing imports found by reading pickle files (never loading them), lookalike publisher names, credential-shaped strings (shown redacted) and unusual chat templates.
  • Provenance gap (0–100): how much of the model's origin can't be confirmed from public data. This covers the publisher and account age, the declared base model (traced up to 5 steps back) and whether the weights and tensor layout match it.

Items marked worth a look or for information never add points. That includes abliterated or uncensored models: changing safety tuning is a legitimate choice, so it's reported as information only. Findings describe public facts and are not accusations against publishers.

This page is the in-browser version of the free, open-source hf-model-guard command-line tool and GitHub Action.

Privacy and how it runs

It's plain HTML, CSS and JavaScript, with no build step and no server. Every request goes from your browser straight to public huggingface.co endpoints, anonymously (no cookies, no token). There are no analytics, trackers, external CDNs or third-party scripts. A Content-Security-Policy limits the page to its own files and to connections to Hugging Face.

Share a check with a link like ?repo=owner/name, and add &revision=<sha-or-branch> to pin a revision. Full https://huggingface.co/owner/name/tree/<rev> links work too.

A low risk score is not proof of safety. Model Guard reads public metadata and small files only; behaviour hidden inside model weights (for example a trigger-phrase backdoor in safetensors) cannot be detected by static scanning, neither by this tool nor by pickle scanners.

Differences from the CLI

  • Large pickle checkpoints (over 25 MB): only the first 1–8 MB of the first pickle member is opcode-scanned, using an HTTP Range request. This is the same header mode the CLI uses for large shards. Smaller pickle files are scanned in full, like the CLI. Nothing is ever unpickled or executed.
  • Renamed or transferred repos: when Hugging Face redirects an old id (for example gpt2 → openai-community/gpt2), the page checks the current repo and notes the rename as information.
  • Gated and private repos: their files need sign-in, and this page never uses a token, so those checks are skipped and the result is marked partial.
  • Rate limits: heavy use can hit Hugging Face's anonymous rate limits. The page retries briefly, then marks the scan as partial or asks you to wait a minute.
  • Output: results are shown on the page and as raw JSON. For Markdown reports, CI gating and batch scans, use the CLI or the GitHub Action.