Best local LLM: which model to run on your hardware, and for coding

Updated · 8 min read

There is no single best local LLM: the best one is the strongest current model that fits in your computer's memory. On 2026-11-25 that means Gemma 4 or Qwen 3.5 in a small size on a 16 GB laptop, and Qwen 3.8 or Gemma 4 31B on a 24 GB graphics card or a 32 GB Mac. For coding, use Qwen 3.8, Qwen3-Coder 30B or Flint at that size. The tables below list the models by memory tier, with download sizes and pull counts taken from Ollama's library on that date.

How these models were picked

Local models change every few weeks, and benchmark claims come from the makers themselves. So this page uses three things you can check:

  • Downloads. The pull count on Ollama's library, which shows what people keep running.
  • Size. The download size Ollama lists for each tag, which decides whether the model fits your machine.
  • Purpose. What the maker says the model is built for.

Old favourites still lead the all-time download list (llama3.1 has 121.4M pulls, deepseek-r1 95.5M), but they date from 2024 and 2025. The picks below are mostly families released or updated in 2026, and the tables say where a model is older. We re-check this page monthly.

Best local LLM by memory size

The commands are for Ollama. In LM Studio, search for the same model name in the app.

8 GB of RAM, no graphics card

Model Command Download Context Notes
Qwen 3.5 4B ollama run qwen3.5:4b 3.3–4.0 GB 256K Text and images, tools, thinking
Qwen 3.5 2B ollama run qwen3.5:2b 2.7–3.1 GB 256K The same family, smaller
Granite 4.2 3B ollama run granite4.2:3b 2.2 GB 128K IBM, Apache 2.0
Llama 3.2 3B ollama run llama3.2 2.0 GB 128K From 2024; 88.4M pulls

Models this small handle summaries, rewriting and simple questions. Expect mistakes on long reasoning.

16 GB of RAM, or a graphics card with 8 to 12 GB

Model Command Download Context Notes
Gemma 4 E4B ollama run gemma4 6.6–9.5 GB 128K Google; 29.8M pulls for the family; text and images
Gemma 4 12B ollama run gemma4:12b 7.7–8.0 GB 256K The first Gemma 4 size with the 256K context
Qwen 3.5 9B ollama run qwen3.5 6.6–7.6 GB 256K Alibaba; 27.4M pulls for the family
MiMo-V2.6 9B ollama run mimo-v2.6 6.6–8.7 GB 256K Xiaomi, fine-tuned from Qwen 3.5 9B for code and agents; MIT
Granite 4.2 8B ollama run granite4.2 5.3 GB 128K IBM, Apache 2.0
gpt-oss 20B ollama run gpt-oss 14 GB 128K OpenAI's open-weight model; Apache 2.0

OpenAI says gpt-oss 20B runs on systems with as little as 16 GB of memory, but at 14 GB it leaves little room for anything else. Start with Gemma 4 or Qwen 3.5.

A 24 GB graphics card, or a Mac with 32 GB

Model Command Download Context Notes
Qwen 3.8 27B ollama run qwen3.8 18 GB 256K Alibaba; coding, research and long agent tasks; text and images
Gemma 4 31B ollama run gemma4:31b 19–20 GB 256K The largest Gemma 4
Gemma 4 26B ollama run gemma4:26b 16–19 GB 256K Leaves more room for context
Qwen3-Coder 30B ollama run qwen3-coder 19 GB 256K Coding; from 2025; 11.4M pulls
Muse Glimmer 30B ollama run muse-glimmer 18 GB 128K Meta, built for local agents; Apache 2.0
Inkling 2 Mini ollama run inkling-2-mini 18–20 GB 1M Thinking Machines, released 2026-11-24; Apache 2.0
Nemotron 3.5 Lightning 30B ollama run nemotron-3.5-lightning 19–25 GB 1M NVIDIA, built for always-on agents; the larger build needs the 32 GB Mac
Flint 40B ollama run flint 23 GB 256K Recursive, for local coding agents; Apache 2.0; too big for a 24 GB card

Thinking Machines says Inkling 2 Mini runs on a Mac with 32 GB or more. A model of 18 to 20 GB fits a 24 GB card only with a modest context length; see the hardware section below.

48 GB or more

Model Command Download Context Notes
Qwen 3.6 35B ollama run qwen3.6 23 GB 256K Fits with a long context at this size
Ripple 65B Preview ollama run ripple-preview 39–46 GB 1M Ricursive Intelligence, agentic coding; Apache 2.0
gpt-oss 120B ollama run gpt-oss:120b 65 GB 128K OpenAI says it fits on a single 80 GB GPU
Qwen 3.5 122B ollama run qwen3.5:122b 81 GB 256K For high-memory Macs and workstations

