Range plot of cosine scores for 16 paraphrase and 16 one-token-change memory pairs on three local encoders. On every encoder the highest-scoring critical pair sits above the highest-scoring paraphrase, so a single threshold cannot separate duplicates from facts that must not be merged.

A 0.95 Memory Dedupe Threshold Merged Production Into Staging

Your agent memory layer writes a fact the same way a semantic cache writes an answer: embed the incoming record, compare it with what is already stored, and skip the insert if the cosine similarity clears a threshold. The number that circulates for that threshold is 0.92–0.95. This site’s own backend guide recommends exactly that band for semantic caching, with a code default of 0.93, and the advice transfers into memory layers by copy-paste because the code shape is identical. ...

November 24, 2026 · 16 min · baeseokjae
Horizontal dot plot of 13 measured qwen3:0.6b /api/chat wall times on a 2-core CPU box, one row per call in three groups (1, 4 and 8 tools); filled blue circles are the 7 calls that returned create_ticket with a valid title and priority (done_reason=stop), filled orange squares are the 6 calls that returned no tool call under the 128-token budget (done_reason=length); each marker is labelled with its own wall time in seconds.

Qwen3 0.6B as an Agent Tool Router: 13 CPU Calls, 10-94 s Each

The smallest Qwen3 checkpoint is 0.6B parameters and fits on a CPU in under a gigabyte of memory. That makes it tempting as the cheap routing layer of an agent: hand it eight tool definitions, let it pick create_ticket, let a bigger model do the actual work. Two numbers decide whether that idea survives contact with a real agent loop - how often it picks the right tool, and how long one call takes - and neither is on the model card. ...

November 24, 2026 · 10 min · baeseokjae
Conceptual checklist for similarity cutoffs: Constraint query, then Similarity score, then Threshold decision. Check whether a cutoff hides a required constraint.

Agent Memory Cutoffs Can Hide Constraints: Test Before You Tune

Your memory pipeline ends with a score gate: keep rows at or above 0.7 cosine similarity, drop the rest. You tuned that number on topical questions and it looked fine. Then someone asks “May I deploy to production on Friday?” and the agent retrieves nothing — not the wrong thing, nothing — because the one stored sentence that should have stopped the deploy scored 0.660. That is the measurement in this article, scoped to what was actually run. On a 12-fact synthetic fixture with two local Ollama embedders, the prohibition “Deployment to production on Fridays is prohibited for all teams.” scored 0.660 against “May I deploy to production on Friday?” under all-minilm:latest. The two descriptive facts in the same fixture scored 0.764 and 0.773 for their own questions. A 0.7 gate therefore keeps the descriptions and deletes the rule, and the ordering reverses on the second embedder — the same prohibition scores 0.949 under snowflake-arctic-embed:33m. The safe cutoff is a property of the encoder, not of your application. ...

November 14, 2026 · 11 min · baeseokjae

Ollama Tool Definitions Are Not Free: The Measured Prompt-Token Cost of Every Tool You Register

You register twelve tools on a local agent, send a six-word message, and prompt_eval_count comes back at 764 instead of 18. Nothing is wrong: the definitions you sent are part of the prompt, and on a 4k default context that registry has already spent 746 of your 4096 tokens before the conversation starts — and it re-pays that cost on every turn. This article measures the cost instead of estimating it. One model, one fixed message, one local server, tool sets of 0, 1, 3, 6 and 12 definitions in a deliberately terse form, and sets of 1, 3 and 6 in a deliberately verbose form, three repeats per cell, with the raw request and response records published next to the script. ...

November 12, 2026 · 11 min · baeseokjae

What You Actually Pulled: Reading Quantisation, Parameter Count and Context Out of an Ollama GGUF File

You pulled a tag. The download is 18.99 GiB for a model the card calls 31B. The agent that needed long history behaves as if it had a fraction of the context the card advertises. The quality does not match the benchmark chart that made you choose the model in the first place. None of those three surprises is a property of the model. All three are properties of the artifact: which quantisation the tag actually resolved to, how many bits per weight that quantisation really costs, and which metadata value declares the context this particular build was made for. ...

