▣~/runthismodel▍
local AI explorer00:00:00Z
← Local AI: Zero to Hero

CHAPTER 03 OF 12

Identify the exact file and context

Read formats, quantization, hashes and context limits without guessing.

In this chapter

A name is not a file identity

The same model may be distributed in several formats and quantizations by several organizations. A format describes how data is stored. The runtime must also understand the model's architecture and operations. A .gguf extension is therefore useful information, but does not mean every GGUF file runs in every application.

GGUF is used by the llama.cpp ecosystem for model tensors and metadata. Other ecosystems commonly distribute tensors in Safetensors files with separate configuration and tokenizer assets. An MLX package, an Ollama package and a bare GGUF can all refer to the same model family while requiring different loading procedures. Choose the runtime first enough to know what files it actually accepts.

Quantization reduces the precision used for some weights. It can reduce download and memory requirements while changing outputs. A label such as Q4_K_M describes a particular quantization scheme, not a universal four-bit storage ratio or a quality percentage. Mixed precision, tensor choices, architecture and runtime implementation affect the result. Measure whether the artifact still performs your task.

Context is a runtime decision too

A model card may advertise a maximum context, but your runtime can use a smaller configured window. The prompt, conversation history, retrieved text and generated answer all consume context. A long advertised limit does not mean using that limit is practical on a phone.

This book uses a 2,048-token context and caps generated output at 128 tokens in its Python labs. The native prototype also uses a 2,048-token context. Those are explicit test settings. They should not be confused with the publisher's maximum or with a promise that long documents will work unchanged.

When a conversation grows, decide what to retain. Options include truncating old messages with a visible explanation, summarizing while preserving the original records, or retrieving only relevant documents. Silently dropping the instruction or source needed to answer correctly creates failures that can look like model weakness.

Prerequisites

Have the reference model installed through chapter 4 and the companion files extracted. Hashing a large file takes time and reads it from storage; you do not need to locate or copy hidden runtime files to perform the inventory check.

Steps

  1. Inspect the installed package:

export OLLAMA_HOST=127.0.0.1:11435
ollama show qwen2.5:0.5b
python3 rtm_lab.py inventory --output identity.json
  1. Compare manifestDigest with the shared artifact record. The reference package digest is:

a8b0c51577010a279d933d14c2a8ab4b268079d44c5c8830c0a93900f1827c67
  1. Read the preserved manifest. It contains separate layers for the model and other package material. The model layer is 397,807,936 bytes and has this SHA-256:

c5396e06af294bd101b30dce59131a76d2b773e76950acc870eda801d3ab0515
  1. If you download the bare GGUF separately, use shasum -a 256 your-model.gguf on macOS and compare the entire digest. A filename or rounded size is insufficient.

  2. Record the context and output limit beside the artifact. When changing either, create a new run record rather than overwriting the original result.

Expected results

The reference package matches its manifest digest, while its GGUF layer matches a different digest. This is expected. A package includes more than the weights. The book's lab report identifies the package actually requested from Ollama.

Common failures

A mutable tag can change after publication. If a digest differs, do not label the new package as the previously tested file. A renamed ZIP is not a GGUF. A supported format can still contain an unsupported architecture. A context error should lead to a smaller request or explicit configuration change, not an invented claim of successful processing.

Exercise

Describe exactly what you would need to reproduce a run on another machine. Include the artifact, runtime, hardware, operating system, prompt, template or messages, context, sampling settings and rubric. Identify which fields the shared record already supplies.

Sources

See the GGUF specification, Safetensors documentation and Ollama model entry. Format metadata and measured compatibility are separate evidence.