GGUF / Safetensors Model File Inspector

Inspect GGUF and Safetensors model files in your browser. See architecture, quantization, tensor details, and parameter counts without uploading anything.

This tool inspects GGUF and Safetensors model files directly in your browser. Drag and drop a file to instantly see its metadata, architecture, quantization type, tensor layout, and parameter count. The inspector reads only the file header - the rest of the multi-gigabyte file is never touched, so even 70B+ models parse in under a second. Nothing is uploaded to any server.

Ad
Ad

About GGUF / Safetensors Model File Inspector

What Are GGUF and Safetensors Files?

GGUF (GPT-Generated Unified Format) is a binary format created by the llama.cpp project in August 2023 to package quantized model weights, architecture details, tokenizer data, and inference parameters into a single portable file. It replaced the older GGML format and is now used by llama.cpp, Ollama, LM Studio, and text-generation-webui. As of early 2026, Hugging Face hosts over 170,000 GGUF models.

Safetensors is a format developed by Hugging Face for storing model weights safely and efficiently. It uses a JSON header followed by raw tensor data, avoiding the arbitrary code execution risks of older serialisation formats. In April 2026, Safetensors joined the PyTorch Foundation as an officially hosted project under the Linux Foundation. Over 1.1 million models on Hugging Face now use the Safetensors format, making it the dominant standard for model distribution.

FormatExtensionUsed ByWhat the Inspector Shows
GGUF.ggufllama.cpp, Ollama, LM Studio, text-generation-webuiArchitecture, quantization, context length, vocabulary, layer config, all metadata KV pairs
Safetensors.safetensorsHugging Face Transformers, diffusers, SDXL, LoRA adaptersTensor names, shapes, dtypes, byte offsets, total parameter count

How Does the Inspector Work?

The tool uses the browser's File API to read a small slice from the beginning of your file. For GGUF files, it reads up to 10 MB of binary header data and parses the structured metadata key-value pairs. For Safetensors, it reads just the JSON manifest that sits at the very start of the file (the header length is stored in the first 8 bytes as a little-endian 64-bit integer). The actual weight data - which makes up 99%+ of the file size - is never loaded into memory.

This header-only approach means the tool works with files of any size. A 70 GB Llama 3.1 70B GGUF file parses just as fast as a 4 GB 7B model because the header read is capped at 10 MB regardless. For Safetensors, the JSON header is typically under 1 MB even for very large models.

File SizeHeader ReadParse Time
1-5 GB (7B model)~1-10 MBUnder 1 second
10-20 GB (13B model)~1-10 MBUnder 1 second
30-70 GB (70B model)~1-10 MBUnder 1 second

GGUF Metadata Fields Explained

A GGUF file stores its metadata as key-value pairs in the binary header. The inspector extracts and organises these into readable sections. The most important fields for understanding a model are:

FieldWhat It Tells YouExample Values
ArchitectureThe model family - determines which inference code path to usellama, mistral, phi, gemma, qwen2
QuantizationCompression level applied to weights (see quantization table below)Q4_K_M, Q5_K_S, Q8_0, F16
Context lengthMaximum input sequence the model supports in tokens4096, 8192, 32768, 131072
Embedding sizeDimension of the hidden state vector4096 (7B), 5120 (13B), 8192 (70B)
Layer countNumber of transformer layers (blocks)32 (7B), 40 (13B), 80 (70B)
Attention headsNumber of attention heads per layer32 (7B), 40 (13B), 64 (70B)
KV headsNumber of key-value heads (lower than attention heads means GQA is used)8 (Llama 3), 4 (Mistral)
Vocabulary sizeNumber of tokens in the tokenizer32000 (Llama 2), 128256 (Llama 3)
Tokenizer modelThe tokenizer type embedded in the filellama (SentencePiece), gpt2 (BPE)

The inspector also shows a full expandable list of every metadata key-value pair in the file, including training hyperparameters, chat templates, and other implementation-specific data that the main summary does not surface.

Understanding GGUF Quantization Types

Quantization reduces model file size and memory usage by storing weights at lower precision than the original FP16 or FP32 training format. The "K-quant" types (Q4_K_M, Q5_K_M, etc.) use a mixed-precision strategy where more important layers get higher precision, producing better quality than uniform quantization at the same average bit width. The S, M, and L suffixes stand for Small, Medium, and Large - referring to how many layers use the higher-precision treatment.

Benchmark data from the llama.cpp project shows that all K-quant methods stay within roughly 6% of baseline perplexity. Q4_K_M is the most popular choice, offering about 92% perplexity retention at roughly 4.5 bits per weight. Q5_K_M sits close to the original model quality and is the recommended option for anyone with enough VRAM.

