zeropx-gguf-inspect
Zero-dependency static inspection of GGUF model files.
Read-only. No model loading. No chat_template rendering. No Jinja
evaluation. No network. No external dependencies (Python 3.10+, standard
library only).
Why
You've downloaded a GGUF from HuggingFace / civitai / a Discord dump / a customer / a research collaborator, and before you drop it into llama.cpp, Ollama, or LM Studio, you want to know:
- What's in the
tokenizer.chat_template? (arbitrary Jinja is dangerous.) - What does the model call itself in
general.name/general.description? - What's the architecture, quant, expert count, context length?
- Are there prompt-injection markers in the metadata strings?
- Does the manifest match what was advertised?
- Two files claim to be the same model — are they byte-identical?
gguf-inspect answers those without ever asking the runtime to interpret
the file. It walks a directory, parses the GGUF binary layout, and writes
a set of report files you can open in Excel, jq, or your text editor.
Install
pip install zeropx-gguf-inspect
(Python import module: gguf_inspect | CLI command: gguf-inspect)
Or from source:
git clone https://github.com/NixEngine/zeropx-gguf-inspect
cd zeropx-gguf-inspect
pip install -e .
Use
gguf-inspect --root /path/to/models --out ./reports
With per-file string scanning (slower — reads first 64 MB of every file):
gguf-inspect --root /path/to/models --out ./reports --scan-strings
For a self-contained HTML report on top of the CSV/JSON artifacts:
gguf-inspect --root /path/to/models --out ./reports --html-report
Writes ./reports/report.html — one page, adaptive light/dark, no
external assets. Open in a browser, screenshot it, print it to PDF,
or ship it as the reviewable deliverable next to the raw CSVs.
The --root directory is walked recursively. Every file is inventoried
(SHA-256, size, mtime). Every *.gguf file is parsed for header, metadata
KV table, and tensor info.
Outputs in --out
| file | contents |
|---|---|
manifest_files.csv |
Every file: path, size, mtime, SHA-256 |
manifest_files.jsonl |
Same, JSON-lines |
gguf_metadata_summary.csv |
One row per GGUF: version, tensor_count, metadata_kv_count, all keys |
gguf_tensor_summary.csv |
One row per tensor: name, dims, type, offset |
gguf_metadata_full.json |
Complete metadata dump for every GGUF |
interesting_metadata.csv |
KV rows matching key patterns (chat_template, arch, rope, expert, ...) |
interesting_strings.csv |
(with --scan-strings) Printable strings matching injection patterns |
folder_comparison.csv |
Per top-level folder: file_count, total_size, gguf_count, all SHA-256s |
run_summary.json |
Root, timing, counts, safety notes |
As a library
from pathlib import Path
from gguf_inspect import parse_gguf, audit_root
# One file
info = parse_gguf(Path("model.gguf"))
print(info["header"])
print(info["metadata"].get("tokenizer.chat_template", "(none)"))
# Whole tree
summary = audit_root(root=Path("/models"), out=Path("./reports"))
What it will NOT do
- Load the model.
- Render
tokenizer.chat_template(Jinja or otherwise). - Call any external service.
- Modify the input files.
Template strings are surfaced verbatim to the report so you can read them yourself.
Safety note
If you got a GGUF from an untrusted source, do not load it into a runtime just to inspect it. Templates and metadata are the delivery surface for prompt-injection payloads targeting the runtime that renders them. This tool exists so you can read that surface first.
License
MIT.
Tamper-evident scan log (v0.3+, optional)
Install the sibling zeropx-receipt-chain package to unlock a cross-package
feature: every scan gets appended to an append-only hash-chained
ledger, so you can prove months later exactly which scans were run,
when, and what SHA-256 the artefacts had at the moment they were
written.
pip install "zeropx-gguf-inspect[ledger]"
CLI:
gguf-inspect --root ./models --out ./reports --html-report \
--ledger ./scans.jsonl --ledger-tag production
The scan's run_summary.json, gguf_metadata_full.json,
manifest_files.csv, and (if generated) report.html all get their
SHA-256 recorded in one ledger event, chained to whatever entries
came before it. Re-running the same scan appends idempotently — no
duplicate entries.
Library:
from pathlib import Path
from gguf_inspect import audit_root
from gguf_inspect.ledger_integration import append_scan_to_ledger
audit_root(root=Path("./models"), out=Path("./reports"))
entry = append_scan_to_ledger(
Path("./reports"), Path("./scans.jsonl"),
tag="production",
extras={"reviewer": "you", "ticket_id": "SEC-2026-08-17-001"},
)
print(entry["entry_sha256"])
Verify the chain later with:
pip install zeropx-receipt-chain
receipt-chain verify --path ./scans.jsonl --tag production
Standalone Windows binary
A precompiled Windows binary is built by:
py -3.14 -m pip install pyinstaller
py -3.14 -m PyInstaller --onefile --name gguf-inspect --paths src build_pyi/entry.py
Result: single-file dist/gguf-inspect.exe (~9 MB) that runs on any
Windows machine without Python installed.
Author & Provenance
Sole Author: Dr. Vander Geraldo Rodrigues da Cunha Júnior (vgrcjr@gmail.com).
Technical & AI-Assisted Provenance Disclosure: Auxiliary computational/LLM tooling was used strictly for boilerplate and test-harness scaffolding under 1:1 human architectural design, binary-parser review, deterministic test verification, and sole human authorship. Zero runtime third-party or AI dependencies.
Metadata
Release files for zeropx-gguf-inspect 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zeropx_gguf_inspect-0.3.0.tar.gz | 24.3 kB | Without provenance | Details for zeropx_gguf_inspect-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zeropx_gguf_inspect-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for zeropx_gguf_inspect-0.3.0-py3-none-any.whl |
Total release size: 42.7 kB
Release files / zeropx_gguf_inspect-0.3.0.tar.gz
| Download URL | zeropx_gguf_inspect-0.3.0.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93d5b9ebadf5af8cca8dea7dea82f27d20981ea9dd85d205fd4a7a41efedf0a3
|
|
BLAKE2b-256 checksum How to use checksums |
df595a1fa0bb3e998de342300ec7f8e955001d6bf09fa8e0ca14bb67d8f8d7db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / zeropx_gguf_inspect-0.3.0-py3-none-any.whl
| Download URL | zeropx_gguf_inspect-0.3.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88d7dd49d40ee206b44ec11dbea0e5592f8ef5ed267af3c7898705dc1372c5b5
|
|
BLAKE2b-256 checksum How to use checksums |
f90781b4f287b86c0a212b7e5ee80fdc4557894a69ab492eed08ef4c2f0e0449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for zeropx-gguf-inspect 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.