<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Local LLMs on Mohammad Movahedi</title><link>https://m-movahedi.com/tags/local-llms/</link><description>Recent content in Local LLMs on Mohammad Movahedi</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 05 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://m-movahedi.com/tags/local-llms/index.xml" rel="self" type="application/rss+xml"/><item><title>Local LLMs 209: A Practical Local Agent Stack</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-209-practical-local-agent-stack/</link><pubDate>Fri, 05 Jun 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-209-practical-local-agent-stack/</guid><description>&lt;p&gt;After the tools, models, routers, agents, skills, and MCP servers, it helps to put the pieces into one practical stack.&lt;/p&gt;
&lt;p&gt;The goal is not to build the most complicated local AI system. The goal is to build a workflow you can understand, debug, and improve.&lt;/p&gt;
&lt;h2 id="mental-model-start-local-add-power-only-when-needed"&gt;Mental model: start local, add power only when needed&lt;/h2&gt;
&lt;p&gt;A practical beginner stack has layers:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Layer&lt;/th&gt;
					&lt;th&gt;Default choice&lt;/th&gt;
					&lt;th&gt;Why&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Runtime&lt;/td&gt;
					&lt;td&gt;Ollama or another beginner-friendly local server&lt;/td&gt;
					&lt;td&gt;Gets a model running quickly&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Model&lt;/td&gt;
					&lt;td&gt;Small or medium instruct model&lt;/td&gt;
					&lt;td&gt;Establishes a stable baseline&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;API shape&lt;/td&gt;
					&lt;td&gt;OpenAI-compatible endpoint when possible&lt;/td&gt;
					&lt;td&gt;Works with many clients&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Evaluation&lt;/td&gt;
					&lt;td&gt;Fixed prompt set&lt;/td&gt;
					&lt;td&gt;Prevents vibe-based model choice&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Tools&lt;/td&gt;
					&lt;td&gt;MCP servers or app-native tools&lt;/td&gt;
					&lt;td&gt;Adds controlled access to context&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Instructions&lt;/td&gt;
					&lt;td&gt;Rules, skills, or project notes&lt;/td&gt;
					&lt;td&gt;Makes behavior repeatable&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Hosted fallback&lt;/td&gt;
					&lt;td&gt;OpenRouter or direct provider API&lt;/td&gt;
					&lt;td&gt;Handles tasks local models cannot&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Coding agent&lt;/td&gt;
					&lt;td&gt;Claude Code, Codex, Antigravity, or another tool&lt;/td&gt;
					&lt;td&gt;Handles repository actions and verification&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="llm-diagram-container" id="diagram-209"&gt;
 &lt;div class="llm-diagram-header"&gt;
 &lt;h4&gt;The Practical Local Agent Stack&lt;/h4&gt;
 &lt;p&gt;Click a layer to see when to add it&lt;/p&gt;</description></item><item><title>Local LLMs 208: MCP and How Local LLMs Get Tools and Context</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-208-mcp-how-local-llms-get-tools-and-context/</link><pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-208-mcp-how-local-llms-get-tools-and-context/</guid><description>&lt;p&gt;A local model by itself only sees the prompt you give it. It cannot read your files, inspect GitHub issues, search a database, or check a calendar unless something connects it to those sources.&lt;/p&gt;