Past this point the downloads grow fast: Ollama lists qwen3-coder:480b at 290 GB and says it needs at least 250 GB of memory. Ollama also offers that model as a cloud tag, which runs on its servers.

Best local LLM for coding

Coding tools send a lot of text: files, tool results and the conversation so far. Two things matter more than for chat: the model must be trained for tool use, and the context length must be long enough.

Your hardware Model Download Why
16 GB MiMo-V2.6 9B 6.6–8.7 GB Xiaomi's 9B model for code and agent workflows, with tools and thinking
24 GB card or 32 GB Mac Qwen 3.8 27B 18 GB Alibaba lists gains in coding and long agent tasks, and broader support for coding tools
24 GB card or 32 GB Mac Qwen3-Coder 30B 19 GB 30B parameters with 3.3B active per token, for efficiency; 256K context
32 GB Mac Flint 40B 23 GB Built for repository tasks: investigating a bug, implementing a feature, writing tests
64 GB Ripple 65B Preview 39–46 GB A dense 65B model trained to work like a coding agent in a terminal

Set the context length before you start. Ollama's default is only 4K tokens on a machine with less than 24 GiB of VRAM and 32K from 24 to 48 GiB, and its docs say coding tools and agents need at least 64,000:

OLLAMA_CONTEXT_LENGTH=64000 ollama serve

You can also move the context slider in the Ollama app's settings. A longer context uses more memory, so check afterwards that the model still fits (see below).

Ollama's model pages list ready-made commands that start a coding agent on a local model, for example ollama launch claude --model qwen3.8 for Claude Code and ollama launch opencode --model qwen3.8 for OpenCode. Other coding tools that accept Ollama or LM Studio are in BYOK coding tools.

A local model at these sizes is still weaker than the frontier cloud models on large coding tasks. A common setup is a local model for routine edits and private code, and a cloud key for the hard problems.

Hardware: what a local LLM needs

Memory comes first

A model has to fit in your graphics card's memory (VRAM) to run fast, or in a Mac's unified memory. The download size is the minimum; the context window is added on top. Ollama's own example shows gemma4:latest, a 6.6 to 9.5 GB download, taking 9.6 GB when loaded with its full 128K context.

Check where the model landed

Run ollama ps after loading a model. The PROCESSOR column shows 100% GPU when the whole model is on the graphics card, 100% CPU when it runs in system memory, and a split such as 48%/52% CPU/GPU when it doesn't fit. Ollama's docs say performance is best when nothing is offloaded to the CPU, so on a split pick a smaller model or a shorter context.

Graphics hardware Ollama supports

  • Nvidia: cards with compute capability 5.0 or higher and driver 550 or newer. That covers the GeForce RTX 20, 30, 40 and 50 series and GTX cards back to the GTX 750.
  • AMD: Radeon RX cards from the 6800 up, Radeon PRO cards and Ryzen AI chips such as the Ryzen AI Max+ 395, through ROCm; more cards work through Vulkan.
  • Apple: Apple Silicon Macs, through Metal. Several models above also have MLX builds for Macs (tags ending in -mlx).

LM Studio's requirements

