~/tools / Run a local LLM on your server / Ollama Model Info Reader

Ollama Model Info Reader — Read ollama show: context, layers, capabilities, license, KV cache

Paste the /api/show response of an Ollama model, or the output of ollama show or ollama show --verbose, and see the model at a glance: size, quantization, the longest context it supports, layers and attention heads, what it can do (tools, vision, thinking, embeddings and more), its default parameters, system prompt and license. The tool also computes the KV cache for each context length, the memory that grows with num_ctx. Nothing leaves your browser.

How to get it

Replace qwen2.5:7b with your model. Both work while Ollama is running.

curl http://localhost:11434/api/show -d '{"model": "qwen2.5:7b"}'

ollama show qwen2.5:7b --verbose

Read as an /api/show response.

  • The head size is not in the metadata, so it is computed as embedding_length ÷ head_count = 128.

Model

Name
Qwen2.5 7B Instruct
Architecture
qwen2
Parameters
7.62B
Quantization
Q4_K_M
Longest context
32768
Layers
28
Attention heads
28 (KV: 4)
Head size
128
Embedding length
3584
Template source
go_template

Capabilities

  • completionGenerates text with /api/generate and /api/chat.
  • toolsAccepts tools, so it can call functions.

KV cache by context length

At f16, the default type. This memory comes on top of the weights.

Context (tokens)KV cache
2048112 MiB
4096the default in Ollama's FAQ224 MiB
8192448 MiB
16384896 MiB
32768longest supported1792 MiB

Add the weights in the Local LLM Memory Estimator →

System prompt

You are Qwen, created by Alibaba Cloud. You are a helpful assistant.

License

general.license
apache-2.0
general.license.link
https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/LICENSE
Apache License
...

KV cache = 2 × layers × KV heads × head size × 2 bytes (f16) × context length. The values matched Ollama's log in our tests. Ollama's FAQ says q8_0 uses about half and q4_0 about a quarter of f16 (set with OLLAMA_KV_CACHE_TYPE, with Flash Attention).

The longest context is what the model supports, not what Ollama uses. Ollama's FAQ gives 4096 tokens as the default; num_ctx in a request or in the model, or OLLAMA_CONTEXT_LENGTH on the server, changes it.

Fields from Ollama's API reference and source code (v0.40.15), checked against Ollama 0.40.11 on 2026-11-07. Ollama: Show model details

Everything is done in your browser. The tool connects to nothing.

ollama show and the /api/show endpoint describe an installed model, but the most useful facts are spread over a long list of GGUF metadata: the number of layers is <architecture>.block_count, the longest context is <architecture>.context_length, and the attention heads that decide the size of the KV cache are attention.head_count and attention.head_count_kv. This tool reads the JSON from /api/show, or the text of ollama show (the short version or --verbose), and puts those facts in one place. It lists the capabilities with what each one means, using the names in Ollama's source code (v0.40.15): completion, tools, insert, vision, embedding, thinking, image, audio, decision and speech. For thinking models it shows the values that think accepts and the default. It shows the parameters set in the model, such as stop, temperature or num_ctx, the system prompt and the license. From the layers, the KV heads and the head size it computes the KV cache at f16, the default type: 2 (keys and values) × layers × KV heads × head size × 2 bytes × context length. We checked this formula against Ollama's own log: for qwen2.5:7b, 224 MiB at 4096 tokens and 448 MiB at 8192, and for qwen2.5:0.5b, 48 MiB at 4096 and 384 MiB at 32768. The head size comes from attention.key_length when the model has it, and otherwise from embedding_length divided by head_count. Models with a sliding window or with layers that share their KV cache use less than the table shows; the tool says so instead of guessing. We checked the tool with the real output of /api/show, ollama show and ollama show --verbose for qwen2.5:7b on Ollama 0.40.11, and with the example in Ollama's API reference.

The core logic of this tool is open source under the MIT License. github.com/seigo5555/toolkitbox-lib/src/ollama-show.ts

Use Cases

  • Find out whether a model supports tools, images or thinking before you build on it
  • See the longest context a model supports and how much memory the KV cache needs at each length
  • Check the license, the default parameters and the system prompt that come with a model

Usage

  1. Run curl http://localhost:11434/api/show with the model name, or ollama show with --verbose.
  2. Paste the output. The tool detects which of the three forms it is.
  3. Read the model summary, the capabilities and the KV cache table. Open the memory estimator to add the weights.

FAQ

Why is the KV cache not shown for my paste?

The short output of ollama show does not include the layers and attention heads. Paste the /api/show response or the output of ollama show --verbose.

The model supports 32768 tokens. Why does Ollama use fewer?

The context length in the metadata is the longest the model was trained for. Ollama's FAQ says the default context window is 4096 tokens; Ollama's source and server log show that the server chooses a default based on the GPU memory. A request can set num_ctx, the model can set it in its parameters, and the server can set OLLAMA_CONTEXT_LENGTH.

How accurate is the KV cache size?

For models without a sliding window or shared KV layers, the formula gave exactly the sizes in Ollama's log in our tests (224 MiB for qwen2.5:7b at 4096 tokens). It is for the default type f16; Ollama's FAQ says q8_0 uses about half and q4_0 about a quarter, when Flash Attention is enabled.

What is the difference between parameters and the context length?

The context length comes from the model file and is the maximum. Parameters such as num_ctx, temperature or stop are defaults set in the model's Modelfile; requests can override them.

What does template source mean?

It tells where the chat prompt comes from, for example go_template for a Go template in the model or renderer for a renderer built into Ollama. The values are listed in Ollama's API reference.

Is my data sent anywhere?

No. The output is read in your browser.

Related articles

Related