&lt;p&gt;MCP, the Model Context Protocol, is one way to standardize that connection.&lt;/p&gt;
&lt;h2 id="mental-model-mcp-is-a-tool-plug"&gt;Mental model: MCP is a tool plug&lt;/h2&gt;
&lt;p&gt;Anthropic&amp;rsquo;s MCP documentation describes MCP as an open protocol that standardizes how applications provide context to LLMs. The common analogy is a standard connector between AI applications and data or tools.&lt;/p&gt;</description></item><item><title>Local LLMs 207: Skills, Rules, Agents, and Subagents</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-207-skills-rules-agents-subagents-local-llms/</link><pubDate>Wed, 03 Jun 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-207-skills-rules-agents-subagents-local-llms/</guid><description>&lt;p&gt;Once you use LLM tools for more than casual chat, you run into a problem: you keep repeating the same instructions. &amp;ldquo;Use this style.&amp;rdquo; &amp;ldquo;Check these files.&amp;rdquo; &amp;ldquo;Run this test.&amp;rdquo; &amp;ldquo;Prefer this source.&amp;rdquo; &amp;ldquo;Do not edit generated files.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Skills, rules, agents, and subagents are different ways of making those instructions reusable.&lt;/p&gt;
&lt;h2 id="mental-model-durable-context-for-repeatable-work"&gt;Mental model: durable context for repeatable work&lt;/h2&gt;
&lt;p&gt;Think of these concepts as layers of reusable behavior:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Concept&lt;/th&gt;
					&lt;th&gt;Beginner meaning&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Rule&lt;/td&gt;
					&lt;td&gt;A standing instruction or constraint&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Skill&lt;/td&gt;
					&lt;td&gt;A reusable workflow with instructions, references, scripts, or assets&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Agent&lt;/td&gt;
					&lt;td&gt;A model-driven worker with tools and a task&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Subagent&lt;/td&gt;
					&lt;td&gt;A specialized helper agent delegated by a main agent&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Project instructions&lt;/td&gt;
					&lt;td&gt;Repo-specific guidance for how work should be done&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;MCP tool&lt;/td&gt;
					&lt;td&gt;A live capability exposed to a model, such as reading issues or querying a database&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="llm-diagram-container" id="diagram-207"&gt;
 &lt;div class="llm-diagram-header"&gt;
 &lt;h4&gt;Durable Context Hierarchy&lt;/h4&gt;
 &lt;p&gt;Click an entity to see its role&lt;/p&gt;</description></item><item><title>Local LLMs 206: Coding Agents</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-206-coding-agents-claude-code-codex-antigravity/</link><pubDate>Tue, 02 Jun 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-206-coding-agents-claude-code-codex-antigravity/</guid><description>&lt;p&gt;A chat model answers questions. A coding agent works inside a software environment. That difference sounds small until the agent starts reading files, editing code, running tests, opening browsers, creating commits, and explaining what changed.&lt;/p&gt;
&lt;p&gt;Claude Code, Codex, and Google Antigravity are examples of agentic coding tools. They do not replace local LLM runtimes, but they show what happens when a model is wrapped in tools, permissions, project context, and verification loops.&lt;/p&gt;</description></item><item><title>Local LLMs 205: Hosted Routers and BYOK: OpenRouter.ai in the Local LLM World</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-205-openrouter-byok-local-llm-world/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-205-openrouter-byok-local-llm-world/</guid><description>&lt;p&gt;Local LLMs are about control. Hosted routers are about reach. At first those sound opposite, but many practical workflows use both.&lt;/p&gt;
&lt;p&gt;OpenRouter is a hosted service that provides access to many models through one API. That makes it useful when you want to compare models, keep one client interface, or fall back to a stronger hosted model when your local machine is not enough.&lt;/p&gt;
&lt;h2 id="mental-model-local-first-hosted-fallback"&gt;Mental model: local-first, hosted fallback&lt;/h2&gt;
&lt;p&gt;A simple hybrid workflow looks like this:&lt;/p&gt;</description></item><item><title>Local LLMs 204: Why the Same Model Is Not Always the Same</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-204-why-the-same-local-llm-is-not-the-same/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-204-why-the-same-local-llm-is-not-the-same/</guid><description>&lt;p&gt;You may see the same model name in Ollama, Hugging Face, LM Studio, OpenRouter, a benchmark table, and a coding tool. Then you try it in two places and it behaves differently.&lt;/p&gt;
&lt;p&gt;This is normal. &amp;ldquo;Same model&amp;rdquo; often hides several layers of difference.&lt;/p&gt;
&lt;h2 id="mental-model-name-checkpoint-format-runtime-provider"&gt;Mental model: name, checkpoint, format, runtime, provider&lt;/h2&gt;
&lt;p&gt;A model name is only the label at the top of the stack. Behavior comes from the whole stack:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Layer&lt;/th&gt;
					&lt;th&gt;Example difference&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Family&lt;/td&gt;
					&lt;td&gt;Qwen, Llama, Gemma, Mistral, DeepSeek, Phi&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Checkpoint&lt;/td&gt;
					&lt;td&gt;Base, instruct, coder, reasoning, distilled, updated release&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;File format&lt;/td&gt;
					&lt;td&gt;GGUF, safetensors, runtime-specific package&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Quantization&lt;/td&gt;
					&lt;td&gt;Q4, Q5, Q8, full precision&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Runtime&lt;/td&gt;
					&lt;td&gt;Ollama, llama.cpp, vLLM, MLX, transformers&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Prompt template&lt;/td&gt;
					&lt;td&gt;ChatML, model-specific instruct format, custom system prompt&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Provider&lt;/td&gt;
					&lt;td&gt;Local machine, OpenRouter route, direct vendor API&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Parameters&lt;/td&gt;
					&lt;td&gt;Temperature, top_p, max tokens, reasoning settings, stop sequences&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="llm-diagram-container" id="diagram-204"&gt;
 &lt;div class="llm-diagram-header"&gt;
 &lt;h4&gt;The "Same Model" Stack&lt;/h4&gt;
 &lt;p&gt;A model name is just the top layer.&lt;/p&gt;</description></item><item><title>Local LLMs 203: Choosing a Model Without Guessing</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-203-choosing-a-local-llm-without-guessing/</link><pubDate>Sat, 30 May 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-203-choosing-a-local-llm-without-guessing/</guid><description>&lt;p&gt;Local model choice can turn into name collecting very quickly. Llama, Qwen, Gemma, Mistral, DeepSeek, Phi, gpt-oss, coder models, reasoning models, small models, giant models, quantized models, preview models: it is a lot.&lt;/p&gt;
