Fitfile + context + OS, with a few gigabytes freeOuta command that fits this machine
Contents in reading order
Start with a first command, then match a model to your memory, then pick a runner, then wire an agent or RAG. Every command is copy-paste. File sizes come from official download pages, not from a stopwatch.
Install Ollama, run one model, then talk to it from the terminal or from Python. You can change the runner later. The model files stay on this computer.
1
Install Ollama on macOS or Linux with the official script, or on Windows with the official PowerShell command. You can also download the app from the Ollama site.
2
Run a first model. On 8 GB of GPU memory, start with Gemma 4 E2B. On 12 GB or a 16–24 GB Mac, start with Gemma 4 12B. On 16 GB or more, gpt-oss 20B is the official small reasoning pick.
3
Chat in the terminal once the download finishes. Then call the same model from Python on port 11434 if you want it inside a bot or an editor.
4
Keep the server on localhost. Do not forward port 11434 to the public internet. If you want a browser UI, put Open WebUI in front and leave the engine bound to this machine.
macOS / Linux
curl -fsSL https://ollama.com/install.sh | sh
Windows PowerShell
irm https://ollama.com/install.ps1 | iex
terminal
ollama run gemma4:12b
terminal
ollama run gpt-oss:20b
Downloads: ollama.com/download. After install, ollama ps shows whether the model is on the GPU or spilling to system RAM.
02 · hardware
Your machine
Pick a model by memory, not by parameter count. The download size is the weight file. Runtime memory is that file plus the context window (the KV cache), plus the operating system. A comfortable fit leaves a few gigabytes free.
How to check. Windows: Task Manager → Performance → GPU → Dedicated GPU memory. Mac: Apple menu → About This Mac → Memory (this is unified memory, shared with the system). Linux with NVIDIA: nvidia-smi. No discrete GPU: use system RAM and a small model, or run llama.cpp on the CPU.
The filter below uses official download sizes, plus 3 GB of headroom on NVIDIA and 8 GB on a Mac or on CPU (room for the OS and a short-to-medium context). A longer context needs more. Official memory floors, when the publisher states one, replace that rule. Mixture-of-experts models can keep unused experts in system RAM, so a file a bit over the card size can still run, just more slowly.
Machine
Comfortable first models
Usually tight
NVIDIA 8 GB
Gemma 4 E2B. A short context only.
Gemma 4 12B at Q4 leaves almost no room for context.
NVIDIA 12 GB
Gemma 4 12B, Gemma 4 E4B.
14–19 GB downloads, unless you spill to RAM.
NVIDIA 16 GB
gpt-oss 20B (official floor: 16 GB). Gemma 4 12B with a long context.
18–20 GB dense files; MoE can offload experts to RAM.
The 24 GB set at a higher quant, or a longer context.
gpt-oss 120B still wants about 60 GB.
Mac 16 GB unified
Gemma 4 E2B or E4B. Leave room for macOS.
12B can load and then starve the system.
Mac 24–32 GB
Gemma 4 12B, gpt-oss 20B, then 18 GB models if the system still has headroom.
Dense 27–31B plus a long context.
Mac 64 GB
The 24 GB set with comfort. gpt-oss 120B meets its official 60 GB floor.
The 480B coder, which wants 250 GB.
Mac 128 GB
gpt-oss 120B with room to spare. Large MoE files if they fit the remaining memory.
Anything whose file plus OS still overflows.
CPU only
Gemma 4 E2B or E4B, with enough system RAM for the file plus about 8 GB.
Anything large. It will run; it will be slow.
On Apple Silicon, memory is unified, and macOS keeps a share for the system. If a model “fits” in RAM but will not stay on the GPU, raise the GPU memory limit in the runner, or the macOS GPU wired limit. Intel Macs have no useful GPU path for this; expect CPU speeds. On NVIDIA, install the current driver and check nvidia-smi before you blame the model.
03 · weights
Quantization
Quantization stores weights in fewer bits so the file fits. Quality usually holds at 4-bit for chat and coding. Drop lower only when the file will not fit. The format you pick has to match the runner.
GGUF
The llama.cpp format, also used by Ollama, LM Studio and Jan. The usual first file is Q4_K_M. Q5_K_M and Q6_K cost more memory for a smaller quality gap. Q8_0 is close to the original. IQ and UD files are smaller at the same bit width. Q2 and Q3 are for machines that cannot hold Q4.
MLX
Apple’s array framework for Apple Silicon. 4-bit is the usual local default; 8-bit and fp16 exist when you have the memory. Ollama ships -mlx tags for some models. You can also run mlx-lm against models from the mlx-community org on Hugging Face.
AWQ
Activation-aware weight quantization, common with vLLM and SGLang on NVIDIA. You load a published AWQ repo, not a GGUF. Use it when you want a high-throughput OpenAI-compatible server on a Linux GPU box.
EXL2
ExLlamaV2’s variable-bitrate format, NVIDIA only. You pick a bits-per-weight (for example 4.0 or 5.0) and serve the files with TabbyAPI or a compatible loader. It is a speed path, not a Mac or CPU path.
MXFP4
The official quant on gpt-oss. The MoE weights, most of the model, are stored at 4.25 bits per parameter. Ollama and the official tools run this format natively. There is no second official quant for these two models.
What to leave free
A 4-bit file is not the whole memory bill. The KV cache grows with context length and batch size. If a model loads and then slows to a crawl, the cache is spilling to system RAM. Shorten the context, use a cache quant if the runner offers one, or pick a smaller file.
04 · software
Runners
Start with one app. Everything below speaks an OpenAI-compatible API, so you can swap the engine later without rewriting the client.
Ollama
macOS, Windows, Linux · port 11434
The easiest start. A CLI, an app, and a local API. Model tags are one line. On Apple Silicon, some models also have an -mlx tag.
A desktop app with a model browser, a chat, and a local server. Uses MLX on Apple Silicon and llama.cpp elsewhere. Start here if you want a GUI and no terminal.
Linux + NVIDIA first · port 8000 · also vLLM-Metal on Mac
A high-throughput server for a dedicated GPU box. Install with uv, then vllm serve a Hugging Face repo. Apple Silicon uses the separate vLLM-Metal path and MLX weights.
Accounts, chat history and document upload in front of Ollama, llama-server, LM Studio or vLLM. Bind the engine to localhost and let only this UI listen on the network.
llama-server prints the URL it bound to. Current builds default to 127.0.0.1:9931. Open WebUI is then at http://localhost:3000. Do not publish ports 11434, 9931, 1234 or 8000 on the public internet.
05 · weights to start with
Models by job
These are current official open weights, checked on 29 Nov 2026. File sizes are the official Ollama downloads. Use the catalog below to filter by memory. No speed claims, no invented ranks.
Coding and agents
codingagentsmoe
Qwen3-Coder 30B
Qwen · 30B total, 3.3B active · download 19 GB · context 256K, extendable to 1M · Text · Apache 2.0
A coding MoE trained for long repository work. The usual first pick when the job is code and you have about 24 GB.
A compact dense model for coding, long agent jobs and image or video input. Thinking can be turned off per request. On a Mac, try the MLX tag qwen3.8:27b-mlx.
Vision and audio notes: Gemma 4 E2B, E4B and 12B take text, image and audio. Gemma 4 26B and 31B, Qwen3.8 27B, Qwen3.6 and Muse Glimmer take text and image (Qwen3.8 also lists video). gpt-oss and Qwen3-Coder are text only. For a 60 GB+ machine, gpt-oss 120B is the official large reasoning model. The 480B Qwen coder wants 250 GB and is listed in the catalog, not here.
06 · filter
What fits your memory
Choose a machine, then a size. The list hides models whose official download (or official memory floor) does not fit the comfortable-fit rule above. MoE models stay visible if the file is only a little over, because experts can sit in system RAM.
What computer do you have?
Dedicated GPU memory
Unified memory
System RAM
Nothing in this list is a comfortable fit at that size. Pick a smaller model from the edge group, or raise the memory tier.
A compact dense model for coding, long agent jobs and image or video input. Thinking can be turned off per request. On a Mac, try the MLX tag qwen3.8:27b-mlx.
Most chat models will refuse some prompts. You can run a build that has those refusals reduced, on your own computer, with the same runners as above. You are responsible for how you use the model and for what you do with its output, including the law and the base model’s licence. Do not ship one of these to other people without your own safeguards.
Abliteration
Refusals in many chat models sit along one direction in the weights. Abliteration measures that direction and removes it, with no extra training. The rest of the model is meant to stay close to the original. The best-known publisher of these copies is huihui-ai, with repos named Huihui-*-abliterated.
Heretic
Heretic automates abliteration and searches for settings that cut refusals while staying close to the original, usually reported as a KL divergence on harmless prompts. Newer builds use Arbitrary-Rank Ablation (ARA). Heretic cards usually publish a refusal count and that KL figure, which makes two builds comparable.
Fine-tunes
A fine-tune retrains the model on new data. It can change style and knowledge, not only refusals, and it can drift further from the base model than an abliteration. Read the card before you treat it as “the same model, uncapped.”
How to pull a GGUF
If a build is on Hugging Face but not in the Ollama library, you can still run the GGUF through Ollama with ollama run hf.co/org/repo:Q4_K_M, or serve the file with llama.cpp. Always take the exact repo name and quant from the card, and leave memory for the context window.
uncensoredcodingvisionreasoningdense
Qwen3.8 27B abliterated
huihui-ai · 27B dense, abliterated · download 18 GB · context 256K · Text, image · Follow the base model card
An abliterated copy of Qwen3.8 27B. Refusals are reduced; the rest of the model is meant to stay close to the original, including vision.
kldzj · built from google/gemma-4-E4B-it · file size is on the model card
A Heretic v2 ARA build of Gemma 4 E4B. Built for laptops and 8–12 GB cards. The GGUF files and the published refusal / KL figures live on the model card.
terminal
ollama run hf.co/kldzj/gemma-4-E4B-it-heretic-GGUF:Q4_K_M
Once a model is serving on localhost, point a coding agent at that API. The repo never has to leave the machine. Pick a model with tool use and a long context; Qwen3-Coder 30B, Qwen3.8 27B and Muse Glimmer are the usual official starts.
Ollama Launch
Ollama can start a coding agent against a local tag in one line: Claude Code, OpenCode, Hermes Agent or OpenClaw. The model stays on this computer.
A VS Code agent that asks before it edits. Install it from the VS Code Marketplace, then add an OpenAI-compatible provider pointed at http://127.0.0.1:11434/v1 (Ollama) or your llama-server / LM Studio port.
A terminal agent that already talks to Ollama and to other OpenAI-compatible endpoints. You can start it from Ollama Launch, or install it on its own and set the base URL to localhost.
Continue was acquired and the public project stopped in 2026. Use one of the tools above for a new setup. Whatever you pick, keep the engine on 127.0.0.1 and review diffs before you commit.
09 · your files
RAG
Retrieval-augmented generation means the model reads chunks of your documents before it answers. The usual local path is: a folder of files, an embedding model on the same machine, a local chat model, and a UI that keeps both offline.
Open WebUI
Upload documents in the knowledge or workspace settings and chat against them through whatever local engine you already run. Check the web-search toggle before you assume a session is offline.
A desktop app or a Docker deploy made for private workspaces and document chat. Point it at Ollama, llama-server or LM Studio, and keep the workspace on this disk.
Embeddings take memory too. If the chat model already fills the card, run a small embedding model, or put embeddings on the CPU. Do not paste secrets into a UI that has a cloud provider or web search still enabled.
10 · from code
The local API
Ollama, llama-server, LM Studio, vLLM, Jan and TabbyAPI all speak the OpenAI Chat Completions shape. Point the official Python SDK at localhost. The API key can be any string; the server on your machine does not bill you.
python
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:11434/v1",
api_key="local",
)
response = client.chat.completions.create(
model="qwen3.8:27b",
messages=[
{"role": "user", "content": "Outline a local RAG setup for a private repo."},
],
)
print(response.choices[0].message.content)
python
from openai import OpenAI
# llama-server defaults to 127.0.0.1:9931
client = OpenAI(
base_url="http://127.0.0.1:9931/v1",
api_key="local",
)
response = client.chat.completions.create(
model="local",
messages=[{"role": "user", "content": "Summarise this function."}],
)
print(response.choices[0].message.content)
LM Studio’s server is usually http://127.0.0.1:1234/v1. vLLM is http://127.0.0.1:8000/v1. Use the model name the engine expects (an Ollama tag, or the name llama-server printed when it loaded the file).
The weights stay on this computer
A local model does not need a cloud key, a usage cap or a signup. Prompts, repo files and chat history stay on the disk you already have, as long as you leave web search and hosted providers off. That is the whole point of the setup.
11 · practice
A week of practice
One setup, used every day, beats five apps you abandon. This is a plain schedule, not a promise about quality.
Day 1
Install Ollama. Run Gemma 4 12B or E4B, or gpt-oss 20B if you have 16 GB. Have a real conversation in the terminal.
Day 2
Pick a second model for the work you actually do: Qwen3-Coder or Qwen3.8 for code, Muse Glimmer for an agent, a vision tag if you need screenshots.
Day 3
Put Open WebUI or LM Studio in front so you have history, or stay in the terminal if that is already enough.
Day 4
Point Aider, Cline, OpenCode or Ollama Launch at localhost and let it touch a throwaway repo first.
Day 5
Load a folder of your own documents in Open WebUI or AnythingLLM. Ask questions you already know the answers to, and see what the retrieval misses.
Day 6
If you want more control or more speed on the same machine, try llama.cpp or, on a Mac, an MLX tag. Compare the same prompt, not a new one.
Day 7
Lock the model tag, the context length and the agent command you will actually reuse. Leave cloud tools off unless you mean to turn them on.
12 · snags
Questions
Do I need a GPU?
No. llama.cpp and Ollama will run on a CPU if the file fits in RAM. It will be much slower than a GPU or Apple Silicon. Start with Gemma 4 E2B or E4B, and keep the context short.
Which quant should I download?
Q4_K_M is the usual first GGUF. Move to Q5_K_M or Q6_K if you have spare memory and you can feel a drop at 4-bit. Use Q8 only when you have a lot of room. For gpt-oss, use the official MXFP4 build; there is no second official quant.
The model loaded, then became very slow. Why?
The weights fit, the context window did not. Part of the KV cache (or part of the model) is in system RAM. Shorten the context, pick a smaller file, or on a MoE model leave experts in RAM on purpose and accept the slower decode. On a Mac, also check that the GPU has been allowed enough unified memory.
Ollama, llama.cpp or MLX?
Ollama is the fastest way to get a first chat and a local API. llama.cpp is the engine to use when you want flags, new quants, or a raw GGUF. MLX is the native Apple Silicon path, including Ollama’s -mlx tags. Many people start on Ollama and move one workload to llama.cpp or MLX later.
Does my data leave the machine?
Not if you run local weights and you leave cloud models, web search and hosted providers off. A :cloud tag in Ollama, or a UI with web search enabled, does leave the machine. Read the toggles before you paste a private file.
Can I use this from Python or an editor?
Yes. Point the OpenAI SDK, Aider, Cline or OpenCode at the local base URL. There is a copy-paste example in the API section.
What does “uncensored” actually change?
It reduces refusals. It does not make the model more accurate, and it does not remove the licence on the base weights. Some builds also shift quality a little, which is why Heretic cards publish a KL figure. You still have to follow the law and the licence.