MiniCTRM - Build Tutorial 671: Optimizing the local LLM: quick on a laptop, open about what it does, fed the right help
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
A help assistant that runs on a small local model at a usable speed on a laptop - measured against a written baseline, showing its progress, the answer as it is written and a Details log of every step, sending only the best-matching help sections under a character budget held by a retrieval test, with the model picked from what is installed and compared on your own questions - and its rules in CLAUDE.md and the help.
A model on your own machine – Why a local model; tokens, the context window, reading against writing, parameters and quantization, from zero.
Measure first – Install Ollama and two small models, then the four figures for every question and a written baseline.
Show what it is doing – A job the page polls, the answer as it is written, Stop, a Details log closed by default, and the model warmed and kept.
Feed it the right help – Retrieval is the accuracy bug: sections ranked by BM25 with heading boosts, a character budget, markup stripped, fifteen questions as the test.
Pick the model – Measured on a laptop, compared on your own questions, the GPU question, the cache; then the rules, the help and /ship.
How MiniCTRM did it – System Settings → AI Help, and the Ask dialog's Details, as they are.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
A how-to answer behind a spinner
1 / 18A model on your own machine
Why a model on the user's own machine
2 / 18A model on your own machine
Tokens, the context window, reading and writing
3 / 18Measure first
Install Ollama and two small models
4 / 18Measure first
Measure first
5 / 18Show what it is doing
A wait you can see is a wait you can bear
6 / 18Show what it is doing
Show what it is doing
7 / 18Feed it the right help
Retrieval is the accuracy bug
8 / 18Feed it the right help
Feed it the right help
9 / 18Pick the model
Measured on a laptop
10 / 18Pick the model
Pick the model on your own questions
11 / 18Pick the model
The GPU question
12 / 18Pick the model
Warm and cached
13 / 18Pick the model
The rules and the help
14 / 18Pick the model
Ship it
15 / 18How MiniCTRM did it
System Settings → AI Help, as it is
16 / 18How MiniCTRM did it
The Ask dialog's Details, in the help
17 / 18What you have now
What you have now
18 / 18
You have finished lesson 671, Optimizing the local LLM: quick on a laptop, open about what it does, fed the right help.