A file name is a claim, not a fact: anyone can rename a file, and a download can be the wrong quantization with the right name. GGUF files carry their own metadata — model name, architecture, quantization, context size, tokenizer, and sometimes the importance-matrix details — and reading it takes seconds, before you spend minutes loading the model.
Related guide: How to Convert a Hugging Face Model to GGUF with llama.cpp
Read it without loading the model
The fastest way is KoboldCpp’s --analyze flag, which prints the metadata, weight types and tensor names of a GGUF or safetensors file and then exits — nothing is loaded or served:
koboldcpp --analyze model.gguf
Check three things in the output: the model name and architecture match what you expected to download, the weight types match the quantization in the file name (for example Q4_K_M), and the context size is one the model supports. If the file was quantized with an importance matrix, the metadata carries keys such as quantize.imatrix.entries_count and quantize.imatrix.chunks_count — a model card for an imatrix build says any GGUF reader can inspect them.
Read it from Python
If you do not have KoboldCpp, use the GGUF Python reader that ships with llama.cpp in the gguf-py directory. Open the file with its reader and list the metadata keys; the same keys appear. This is UNTESTED on this machine — the exact import name varies by version, so check the reader’s documentation in the version you install before scripting against it.
Expected result. We checked the KoboldCpp flags reference for the –analyze flag and the imatrix model card for the quantize.imatrix metadata keys, and the llama.cpp repository listing for the gguf-py directory. We did not run this software ourselves for this guide, so no output here is a recorded result; steps marked UNTESTED were checked against the sources below, not run.
Limits
Metadata describes the file, not the quality of the model inside it: a correctly labelled bad quantization is still a bad quantization. The Python reader steps in this guide are UNTESTED — the –analyze flag is the verified path. We did not inspect any GGUF file ourselves.
Sources
- KoboldCpp flags reference — –analyze: prints the metadata, weight types and tensor names of a GGUF or safetensors file, then exits; nothing is loaded or served
- llama.cpp repository — gguf-py directory ships the GGUF Python reader used by the project’s own tools
- Imatrix GGUF model card — the imatrix metadata is embedded in the GGUF and can be inspected with any GGUF reader; look for quantize.imatrix.entries_count and quantize.imatrix.chunks_count
Checked 2026-11-28.