QuantizationBits per WeightSize (7B model)VRAM Needed (7B)Quality Impact
F16 (half precision)16~14 GB~16 GBNear-original quality
Q8_08~7 GB~9 GBMinimal quality loss
Q6_K~6.5~5.5 GB~7.5 GBVery small quality loss
Q5_K_M~5.5~5 GB~7 GBSmall quality loss, recommended if VRAM allows
Q4_K_M~4.5~4.1 GB~6 GBMost popular; 92% perplexity retention
Q3_K_M~3.5~3.3 GB~5 GBMore noticeable degradation
Q2_K~2.5~2.5 GB~4.5 GBSignificant quality loss; last resort
IQ2_XS~2.3~2.2 GB~4 GBImportance-matrix quantization; experimental

VRAM figures include overhead for KV cache at a 2K-4K context window. Longer context lengths increase VRAM usage substantially - a 7B Q4_K_M model at 32K context needs roughly 10-12 GB instead of the 6 GB shown above. Use the AI model size calculator to estimate exact requirements for your hardware and context settings.

Safetensors Tensor Inspection

Safetensors files use a deliberately simple structure: a JSON header (capped at 100 MB) followed by raw, contiguous tensor data in little-endian byte order. The header maps each tensor name to its data type, shape, and byte offset within the file. This design eliminates security risks from older serialisation approaches while enabling memory-mapped loading for fast startup.

The inspector parses this header and presents every tensor as a searchable, sortable table. It also calculates the total parameter count by multiplying out tensor shapes and groups tensors by data type so you can quickly see the precision breakdown.

ActionWhat It Helps With
Search tensor namesFind specific layers (e.g. "attention", "mlp", "lora")
Check shapesVerify layer dimensions match expected architecture
Count parametersGet exact total from tensor shapes rather than relying on model card claims
Verify dtypesConfirm FP16, BF16, FP32, or FP8 precision
Compare checkpointsSee if two files have the same tensor structure and shapes
Check LoRA adaptersVerify rank and target layers of fine-tuning adapters

Common Data Types in Model Files

Both GGUF and Safetensors files use standardised data type identifiers. The data type determines how many bytes each weight value occupies and directly affects model precision and file size.

Data TypeBytes per ValuePrecisionTypical Use
F32 (float32)4Full precisionTraining checkpoints, small models
F16 (float16)2Half precisionStandard inference format for GPUs
BF16 (bfloat16)2Half precision, wider rangeTraining and inference on modern GPUs (A100, H100)
I32 (int32)432-bit integerEmbedding indices, token IDs
I8 (int8)18-bit integerQuantized weights (INT8 quantization)
U8 (uint8)18-bit unsignedLookup tables, auxiliary data

Practical Tips for Inspecting Model Files

When checking a GGUF file before loading it in Ollama or LM Studio, the three most useful pieces of information are quantization type, context length, and architecture. The quantization type tells you how much VRAM the model will need. The context length tells you the maximum prompt size. The architecture confirms compatibility with your inference software - llama.cpp currently supports over 40 architectures including LLaMA, Mistral, Phi, Gemma, and Qwen.

For Safetensors files, the parameter count and data type breakdown are the most important things to check. If you downloaded a model labelled "7B" but the inspector shows 6.7 billion parameters, that is normal - parameter counts in model names are rounded. Check the dtypes to confirm the file is in the precision you expected. A file labelled "FP16" should show F16 tensors, not F32 (which would be twice the size).

If you are comparing multiple quantized versions of the same model, look at the GGUF quantization type and file size together. A Q4_K_M file for a 7B model should be roughly 4-5 GB. If it is significantly larger, the file may use a different quantization than advertised. For checking how many tokens a prompt uses before feeding it to one of these models, the AI token counter handles GPT, Claude, and Llama tokenizers. To estimate how much a model will cost to run via cloud APIs instead of locally, the AI pricing calculator compares per-token costs across providers.

Sources

Frequently Asked Questions

Does this tool upload my model file?

No. The file never leaves your browser. The tool reads only the header section of your file (up to 10MB for GGUF, just the JSON header for Safetensors) using the File API. No data is sent to any server.

What information can I extract from a GGUF file?

GGUF files contain rich metadata in their header: model architecture, quantization type, context length, embedding dimensions, layer count, attention head configuration, tokenizer details, and vocabulary size. This tool parses all of it and presents it in organized sections.

What about Safetensors files?

Safetensors files store a JSON header with the full tensor manifest. This tool reads that header and shows you every tensor's name, shape, data type, and byte size, along with the total parameter count and a dtype breakdown.

Can I inspect very large model files (50GB+)?

Yes. The tool only reads a small slice from the beginning of the file. For GGUF files it reads up to 10MB, and for Safetensors it reads just the header. The rest of the file is never touched, so even multi-gigabyte models parse in under a second.

What GGUF versions are supported?

The parser supports GGUF version 2 and version 3, which covers all models from llama.cpp and related tooling. If a file uses an unsupported version, you will see a clear error message.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/model-file-inspector/" title="GGUF / Safetensors Model File Inspector - Free Online Tool">Try GGUF / Safetensors Model File Inspector on ToolboxKit.io</a>