&lt;p&gt;The goal is not to memorize every release. The goal is to choose a model with a reason.&lt;/p&gt;
&lt;h2 id="mental-model-model-choice-is-task-fit-plus-hardware-fit"&gt;Mental model: model choice is task fit plus hardware fit&lt;/h2&gt;
&lt;p&gt;A useful model is the intersection of three things:&lt;/p&gt;</description></item><item><title>Local LLMs 202: The Local LLM Toolchain: uv, uvx, Ollama, and Model Files</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-202-local-llm-toolchain-uv-uvx-ollama-model-files/</link><pubDate>Fri, 29 May 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-202-local-llm-toolchain-uv-uvx-ollama-model-files/</guid><description>&lt;p&gt;A local LLM setup can feel messy because several tools appear at once: Python environments, command-line utilities, model downloaders, model runtimes, chat interfaces, and APIs. The trick is to separate the toolchain into jobs.&lt;/p&gt;
&lt;p&gt;For a beginner, four ideas are enough to get oriented: &lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;uvx&lt;/code&gt;, Ollama, and model files.&lt;/p&gt;
&lt;h2 id="mental-model-tools-install-things-runtimes-run-models"&gt;Mental model: tools install things, runtimes run models&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;uv&lt;/code&gt; helps manage Python projects, Python versions, dependencies, and Python command-line tools. Ollama runs language models and exposes them through a local API. A model file contains the model weights and metadata that the runtime needs.&lt;/p&gt;</description></item><item><title>Local LLMs 201: What Runs on Your Machine</title><link>https://m-movahedi.com/scratchpad/local-llms/local-llms-201-what-runs-on-your-machine/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://m-movahedi.com/scratchpad/local-llms/local-llms-201-what-runs-on-your-machine/</guid><description>&lt;p&gt;Local large language models are exciting because they move part of the AI stack onto your own computer. Instead of sending every prompt to a remote service, you download a model, run it through a local runtime, and talk to it from an app, terminal, editor, or API.&lt;/p&gt;
&lt;p&gt;The beginner mistake is to ask, &amp;ldquo;What is the best local model?&amp;rdquo; The better first question is: &lt;strong&gt;what can this machine actually run well enough to be useful?&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>