~/tools / Model files and chat templates / GGUF Metadata Viewer
GGUF Metadata Viewer — Open a GGUF file: quantization, context, tokenizer, tensors, KV cache
Open a GGUF model file in your browser and see what is inside without loading it: architecture, quantization, parameter count, the longest context, layers and attention heads, the tokenizer and its special tokens, the chat template, every metadata entry and every tensor. The tool also computes the KV cache for each context length and checks the file the way llama.cpp does, so you can spot an incomplete download before you import it into Ollama. Only the start of the file is read, and nothing is uploaded.
Or drop a file here. Only the start of the file is read, and it stays on your computer. In our test, the weights file Ollama keeps in its models/blobs folder was a GGUF file too.
KV cache = 2 × layers × KV heads × head size × 2 bytes (f16) × context length. For qwen2.5:7b this gives 224 MiB at 4096 tokens, the size in Ollama's log in our test.
The weights are the tensor data stored in the file; together with the header they make up the file. Running the model also needs the KV cache and working memory, which the memory estimator adds.
Checked on 2026-11-08 against the GGUF specification and llama.cpp's reader, and with the real file of qwen2.5:7b: its metadata and 339 tensors matched what Ollama 0.40.11 reports. GGUF specification · Ollama: importing a model
The file is read in your browser and is not uploaded. Only the start of it is read.
GGUF is the file format that llama.cpp and Ollama use for models. A GGUF file starts with a header: the format version, a list of metadata entries (such as general.architecture, <architecture>.context_length, tokenizer.ggml.tokens and tokenizer.chat_template) and a list of tensors with their names, shapes, types and positions. The weights follow. This tool reads only that header, using the layout in the GGUF specification in the ggml repository, so a file of several gigabytes opens in a moment: for qwen2.5:7b the header is 5.7 MiB of a 4.36 GiB file. From the header it shows the model's name, architecture and quantization (general.file_type), counts the parameters from the tensor shapes, and adds up the size of the weights for each tensor type, using the block sizes in llama.cpp's gguf-py. It shows the shape of the model (layers, attention heads, KV heads, head size, RoPE settings, experts), the tokenizer with its beginning-of-text and end-of-text tokens, and the chat template. From the layers, the KV heads and the head size it computes the KV cache at f16, Ollama's default: 2 (keys and values) × layers × KV heads × head size × 2 bytes × context length. It also checks what llama.cpp's own reader (gguf.cpp) checks, such as the format version, the byte order, duplicate keys and tensor names, the alignment, the tensor types and the position of each tensor, and it compares the size the header describes with the size of the file. We checked the tool with the real file of qwen2.5:7b that Ollama 0.40.11 stores: the metadata, the 339 tensors (names, types and shapes) and the parameter count matched what Ollama's /api/show reports, and the size computed from the header matched the file to the byte.
The core logic of this tool is open source under the MIT License. github.com/seigo5555/toolkitbox-lib/src/gguf.ts
Use Cases
- Check a GGUF you downloaded from Hugging Face before importing it into Ollama: quantization, context length, chat template and whether the download is complete
- See how much memory the weights and the KV cache of a model need, from the file itself
- Look at the metadata and tensors of a model Ollama already has, by opening its file in Ollama's models/blobs folder
Usage
- Choose a .gguf file or drop it on the box. To look at a model Ollama has, ollama show --modelfile <model> prints the path of its file after FROM.
- The tool reads the start of the file and shows the model, its shape, the KV cache, the weights by type and the tokenizer.
- Open "All metadata" or "All tensors" for the full lists. For a file that is not in Ollama yet, the tool shows the Modelfile line to import it.
FAQ
Is the file uploaded?
No. The browser reads the file on your computer, and the tool reads only the start of it: the header with the metadata and the list of tensors. The weights are not read.
Why does the tool say the file is shorter than the header says?
The header lists every tensor with its size and position, so it tells how large the file must be. If the file is shorter, part of the weights is missing, for example because a download or copy stopped early. llama.cpp stops with "model is corrupted or incomplete" for such a file.
What is the difference between general.file_type and the tensor types?
general.file_type names the main quantization of the file, such as Q4_K_M. A file mixes types: in qwen2.5:7b Q4_K_M, most tensors are Q4_K, some are Q6_K, and small ones such as the normalization weights are F32. The table of weights by type shows the mix.
Can I open the model files Ollama has already downloaded?
Yes. Ollama keeps a model's weights in its models/blobs folder, in a file named sha256-…. In our test, ollama show --modelfile qwen2.5:7b printed the path of that file after FROM, and it was a GGUF file.
How do I import a GGUF into Ollama?
Ollama's import guide uses a Modelfile with FROM /path/to/file.gguf and then ollama create. For a model split into several files, keep the original file names and use a wildcard that matches every part. Ollama does not quantize GGUF models during import.
How accurate is the KV cache size?
The formula matched Ollama's log in our test (224 MiB for qwen2.5:7b at 4096 tokens). It is for f16, Ollama's default. Models with a sliding window, shared or compressed KV cache, or recurrent layers use a different amount; the tool says so when the metadata shows it.