Reading an Ollama Model's Quantization and Size From Its Registry Manifest

You ran ollama pull qwen3:32b and got a model file of about 20.2 GB, or 18.8 GiB. A nominal 32-billion-parameter model needs 64 GB for bf16 weights alone. The downloaded model file is about 31.6% of that nominal baseline, not one-fifth. The tag says 32b, but it does not spell out the quantization recipe. You can check the registry’s declared quantization and file sizes before downloading model-weight blobs. An Ollama manifest lists layers and byte sizes; its small config blob supplies file_type. Turning those bytes into bits per weight takes another step: the parameter count must describe the tensors in the same file. ...

November 3, 2026 · 11 min · baeseokjae
Conceptual checklist for an embedding model change: 1 Encoder identity, 2 Vector dimensions, 3 Retrieval checks. Matching dimensions alone do not mean matching spaces.

Changed Your Embedding Model? Check for Silent Retrieval Errors

An agent memory store can survive an embedding-model change while quietly returning the wrong fact. Nothing in the stack raises, because nothing in the stack compares the encoder that wrote a vector with the encoder that now reads it. In a 40-document fixture with 15 single-answer queries, one encoder on both sides ranked the labelled document first for 15 of 15 queries. Replacing the document encoder with a different model of the same width dropped that to 1 of 15, and no call failed. Replacing it with a model of a different width failed all 15 queries with a length error — the loud case, and the easy one. ...

November 2, 2026 · 12 min · baeseokjae

The Chat Template or a Built-in Parser Decides Whether Ollama Gives You a Tool Call

You pass a tools array to /api/chat, the call fails, and nothing in the response explains why. On ollama 0.20.3 the failure is a bare HTTP 400 whose message is registry.ollama.ai/library/<model>:latest does not support tools, which names the model and points at the wrong layer. On a server old enough to have no tools field in its chat request at all — v0.2.0 and earlier — that JSON key is dropped unread, so the same call returns HTTP 200 with a prose answer and no tool_calls field, and the client reports “the model ignored the schema”. ...

November 2, 2026 · 11 min · baeseokjae
Conceptual checklist for context compaction: Original transcript, then Compressed summary, then Fact retention probes. Compare retained facts, not just summary fluency.

Agent Context Compaction: What Gets Lost—and How to Test It

An agent works for two hours. The harness compacts the transcript, the run continues, and somewhere in the next twenty turns it re-runs a migration it has already run, asks the user for a value the user typed an hour ago, or refactors a file it was explicitly told not to touch. Nothing in the run log marks the turn where that fact disappeared. The summary reads fluently, the task still finishes, and the only trace of the loss is work the agent repeats. ...

November 2, 2026 · 11 min · baeseokjae
Conceptual diagram: two agent sessions send HTTP requests to one Ollama server process, whose parallel slots decide what runs and whose queue holds the rest in arrival order; the client only sees per-request wall time, the sum of queue wait and execution. Documentation-scoped schematic for a 2-vCPU CPU host, not a measurement chart.

Two Agents, One Ollama Server: Why Requests Slow Down

Your first coding-agent session answers in a couple of seconds. You open a second one against the same local server, and now the first session’s next request stalls for many seconds, or your client aborts with a read timeout while the server log shows no error at all. Restart the server and run one session: everything is fast again. Nothing is wrong with the model or with either agent. Both sessions are sending requests to one server process that was never configured to work on more than one at a time, and the queue between them is invisible to your client. This article shows the documented defaults that decide how many requests a local server will actually run at once, measures what the second and fourth session do to wall time on a small CPU host, and lists what to record so you can prove the cause instead of guessing. ...

November 2, 2026 · 13 min · baeseokjae
Conceptual checklist for memory deletion scope: Vector entry, then History records, then Read-back checks. A delete response does not prove every copy is gone.

Does Deleting Agent Memory Remove Its History? A mem0 Check

A team tells a customer, or answers a data-protection questionnaire, that a fact can be removed from its agent’s memory. The store accepts the delete — by id, by metadata filter, or through a natural-language “forget this” tool — and returns a success message. Nobody runs a recall afterwards. Weeks later the assistant mentions the fact again, or an auditor asks how you proved it was gone and the honest answer is that you watched a return code. ...

November 1, 2026 · 13 min · baeseokjae
Three-part memory budget labelled Model weights, KV cache and Runtime overhead, with the footnote that the model file is only one part of it.

Local LLM Memory: Why an 18GB Model Needs More Than 18GB

You download a 4-bit quantised model, the file is roughly 18 GB, you have 24 GB of VRAM, and the arithmetic looks settled. Then the agent session gets long, the server either dies or quietly starts answering with a fraction of the context you asked for, and the model that “fit yesterday” no longer fits. The missing term is the key/value cache. It is not in the GGUF file, it is not on the model card, and it is allocated by the runtime at load time from the context length you set — not from the number of tokens you happen to send. On the 12 GB CPU box used for the measurements below, the same 0.5B model occupied 417 MB of reported model memory at a 2,048-token context and 794 MB at 32,768, with an identical file on disk. ...

November 1, 2026 · 9 min · baeseokjae
Conceptual checklist for tool-call retries: Timeout observed, then Commit state unknown, then Stable request identity. A timeout does not establish whether the action happened.

Agent Tool Retries: How Duplicate Actions Happen

An agent loop calls a tool that files a ticket, posts a review comment, or inserts a row. The call stalls and the client gives up at its timeout. The loop does what every retry wrapper does: it tries again. Nobody in that loop knows whether the first attempt reached the database, so the second attempt may be the first real write or the second one. When it is the second, the user sees a duplicate comment under a single logical step, and the token meter shows one step because the meter counts steps, not executions. ...

November 1, 2026 · 11 min · baeseokjae
Comparison from the article's local test: model parameters requested 8,192 tokens, while the loaded runner and long-input evaluation used 2,048. This is not a universal model limit.

Ollama Embeddings: Diagnose Silent Context Truncation

If your agent’s memory is written through a local embedding endpoint, the context window that decides what gets remembered is not the one printed on the model card. On the machine used for this article, Ollama 0.20.3 allocated 2,048 prompt tokens to nomic-embed-text:latest while the installed model’s own parameters said num_ctx 8192, and it accepted a 64,599-character document with HTTP 200 by silently evaluating only the first 2,048 tokens. The number that governs your ingest never appears in the embedding call, the client library, or the config file you wrote. It appears in ollama ps. ...

November 1, 2026 · 11 min · baeseokjae
Diagram in two panels. Panel 1: an HTTP 404 not_found_error response and Ollama's 'model not found' string classify as model_unavailable, marked stop, with the note that the same bytes cover a retired ID and a typo; HTTP 429 classifies as rate_limit, and HTTP 500, 502, 503, 504 and 529 classify as transient, both marked retry. Panel 2: bar chart from the frozen fixture showing retry_all spending 3 server requests on both model_unavailable and transient rows, against 1 and 3 for no_retry_4xx.

Model Retirement Errors: Why 'Model Not Found' Is Permanent and Your Retry Loop Cannot Tell

An agent pipeline pins a model identifier and the provider retires it. From that moment every call fails with an error envelope that looks exactly like a typo: a plain HTTP 404 whose message names the request, not the lifecycle. The pipeline retries with backoff, spends its budget on a request that can never succeed, and fails the task with “provider error”. The fix is not a better error message — none of the three providers checked publishes one. It is to stop reading permanence out of the body, decide it from a pinned-ID record plus a published shutdown date, and prove before the next retirement that the retry policy actually stops. ...

November 1, 2026 · 11 min · baeseokjae