LM Studio needs an Apple Silicon Mac with macOS 14 or newer (Intel Macs aren't supported), or a Windows or Linux PC whose processor supports AVX2. It recommends 16 GB of RAM or more and at least 4 GB of dedicated VRAM, and says 8 GB Macs should stick to smaller models and modest context sizes.

Which machine fits which tier

This is a rough guide based on the download sizes above:

Machine Tier above
Laptop with 8 GB of RAM 2 to 4 GB models
16 GB laptop, or a card with 8 to 12 GB of VRAM 5 to 9 GB models
24 GB card, or a 32 GB Mac 16 to 23 GB models
48 GB or more of VRAM or unified memory 23 to 46 GB models, with long context
80 GB or more gpt-oss 120B and other models above 60 GB

How to run one

  1. Install Ollama or LM Studio. LM Studio vs Ollama compares them.
  2. Download a model from the tier that fits your machine, for example ollama run qwen3.5.
  3. Chat in the terminal or the app, or connect another app to the local server. The addresses and setup are in local LLM apps.

Tags marked cloud on Ollama's model pages (such as gemma4:31b-cloud) run on Ollama's servers, not on your computer.

Apps that work with Ollama or LM Studio

  • TypeZero

    Free · macOS, Windows · Open source

    Visit

    Free, open-source AI voice input app for macOS and Windows that transcribes and cleans up dictation with your own OpenAI, Groq, DeepSeek, Gemini or Claude key, or fully offline.

    Works with:OpenAIGroqDeepSeekGoogle Gemini+2 more

  • Scatter

    Free · Web

    Visit

    Free browser app for learning a topic on an infinite canvas of linked explanations, using your own OpenRouter, OpenAI or Anthropic key or a local model server.

    Works with:OpenRouterOpenAIAnthropicOllama+1 more

  • Robin Review

    Free · Open source

    Visit

    Free, open-source AI code reviewer that runs as a GitHub Action in your repo and reviews every pull request with your own LLM API key.

    Works with:OpenRouterOpenAIGroqOllama

  • Infinity

    Free · macOS

    Visit

    Free Mac AI chat app with git-style branching: fork any part of an answer into its own thread, ask up to four models at once, and use your own keys or local models.

    Works with:OpenAIAnthropicGoogle GeminixAI+7 more

  • Caotang

    Free · Web · Open source

    Visit

    Free, local-first browser writing studio for novels and scripts, with an AI agent that runs on your own Anthropic, OpenAI, Google, OpenRouter or local model key.

    Works with:AnthropicOpenAIGoogle GeminixAI+5 more

  • Laya

    Free · macOS, Windows, Linux · Open source

    Visit

    Open-source, local-first desktop command center that turns Slack, Gmail, GitHub, Jira and calendar notifications into AI-drafted action cards, using local models or your own API keys.

    Works with:AnthropicOpenAIGoogle GeminiOllama+1 more

  • MergeJudge

    Free AI reviews on public repos; bring your own key for private repos · Web, Self-hosted · Open source

    Visit

    AI pull request reviewer offered as a hosted GitHub App or an open-source GitHub Action, running on your own Anthropic, OpenAI or OpenAI-compatible key, local Ollama, or rules only.

    Works with:AnthropicOpenAIOllama

  • Conduit

    Free · Windows, macOS, Linux · Open source

    Visit

    Open-source desktop AI app for agents, research, writing and slides that runs on your own keys from 23 providers or local models.

    Works with:AnthropicOpenAIGoogle GeminixAI+12 more

See all 49 apps that work with Ollama

Local or cloud?

A local model costs nothing per token and keeps your prompts on your computer. A cloud model is stronger and needs no hardware. If your machine is too small for the model you want, a free cloud tier can fill the gap: see free AI API keys. Other runtimes than Ollama are covered in Ollama alternatives.

Questions

What is the best local LLM right now?

It depends on your memory. On 2026-11-25 the most downloaded current families on Ollama were Google's Gemma 4 (29.8M pulls) and Alibaba's Qwen 3.5 (27.4M). Run gemma4 or qwen3.5:9b on a 16 GB machine, and qwen3.8 or gemma4:31b (18 to 20 GB downloads) on a 24 GB graphics card or a 32 GB Mac.

What is the best local LLM for coding?

For a 24 GB graphics card or a 32 GB Mac, qwen3.8 (18 GB) and qwen3-coder:30b (19 GB) are widely downloaded coding picks on Ollama, and Flint (23 GB) is built for local coding agents. On a 16 GB machine try mimo-v2.6, a 9B model for code and agent workflows. Set the context length to at least 64,000 tokens for coding tools.

How much RAM do I need for a local LLM?

More than the model's download size, because the context window takes memory too. Models of 2 to 4 GB run on an 8 GB machine, 5 to 9 GB models want 16 GB, and 16 to 23 GB models want a 24 GB graphics card or a 32 GB Mac. LM Studio recommends at least 16 GB of RAM.

Do I need a GPU?

No, but it is much slower without one. Ollama runs a model in system memory on the CPU when it doesn't fit on a GPU, and can split it between the two. Run ollama ps to see the split.

Are these models free?

Yes. You download the weights once and run them with no API key and no per-token bill. Licenses differ: gpt-oss, Flint, Ripple, Muse Glimmer, Inkling 2 Mini and Granite 4.2 are Apache 2.0 and MiMo-V2.6 is MIT, according to their Ollama pages. Check the model page before commercial use.

Is a local model as good as GPT or Claude?

Not usually. Models that fit on a home computer are smaller than the frontier cloud models. They suit private documents, offline work and unlimited drafting, and many apps let you switch to a cloud key for harder tasks.

Sources

Checked against the providers' own documentation on 2026-11-25. Prices and limits change; the links below have the current figures.

Related guides