# Local AGI > A book-style guide to running AI models on hardware you own. Volatile numbers live in one data file with an as-of date. Every page is also available as Markdown at its URL plus .md. ## For agents - Every page as Markdown: https://localagi.co/.md - The whole guide in one file: https://localagi.co/llms-full.txt - Search index (titles, summaries, text): https://localagi.co/generated/search.json - Page summaries keyed by slug: https://localagi.co/generated/previews.json - Structured data behind the pages (models, hardware tiers, speed thresholds, facts, glossary, runtimes, apps, quantization levels): https://localagi.co/data/index.json - Sitemap: https://localagi.co/sitemap.xml Numbers that change carry an asOf date. Vendor-reported figures are labelled as such in data/facts.json. ## Start here - [Start here](https://localagi.co/start-here.md): Get a model answering on your own machine in about ten minutes. No vocabulary needed first. - [What is local AI?](https://localagi.co/what-is-local-ai.md): A model is a file. Local AI means that file runs on a computer you own instead of on someone else's server. - [Quick start: pick your machine](https://localagi.co/quick-start.md): Pick the machine you are on and follow that page. Each one gets you from nothing to a working chat in four steps. - [Run your first model on a Mac](https://localagi.co/quick-start-mac.md): Check your memory, install one app, download the model it suggests and say hello. On a Mac with Apple silicon, memory is your whole budget. - [Run your first model on Windows with an NVIDIA card](https://localagi.co/quick-start-windows-nvidia.md): Check your graphics memory, install one app, download the model it suggests and say hello. On a PC with an NVIDIA card, VRAM is your budget. - [Run your first model on Windows without a graphics card](https://localagi.co/quick-start-windows-cpu.md): It runs on the CPU, so pick a small model and expect it to type slower than you read. Check your memory, install one app and say hello. - [Run your first model on Linux](https://localagi.co/quick-start-linux.md): One install command, one pull command, then you are chatting in the terminal. Check your GPU driver first if you have a graphics card. - [Your first ten minutes](https://localagi.co/first-ten-minutes.md): Five prompts to paste that show what a local model is good at, and where it falls over. You will also see your speed in tokens per second. - [Is my computer good enough?](https://localagi.co/is-my-computer-good-enough.md): Probably. With 8 GB of memory you can run a small model at reading speed, and every step up in memory opens a bigger class. - [Where do I go from here?](https://localagi.co/where-next.md): Three doors: use it better, understand it, or build with it. Pick the one that matches why you came. ## Basics of local inference - [Basics of local inference](https://localagi.co/basics.md): After this part you can predict whether a model fits your machine and how fast it will run. You will also know why. - [What is a model, actually?](https://localagi.co/what-is-a-model.md): A model is a file full of numbers called parameters. The B in 8B counts them in billions, and more of them usually means smarter and always means heavier. - [What is a token?](https://localagi.co/tokens.md): A token is a chunk of text, often part of a word. Speed is measured in tokens per second, and human reading speed is the yardstick. - [What happens when I press enter?](https://localagi.co/life-of-a-prompt.md): The model first reads your whole prompt, then writes the answer one token at a time. Reading is limited by compute and writing is limited by memory bandwidth. - [Will the model fit in my memory?](https://localagi.co/memory.md): A model either fits in memory or it does not, and that decides everything else. Budget for the weights, the context and room for the operating system. - [What makes a model fast?](https://localagi.co/what-makes-it-fast.md): Memory capacity decides what fits, memory bandwidth decides how fast it writes, and compute decides how fast it reads your prompt. Most slowness is a bandwidth problem. - [What is quantization?](https://localagi.co/quantization.md): Quantization shrinks a model by storing each number with fewer bits. 4-bit is the usual default and most people never notice the difference. - [How much can the model keep in mind?](https://localagi.co/context-window.md): The context window is the model's working memory, measured in tokens. Many runtimes start it small to save memory, which quietly breaks agents and long documents. - [Should I touch temperature and the other sliders?](https://localagi.co/sampling.md): Mostly no. The defaults that ship with a model are usually right, and there are two cases where changing them helps. - [Why does my model ramble or answer itself?](https://localagi.co/chat-templates.md): Every model expects a specific wrapper around each message, called a chat template. Get it wrong and the model rambles, talks to itself or prints stray tags. - [What are reasoning models, and why are they slow?](https://localagi.co/reasoning-models.md): Reasoning models write out their thinking before they answer. Those thinking tokens cost the same time as answer tokens, so turn thinking off when you do not need it. - [What is a mixture of experts model?](https://localagi.co/dense-vs-moe.md): In a mixture of experts model only a few parts run for each token, so it writes faster than a dense model of the same size. You still need memory for the whole thing. - [Local or cloud: which should I use?](https://localagi.co/local-vs-cloud.md): Local wins on privacy, marginal cost and availability. Cloud wins on the largest models and zero setup, so most people end up using both. ## Models - [Models](https://localagi.co/models.md): Pick a model for a job and a machine without asking a forum. Names, classes, families, licences and how to test one yourself. - [How do I read a model name?](https://localagi.co/reading-model-names.md): A model name packs family, version, size, variant and file format into one string. Once you can split it into parts, every download page makes sense. - [Which size of model do I need?](https://localagi.co/model-classes.md): Open models fall into five classes by size, from small models that run on anything to frontier models that need a cluster. Most tasks top out at the 27 to 31B dense class. - [Which model should I use for my task?](https://localagi.co/choosing-a-model.md): Start from the task, find the smallest class that does it well, then check that class fits your machine. The chooser below does it for ten common tasks. - [Who makes the open models?](https://localagi.co/model-families.md): About a dozen labs release most of the open models people run. Each family has a reputation, a size range and a licence worth knowing. - [Can I use this model at work?](https://localagi.co/licenses.md): Usually yes, but check which of three licence buckets the model sits in. Permissive licences are simple, community and bespoke licences have conditions. - [Where do I download models?](https://localagi.co/where-models-come-from.md): Most models live on Hugging Face, and most apps have their own catalogue on top. Pick the file format your runtime reads, and stick to uploaders you recognise. - [Which quantization should I download?](https://localagi.co/choosing-a-quantization.md): Start at Q4. Go up if it fits with room to spare, and go down only to reach a bigger model class. - [Can local models see, listen and speak?](https://localagi.co/beyond-text.md): Yes. Vision, speech-to-text, text-to-speech, image generation and search embeddings all have good local models, most of them smaller than you would guess. - [How do I test a model for my own use?](https://localagi.co/testing-a-model.md): Leaderboards measure someone else's tasks. Fifteen minutes and ten of your own prompts tell you more. - [Should I fine-tune a model?](https://localagi.co/fine-tuning.md): Probably not yet. Try better prompts, RAG or a bigger model first, and reach for QLoRA only when those run out. ## Hardware - [Hardware](https://localagi.co/hardware.md): Judge any machine for local AI by three numbers, then buy one without regret. Laptops, GPUs, unified-memory boxes and the six tiers. - [How do I judge a machine for local AI?](https://localagi.co/three-numbers.md): Look at three numbers: memory capacity, memory bandwidth and compute. Capacity decides what fits and the other two decide how long you wait. - [What can I run on what I have?](https://localagi.co/what-can-i-run.md): Enter your memory and get the model classes that fit, with a speed band for each. A static table below covers readers without JavaScript. - [Is a Mac good for local AI?](https://localagi.co/apple-silicon.md): Yes, especially for big models, because the GPU can use most of the unified memory. The weak spot is reading long prompts. - [Which NVIDIA card should I get?](https://localagi.co/nvidia-gpus.md): Buy for VRAM first, because a model that spills out of VRAM falls off a speed cliff. A used 24 GB card is still the cheapest way into the mid class. - [Do AMD and Intel work for local AI?](https://localagi.co/amd-and-intel.md): Yes, with more fiddling than NVIDIA. Strix Halo boxes offer a lot of memory, and Radeon and Arc cards work through Vulkan, ROCm or SYCL. - [Are the big unified-memory boxes worth it?](https://localagi.co/unified-memory-boxes.md): They hold models no consumer GPU can, and run dense ones slowly. Pair them with MoE models and they make sense. - [Can I run models without a GPU?](https://localagi.co/cpu-and-npu.md): Yes, on the CPU, slowly. Small models are usable, and a cheap GPU is often a better upgrade than more RAM. - [Which laptop is good for local AI?](https://localagi.co/laptops.md): Memory first, then cooling. A laptop with plenty of unified memory runs serious models, and heat and battery set how long it keeps up. - [What are the six hardware tiers?](https://localagi.co/hardware-tiers.md): Machines for local AI fall into six tiers, from entry laptops to eight-GPU servers. Each card below gives the price band, what runs and measured speeds. - [What should I buy?](https://localagi.co/buying-guide.md): Match the machine to how you will use it, then buy the cheapest thing that clears that bar. The five profiles below cover nearly everyone. - [How do I build a multi-GPU rig?](https://localagi.co/multi-gpu-rig.md): Size the power supply and the circuit first, then lanes, spacing and cooling. Mixed cards work for layer split but slow everything to the weakest card. - [What does it cost to run?](https://localagi.co/power-and-cost.md): Power is cheap per token at home but not free, and idle machines still draw. The calculator below turns watts and electricity price into cost per million tokens. - [Can I run a model on my phone?](https://localagi.co/phones-and-small-devices.md): Yes, small models run on recent phones and single-board computers. Useful for offline and private quick tasks, mostly a party trick for anything else. ## Runtimes - [Runtimes](https://localagi.co/runtimes.md): What is actually executing the model, and how to pick and tune it. From Ollama and LM Studio down to llama.cpp, MLX and vLLM. - [What is a runtime, and what sits under my app?](https://localagi.co/the-stack.md): Your chat app sits on a runtime, which sits on an engine that does the maths on your hardware. Two apps running the same model can differ in speed because their engines differ. - [What is llama.cpp?](https://localagi.co/llama-cpp.md): llama.cpp is the open-source engine under most local AI apps. It reads GGUF files and runs on almost any hardware. - [What is MLX?](https://localagi.co/mlx.md): MLX is Apple's machine learning framework for Apple silicon. On a Mac it is often the fastest way to run a model. - [How do I use Ollama?](https://localagi.co/ollama.md): Ollama runs in the background, keeps a library of models and serves an API on your machine. Watch its default context length, which is too small for agents. - [How do I use LM Studio as a server?](https://localagi.co/lm-studio.md): LM Studio is a desktop app that also runs a local server and a command line. It lets you pick MLX or llama.cpp per model and is free but closed source. - [When do I need vLLM or SGLang?](https://localagi.co/vllm-and-sglang.md): When several people or agents share one model at once. These servers batch requests together and keep throughput high under load. - [What is BaseRT?](https://localagi.co/basert.md): BaseRT is an inference engine from Base Compute for Apple silicon, NVIDIA's GB10 and AMD's Strix chips. It reads its own .base format and serves models through the Superfluid server. - [What other runtimes are there?](https://localagi.co/other-runtimes.md): A dozen more runtimes each fill a niche. One paragraph and one use-it-when line for each. - [How do I call a local model from code?](https://localagi.co/local-api.md): Point any OpenAI-compatible client at your local server with a dummy key. That base URL and a model name is the whole integration. - [How do I make it faster?](https://localagi.co/tuning-for-speed.md): Get the whole model onto the GPU first, because nothing else comes close. After that, the right backend and a right-sized context give the most back. - [How do I benchmark my own setup?](https://localagi.co/benchmarking.md): Measure prompt reading and answer writing separately, warm and cold, with the same prompts every time. Distrust any number that does not state its model file and build. - [Which runtime should I use?](https://localagi.co/choosing-a-runtime.md): Start with a desktop app, move to a background server when you want an API, and drop to the engine when you want control. The table below sorts it by platform and need. ## Apps - [Apps](https://localagi.co/apps.md): Get real work done with a local model. Chat, documents, coding, voice, images and sharing one model with others. - [Which chat app should I use?](https://localagi.co/chat-apps.md): LM Studio is the easiest start, Jan is fully open source and Open WebUI is the one to share with a team. All three are free to use. - [How do I chat with my documents?](https://localagi.co/chat-with-documents.md): The app finds the passages that match your question and pastes them into the prompt. You need a chat model, an embedding model and an app that does the plumbing. - [Can a local model autocomplete my code?](https://localagi.co/coding-autocomplete.md): Yes, and well, because autocomplete wants a small fast model. Aim for suggestions that appear before you have finished the thought. - [Can I run a coding agent on a local model?](https://localagi.co/coding-agents.md): Yes, if the model is in the 27B class or above and the context is set to at least 32K. Below that, agent loops fall apart. - [How do tools and MCP work with local models?](https://localagi.co/tools-and-mcp.md): The model asks for a tool, the app runs it and hands back the result. Reliability jumps near the 30B class, and any model with tools needs a sandbox. - [Can I transcribe and talk to a model locally?](https://localagi.co/voice.md): Yes. Speech-to-text models are small and fast, so meeting transcription and dictation run well on almost any recent machine. - [Can I make and read images locally?](https://localagi.co/images.md): Yes. Image generation needs a decent GPU or a Mac with memory to spare, and vision models read screenshots and documents on modest hardware. - [Where else can I use a local model?](https://localagi.co/everywhere-else.md): Anywhere an app has a custom OpenAI endpoint field. Notes apps, browser extensions, home automation and the terminal all qualify. - [How do I share one model with my household or office?](https://localagi.co/sharing-a-model.md): Run the model on your strongest machine and reach it from the others over the local network. To reach it from outside, use a private overlay network, never an open port. - [Is local AI actually private?](https://localagi.co/privacy-and-security.md): The model runs on your machine, but the app around it may still phone home. Check telemetry, keep servers off the open network and treat tool use with care. ## Serving and distributed inference - [Serving and distributed inference](https://localagi.co/serving.md): Serve a team, and know when a second machine helps and when it does not. Batching, team servers, clusters and the economics. - [What changes when many people use one model?](https://localagi.co/one-user-to-many.md): Each person gets a little slower, but the machine as a whole gets much faster, because requests are batched. Size the server by users, requests per minute and tokens per request. - [How do I set up a team server?](https://localagi.co/team-server.md): Pick hardware, pick a serving runtime, put authentication and a proxy in front, then give colleagues a friendly front end. Monitor it and keep it updated. - [How do several GPUs in one box work together?](https://localagi.co/multi-gpu.md): Layer split gives you more memory at about the same speed. Tensor parallel gives more speed but needs fast links between cards and a runtime built for it. - [Why would I use more than one machine?](https://localagi.co/why-distribute.md): A second machine adds memory, not speed. Cluster when the model will not fit in one box, or when you need to serve more people. - [What are the ways to split work across machines?](https://localagi.co/three-ways-to-cluster.md): Request spreading, layer split and tensor parallel. They raise throughput, capacity and speed respectively, and only tensor parallel needs a very fast link. - [Which cable do I need between machines?](https://localagi.co/interconnects.md): For layer split almost any wired network works. For tensor parallel the link is everything, and RDMA over Thunderbolt 5 or fast Ethernet is the entry ticket. - [Which tools run a model across machines?](https://localagi.co/cluster-tools.md): Superfluid joins your machines into one endpoint that serves many users, and exo, llama.cpp RPC, MLX distributed and vLLM multi-node split one model across machines. Pick by what you own and what you need more of. - [What does a real cluster look like?](https://localagi.co/cluster-examples.md): Four worked builds, from two Macs over Thunderbolt to a mixed household. Each has a parts list, setup steps, expected speed and what went wrong. - [When should I not cluster?](https://localagi.co/when-not-to-cluster.md): If the model fits in one 128 GB-class box, use one box. If it does not, price one bigger machine before buying cables. - [When is local cheaper than an API?](https://localagi.co/economics.md): It depends almost entirely on how busy you keep the machine. The calculator below finds your break-even with every assumption visible. - [Who needs an eight-GPU server?](https://localagi.co/on-prem-servers.md): Teams serving many users at once, or running the largest open models at full precision. Most others are better served by a workstation tier. ## Troubleshooting and reference - [Troubleshooting and reference](https://localagi.co/troubleshooting.md): Find the fix in under a minute. Symptoms first, then the glossary, cheat sheets and FAQ. - [Why is it slow?](https://localagi.co/it-is-slow.md): Usually the model is not fully on the GPU, the context is huge, or a reasoning model is thinking. The tree below finds which in five questions. - [Why won't it load?](https://localagi.co/out-of-memory.md): It ran out of memory. Try a smaller quantization, then a smaller context, then a smaller model, in that order. - [Why is the output nonsense?](https://localagi.co/nonsense-output.md): Most often a wrong chat template. After that, an over-squeezed quantization, odd sampler settings or a broken upload. - [Why does my agent forget things or fail tool calls?](https://localagi.co/agent-failures.md): The context is too small, the model is too small for tools, or the tool format does not match. Check them in that order. - [Why is my GPU not being used?](https://localagi.co/gpu-not-used.md): Usually a driver, a wrong backend build or a model too big for VRAM. Here is how to check and fix it on each platform. - [Glossary](https://localagi.co/glossary.md): Every term used in this guide, one line each. Each one links to the page that explains it. - [Cheat sheets](https://localagi.co/cheat-sheets.md): The memory rule, the speed thresholds, default ports and the ten commands you will actually use. One screen each. - [Frequently asked questions](https://localagi.co/faq.md): Short answers to the questions people ask first. Privacy, work use, the web, dates, subscriptions and the closest open model to the big ones. - [How is this guide kept current?](https://localagi.co/how-this-guide-is-kept-current.md): Every page carries the date a human last checked it. Volatile numbers live in shared data files with their own as-of dates, so one update fixes every page. ## Tools - [Tools](https://localagi.co/tools.md): Interactive pages that answer sizing questions with your own numbers. Each one has a static table for readers without JavaScript. - [Will it fit?](https://localagi.co/will-it-fit.md): Pick a model size, a quantization and a context length to see the memory it needs. The result shows which common machines can hold it. - [How fast is fast?](https://localagi.co/how-fast-is-fast.md): Watch text stream at different speeds and feel the thresholds yourself. It is the quickest way to learn what a speed number means. - [What does a million tokens cost me?](https://localagi.co/cost-calculator.md): Enter hardware price, power draw, electricity price, hours of use and speed to get cost per million tokens. Every assumption is editable.