November 6, 2026 · 14 min · baeseokjae

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
Skadoosh Voice Agent Review: A Fully Local Rust Voice Framework (and a 404 Problem)

Skadoosh Voice Agent Review: A Fully Local Rust Voice Framework (and a 404 Problem)

Skadoosh is a dual-licensed (MIT OR Apache-2.0) Rust crate that runs a complete voice agent on your own machine: cpal microphone capture, Silero VAD, whisper-rs speech recognition, a streaming Ollama LLM, clause-level splitting, and ONNX Kokoro-82M text-to-speech back out through your speakers — with no API keys and no network calls. It is the most feature-complete all-local Rust voice agent published to crates.io, and it is also effectively unmaintained, because its documented GitHub repository returns HTTP 404. ...

October 1, 2026 · 19 min · baeseokjae
AI Coding at Home Without Going Broke: Local and Cloud Budgeting

AI Coding at Home Without Going Broke: Local and Cloud Budgeting

For an individual developer, the lowest-risk starting point is usually the computer and accounts already available. First check whether a limited free plan or a small local model completes useful tasks. Buy additional hardware only after a repeatable workload demonstrates why it is needed. This guide uses a transparent budget example. It does not report a local-model speed benchmark or claim that a free download means cost-free operation. Choose the first experiment Situation First experiment Evidence needed before spending more Occasional coding help Existing limited free access Whether your normal tasks fit its allowance A machine with spare memory A local model on a small task Actual memory use, latency, and accepted result Frequent complex repository work A capped paid trial Cost and review effort per accepted task Sensitive code Check the entire data path Which components send code or metadata externally Keep a cash ceiling and a stopping rule. If the tool cannot complete a representative task after the agreed attempts, record the failure instead of repeatedly upgrading the environment until it works. ...

August 2, 2026 · 4 min · baeseokjae
Deploy Llama 4 with vLLM and Ollama: Scout vs Maverick Setup Guide

Deploy Llama 4 with vLLM and Ollama: Scout vs Maverick Setup Guide

If you want Llama 4 in production, start by matching hardware, concurrency, and context requirements before model size. In most teams, Scout is the first stable bet: faster startup, cheaper memory, and smoother local iteration, while Maverick becomes the right move when you need the bigger context and reasoning headroom under higher traffic. The path that works is not “which product is better,” it is “which constraint profile is cheaper to satisfy this quarter.” ...

June 12, 2026 · 17 min · baeseokjae
Ollama API Guide: Run Local LLMs with REST API and OpenAI-Compatible SDK

Ollama API Guide: Run Local LLMs with REST API and OpenAI-Compatible SDK

Ollama is an open-source local LLM runtime that exposes a REST API on http://localhost:11434, letting you run Llama 4, Qwen3, DeepSeek R1, Gemma 4, and 4,500+ other models entirely on your machine — with zero per-token cost and no data leaving your network. The OpenAI-compatible /v1/ layer means most existing SDK code works after a one-line base_url change. Why Local LLMs Went Mainstream in 2026 Local LLM adoption crossed a meaningful threshold in 2026, driven by economics, privacy regulation, and dramatically improved model quality in small footprints. Ollama surpassed 170,000 GitHub stars — the most starred local LLM runtime project on the platform — and monthly downloads grew from 100K in Q1 2023 to 52 million in Q1 2026, a 520x increase in three years. The stat that matters most for developer decision-making: 42% of developers now run at least some LLM workloads entirely on local machines, up from single digits in 2023. The economic case is straightforward — a team of five developers can spend $3,000–$30,000 in cloud LLM API costs over a three-month development cycle before shipping a single production feature. Local inference eliminates that cost entirely during the iteration phase. HuggingFace now hosts 135,000 GGUF-formatted models optimized for local inference, up from just 200 three years ago, giving developers access to a deep catalog. For regulated industries — healthcare, finance, government — local deployment isn’t just economical, it’s frequently mandatory: patient data, financial records, and classified documents cannot traverse cloud APIs. Ollama handles this by design. ...

June 2, 2026 · 16 min · baeseokjae