# Best local LLM: top open models by memory size, tools to run them and hardware math

> The best local LLM is the strongest open model that fits in your memory. Here are the current picks for 8 GB to 80 GB machines, the best local LLM for coding, how Ollama, LM Studio and llama.cpp compare, and a tested script that tells you what fits before you download 18 GB.

- URL: https://geeklyplug.com/blogs/best-local-llm/
- Author: A. Farooq, Editor
- Topic: AI
- Published: 2026-11-10
- Updated: 2026-11-28

## Short answer

The best local LLM for a 24 GB GPU or a 32 GB Mac is Qwen3.8-27B, an Apache 2.0 model that handles chat, coding and images. On 16 GB, run gpt-oss-20b or Gemma 4 12B. For coding agents, try Devstral Small 2. Install Ollama or LM Studio, pick a model that fits your memory, and it runs offline.

Running an LLM on your own computer means no API bill, no rate limits and no prompts leaving the building. The hard part is choosing. New open models arrive every few weeks, most "best local LLM" lists are a pile of names without memory figures, and the wrong pick means waiting for an 18 GB download that will not load or crawls at two words a second.

This guide fixes that. You get the current best local LLM models for each memory tier, with download sizes taken from the official Ollama library, the best local LLM for coding, a plain comparison of Ollama, LM Studio and llama.cpp, the commands to get running, and a short Python script we tested that estimates how much memory a model needs. Every model fact comes from the developer's own model card or announcement, and every download size from the official Ollama library.

## The best local LLM models by memory size

There is no single best local LLM. There is a best model for your memory. The table below gives our picks for each tier, chosen on three criteria: the developer's published results, an open license that allows commercial use, and a download size that leaves room for a useful context window on that hardware.

![Recommended local LLMs by memory: Phi-4-mini for 8 GB, Gemma 4 12B for 16 GB, Qwen3.8-27B for 24 GB VRAM or a 32 GB Mac, Devstral Small 2 for coding on 24 GB, Qwen3-Coder-Next for 64 GB Macs and gpt-oss-120b for 80 GB GPUs, with default Ollama download sizes.](https://geeklyplug.com/images/blog/best-local-llm-by-memory.svg)

*Our local LLM picks by available memory, with default Ollama download sizes.*

*Best local LLM by available memory (sizes are default Ollama downloads)*

| Your memory | Best pick | Download | Also good | Why |
| --- | --- | --- | --- | --- |
| 8 GB RAM, no GPU | Phi-4-mini (3.8B) | 2.5 GB | Gemma 4 E2B (4.6 GB) | Small enough to leave room for your apps; MIT license |
| 16 GB RAM or 12 to 16 GB VRAM | Gemma 4 12B | 7.7 GB | gpt-oss-20b (14 GB) | Text, image and audio input, 256K context, Apache 2.0 |
| 24 GB VRAM or 32 GB Mac | Qwen3.8-27B | 18 GB | Gemma 4 26B A4B (16 to 19 GB) | Strongest all-rounder that fits one consumer GPU |
| 24 GB, coding agents | Devstral Small 2 (24B) | 15 GB | Qwen3-Coder 30B (19 GB) | Built for multi-file coding agents |
| 64 GB Mac or more | Qwen3-Coder-Next | 52 GB | Qwen3.8-27B at higher precision | Large coding model with few active parameters |
| 80 GB GPU or 96 GB+ Mac | gpt-oss-120b | 65 GB | Gemma 4 31B unquantized | OpenAI says it runs within 80 GB |

> **The rule that matters most**
>
> As a rule of thumb, pick the largest model whose download is clearly smaller than your GPU memory, or about two thirds of a Mac's unified memory. A model that spills out of GPU memory into system RAM keeps working, but slows down sharply.

### Qwen3.8-27B: the best all-rounder

The Qwen team's [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B), released in August 2026, is a dense 27-billion-parameter model under the Apache 2.0 license. It reads images and video as well as text and has a native context window of 262,144 tokens, extendable to about a million. Qwen reports 61.7 on SWE-bench Pro and 89.2 on GPQA Diamond (both vendor-reported). The [Ollama build](https://ollama.com/library/qwen3.8) is an 18 GB download, which fits a 24 GB graphics card with room for context.

### Gemma 4: the best family for small and mid-size machines

Google's Gemma 4 family, launched on April 2, 2026, covers almost every tier under one Apache 2.0 license. The [Gemma 4 model card](https://ai.google.dev/gemma/docs/core/model_card_4) lists E2B and E4B models for phones and laptops, a 12B model, a 26B mixture-of-experts model with 3.8B active parameters and a 31B dense model. The E2B, E4B and 12B versions accept audio as well as text and images. On [Ollama](https://ollama.com/library/gemma4), the 12B is a 7.7 GB download with a 256K context window, which makes it the best default for a 16 GB laptop.

### gpt-oss-20b and gpt-oss-120b: OpenAI's open-weight models

OpenAI released [gpt-oss](https://openai.com/index/introducing-gpt-oss/) in August 2025 under Apache 2.0. They are text-only mixture-of-experts models: gpt-oss-20b has 21B total and 3.6B active parameters, and gpt-oss-120b has 117B total and 5.1B active. OpenAI says the 120b runs within 80 GB of memory and the 20b "only requires 16GB". Ollama lists them at [14 GB and 65 GB](https://ollama.com/library/gpt-oss). They are older than the Qwen and Gemma picks, but still a sensible fit for a 16 GB machine or a single 80 GB GPU.

### Phi-4-mini: the best tiny model

Microsoft's [Phi-4-mini](https://huggingface.co/microsoft/Phi-4-mini-instruct) is a 3.8B-parameter text model from February 2025 with a 128K context window and an MIT license. Microsoft reports 67.3 on MMLU and 88.6 on the GSM8K math test. At a [2.5 GB download](https://ollama.com/library/phi4-mini) it runs on almost any recent laptop, including ones with no GPU. Expect it to handle summaries, rewrites and simple questions, not long reasoning.

## Best local LLM for coding

Coding is where hardware limits bite hardest, because coding tools send long context: whole files, diffs and tool output. Here are the three models worth trying first, all available in Ollama.

*Best local LLM for coding*

| Model | Size | Download | Context | Best for |
| --- | --- | --- | --- | --- |
| Qwen3.8-27B | 27B dense | 18 GB | 256K | Best overall: chat, review, agents, reading screenshots |
| Devstral Small 2 | 24B dense | 15 GB | 256K (Mistral); Ollama lists 384K | Agentic coding across a codebase |
| Qwen3-Coder 30B | 30B total, 3.3B active (MoE) | 19 GB | 256K | Fast responses on a 24 GB card |

[Devstral Small 2](https://mistral.ai/news/devstral-2-vibe-cli/), released by Mistral in December 2025, is the specialist. It is a 24B Apache 2.0 model that accepts image input, and Mistral reports 68.0% on SWE-bench Verified, a benchmark built from real GitHub issues. Mistral also says it "runs on consumer-grade GPUs as well as CPU-only configurations". Ollama's [devstral-small-2](https://ollama.com/library/devstral-small-2) page notes that it needs Ollama 0.13.3 or later.

[Qwen3-Coder 30B](https://ollama.com/library/qwen3-coder) is a mixture-of-experts model that, per its Ollama page, activates only 3.3B of its 30B parameters for each token. That makes it noticeably quicker than a dense model of the same size, which matters for autocomplete-style use. If you have a 64 GB Mac, [Qwen3-Coder-Next](https://ollama.com/library/qwen3-coder-next) (a 52 GB download that Ollama lists at 80B total and 3B active parameters) is the step up.

To plug a local model into an editor or a coding agent, point the tool at your local server's OpenAI-compatible address, shown in the setup section below. For a tour of the editors and agents themselves, see our guide to [vibe coding tools](https://geeklyplug.com/blogs/vibe-coding-tools/).

> **The setting that breaks local coding**
>
> [Ollama's docs](https://docs.ollama.com/context-length) say it defaults to a 4K context window on machines with under 24 GiB of VRAM, and recommend at least 64,000 tokens for agents and coding tools. If a coding agent seems to forget your files, raise the context length before blaming the model.

## Local LLM hardware: how much memory you need

Two things take up memory when you run a model: the weights and the context. The weights are the model itself. Their size is the number of parameters times the bits used to store each one. Most local downloads are quantized to about 4 or 5 bits per weight instead of 16, which cuts memory by roughly three quarters at some cost in quality. The [llama.cpp project](https://github.com/ggml-org/llama.cpp) supports everything from 1.5-bit to 8-bit quantization.

The context is the conversation so far, stored as a key-value (KV) cache for every layer of the model. It grows with every token, so a 128K-token window can need as much memory as the model. This short script estimates both. We ran it with Python 3.13 and checked the weight estimates against the memory table Google publishes for Gemma 4.

```python
# Rough memory estimate for running an LLM locally.
# weights: parameters x bits per weight / 8
# kv cache: 2 (keys and values) x layers x kv_heads x head_dim x tokens x bytes

def weights_gb(params_billion, bits_per_weight):
    return params_billion * bits_per_weight / 8

def kv_cache_gb(layers, kv_heads, head_dim, context_tokens, bytes_per_value=2):
    return 2 * layers * kv_heads * head_dim * context_tokens * bytes_per_value / 1e9

# Check against Google's published Gemma 4 Q4_0 memory figures.
# Q4_0 stores 4-bit weights plus one 16-bit scale per 32 weights = 4.5 bits.
gemma4 = {"E2B": (5.1, 2.9), "E4B": (8.0, 4.5), "12B": (11.95, 6.7),
          "26B A4B": (25.2, 14.4), "31B": (30.7, 17.5)}
print("model     estimate  Google Q4_0")
for name, (params, google) in gemma4.items():
    print(f"{name:<9} {weights_gb(params, 4.5):5.1f} GB  {google:5.1f} GB")

# Context costs memory too. A made-up model with 48 layers,
# 8 KV heads and a head size of 128, with an f16 cache:
print()
for ctx in (4_096, 32_768, 131_072):
    print(f"{ctx:>7} tokens of context: {kv_cache_gb(48, 8, 128, ctx):5.1f} GB of KV cache")
```

*llm_memory.py: estimate weights and KV cache memory (tested)*

Running `python3 llm_memory.py` printed:

```text
model     estimate  Google Q4_0
E2B         2.9 GB    2.9 GB
E4B         4.5 GB    4.5 GB
12B         6.7 GB    6.7 GB
26B A4B    14.2 GB   14.4 GB
31B        17.3 GB   17.5 GB

   4096 tokens of context:   0.8 GB of KV cache
  32768 tokens of context:   6.4 GB of KV cache
 131072 tokens of context:  25.8 GB of KV cache
```

*Output*

The weight estimates land within 0.2 GB of [Google's figures](https://ai.google.dev/gemma/docs/core/model_card_4) for every Gemma 4 size, so the simple formula is good enough for planning. The second half is the warning. For the illustrative 48-layer model, going from 4K to 128K tokens of context adds about 25 GB, more than the weights of most models on this list. Real models often use less, through tricks like sliding-window attention, and Ollama can store the cache at 8-bit or 4-bit with the `OLLAMA_KV_CACHE_TYPE` setting described in its [FAQ](https://docs.ollama.com/faq).

> all 26 billion parameters must be loaded into memory
>
> [Google, Gemma 4 model card, on the 26B A4B model](https://ai.google.dev/gemma/docs/core/model_card_4)

That quote explains the most common surprise with mixture-of-experts (MoE) models. The active parameter count sets the speed, but the total count sets the memory. A 30B MoE model runs about as fast as a 3B model and needs about as much memory as a 30B one.

### Best local LLM hardware: GPU, Mac or CPU

*Local LLM hardware options compared*

| Hardware | Strength | Limit | Best models |
| --- | --- | --- | --- |
| NVIDIA GPU (12 to 32 GB VRAM) | Fast, and supported by every tool here | VRAM caps model size | Gemma 4 12B up to Qwen3.8-27B |
| Apple Silicon Mac (32 to 128 GB) | Large unified memory runs big models on one machine | Usually slower than a high-end NVIDIA card | Qwen3.8-27B up to gpt-oss-120b |
| AMD GPU | Supported by Ollama through ROCm v7 and Vulkan | Check your card is on the supported list | Same as NVIDIA at equal VRAM |
| CPU only (16 to 32 GB RAM) | Works on any computer | Slow for anything over about 8B | Phi-4-mini, Gemma 4 E2B or E4B |

Support details come from the tools' own docs. [Ollama's hardware page](https://docs.ollama.com/gpu) lists NVIDIA cards with compute capability 5.0 or newer, AMD cards with ROCm v7 drivers, Vulkan on Windows and Linux, and Metal on Apple devices. [LM Studio's requirements](https://lmstudio.ai/docs/app/system-requirements) ask for an Apple Silicon Mac on macOS 14 or newer, or an x64 PC with AVX2, and recommend 16 GB of RAM plus at least 4 GB of dedicated VRAM on Windows. LM Studio does not support Intel Macs.

On a Mac, the GPU shares memory with macOS and every open app, so a 32 GB Mac comfortably runs an 18 GB model but not a 30 GB one. If you are buying hardware for local AI, memory size matters more than raw speed: it decides which models you can load at all.

## Ollama vs LM Studio vs llama.cpp: how to run an LLM locally

Three free tools cover almost every local setup. They run the same open models; the main difference is the interface. LM Studio, for example, says it runs on MLX and llama.cpp under the hood.

*Local LLM tools compared*

|  | Ollama | LM Studio | llama.cpp |
| --- | --- | --- | --- |
| Interface | Command line, local API, desktop app | Desktop app, plus the lms command line | Command line and server |
| Best for | Developers, scripts and coding tools | Browsing and chatting with models | Maximum control and unusual hardware |
| Platforms | macOS, Windows, Linux | Apple Silicon Mac, Windows x64 and ARM, Linux | Almost anything, including phones |
| Local API | OpenAI-compatible at localhost:11434/v1 | OpenAI-compatible, port 1234 in its examples | OpenAI-compatible server (llama serve) |
| Cost and license | Free for local models; paid cloud models optional | Free plan runs local models | Free, MIT license |

### Run an LLM locally with Ollama

Ollama is the quickest route from nothing to a working local LLM. Download it from ollama.com (or run the install script on Linux), then run a model. The first run downloads it.

```bash
# Linux install (macOS and Windows have installers on ollama.com)
curl -fsSL https://ollama.com/install.sh | sh

# Pick the model that fits your memory
ollama run qwen3.8:27b      # 24 GB GPU or 32 GB Mac
ollama run gemma4:12b       # 16 GB machine
ollama run phi4-mini        # 8 GB laptop

# Give coding tools a bigger context window
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
```

*Ollama: download and chat with a model (type /bye to exit)*

Ollama now offers cloud models too. In its CLI, any model name ending in `:cloud` runs on Ollama's servers rather than your machine. If privacy is why you are going local, stick to tags without that suffix, or set `OLLAMA_NO_CLOUD=1` to switch cloud features off, as its [FAQ](https://docs.ollama.com/faq) explains.

Any app that speaks the OpenAI API can then use your local model. This is the example from [Ollama's OpenAI compatibility docs](https://docs.ollama.com/api/openai-compatibility); the API key is required by the client library but ignored by Ollama.

```python
from openai import OpenAI

client = OpenAI(
    base_url='http://localhost:11434/v1/',
    api_key='ollama',  # required but ignored
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            'role': 'user',
            'content': 'Say this is a test',
        }
    ],
    model='gpt-oss:20b',
)
print(chat_completion.choices[0].message.content)
```

*Calling a local Ollama model with the OpenAI Python client (pip install openai)*

### LM Studio: the easiest desktop app

LM Studio is a desktop app with a model browser, a chat window and a local server. Its [free plan](https://lmstudio.ai/pricing) runs local models; paid tiers add cloud inference. Start the server with `lms server start`, and its [OpenAI-compatible examples](https://lmstudio.ai/docs/developer/openai-compat) use `http://localhost:1234/v1` as the base URL, so the Python code above works with just the URL and model name changed.

### llama.cpp: maximum control

[llama.cpp](https://github.com/ggml-org/llama.cpp) is the open-source C/C++ engine that LM Studio and many other tools build on. It supports a very wide range of hardware, from CUDA, HIP and Vulkan GPUs to Apple Metal and Snapdragon chips, and exposes every setting. Install it with `brew install llama.cpp` on Mac or Linux or `winget install llama.cpp` on Windows, then use the commands from its README:

```bash
# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF

# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
```

*llama.cpp quick start, from the project README*

Use llama.cpp when you need a setting the friendlier tools hide, such as exact quantization files, multi-GPU splits or running on a phone. Otherwise, Ollama or LM Studio will get you the same models with less work.

## Real test results: we ran six local models on one 16 GB GPU

Memory tables only tell you what should fit. To see what happens in practice, we downloaded six of the models discussed above, from a 2.5 GB download to a 17.7 GB one, and timed each on the same 16 GB GPU. Each model wrote the same 512-token answer three times; the speeds below average the second and third runs, so the one-off loading time is reported separately. We ran this test on 28 November 2026 in Google Colab on a free NVIDIA Tesla T4 GPU (16 GB of video memory), using Ollama 0.40.19 to serve the models. The screenshots are cropped from that notebook; the code is exactly what ran.

![Bar chart of generation speed on an NVIDIA T4: Gemma 4 E2B 105.2 tokens per second, Phi-4-mini 62.7, Gemma 4 E4B 61.7, gpt-oss-20b 41.3, Gemma 4 12B 27.6, and Qwen3.8-27B 1.4 with 24 percent of the model on the CPU](https://geeklyplug.com/images/blog/tests/chart-local-llm-speed.webp)

*Generation speed on one 16 GB GPU. The only model that did not fit in video memory was about 20 times slower than the next slowest.*

![Screenshot of a Colab output table listing each model's download size, load time, video memory used, share on GPU, prompt tokens per second and generation tokens per second](https://geeklyplug.com/images/blog/tests/speed.webp)

*The raw results table from our Colab run.*

What the numbers show:

- **Fitting in video memory matters more than anything else.** Qwen3.8-27B is a 17.7 GB download, a little too big for a 16 GB card, so Ollama put 24% of it on the CPU. Generation fell to 1.4 tokens per second and reading the prompt fell to 16 tokens per second, against 27.6 and 283 for Gemma 4 12B, which fit entirely. That is why the table above pairs Qwen3.8-27B with 24 GB of VRAM.
- **Mixture-of-experts models are faster than their size suggests.** gpt-oss-20b is a bigger download than Gemma 4 12B (13.8 GB against 8.0 GB) but generated about 50% faster (41.3 against 27.6 tokens per second), because only a fraction of its weights are used for each token.
- **Video memory use tracked the download size, loosely.** With a 4,096-token context, the models that fit used between about 60% of their download size (the Gemma 4 E2B and E4B models) and about 120% (Phi-4-mini): 8.5 GB for Gemma 4 12B and 12.1 GB for gpt-oss-20b. Plan for longer contexts to need more.
- **First loads are slow.** Loading from disk took 36 to 123 seconds the first time on Colab. On a desktop with a fast NVMe drive it is usually quicker, and later loads come from cache.

![Screenshot of ollama ps output showing qwen3.8:27b at 17 GB split 24 percent CPU and 76 percent GPU, with a log line showing generation at 1.50 tokens per second](https://geeklyplug.com/images/blog/tests/offload.webp)

*Mid-test check: Ollama reports the 27B model split between CPU and GPU, and its log shows about 1.5 tokens per second.*

> **Read these numbers as a floor**
>
> The T4 is a 2018 data-center card with less memory bandwidth than most current gaming GPUs, so a recent 16 GB card should be noticeably faster. The ranking between models, and the cliff when a model spills out of video memory, is what carries over.

```python
# local LLM speed and memory test (best-local-llm post)
import subprocess, time, requests, pandas as pd
API = "http://localhost:11434/api"
MODELS = ["phi4-mini", "gemma4:e2b", "gemma4:e4b", "gemma4:12b", "gpt-oss:20b", "qwen3.8:27b"]
PROMPT = ("Explain in about 300 words how a hash table works, "
          "including collisions and resizing.")

def vram_used_mb():
    out = subprocess.run(["nvidia-smi", "--query-gpu=memory.used", "--format=csv,noheader,nounits"],
                         capture_output=True, text=True).stdout
    return int(out.strip().splitlines()[0])

rows = []
for m in MODELS:
    t0 = time.time()
    pull = subprocess.run(["ollama", "pull", m], capture_output=True, text=True)
    if pull.returncode != 0:
        print(f"{m}: pull failed -> {pull.stderr.strip()[-200:]}"); continue
    size_gb = [t["size"] for t in requests.get(f"{API}/tags").json()["models"] if t["name"].startswith(m)][0] / 1e9
    runs = []
    for i in range(3):                                  # run 1 includes load time
        r = requests.post(f"{API}/generate", json={
            "model": m, "prompt": PROMPT, "stream": False, "keep_alive": "5m",
            "options": {"temperature": 0, "num_predict": 512, "num_ctx": 4096}}).json()
        runs.append(r)
        if i == 0: vram = vram_used_mb()
    ps = requests.get(f"{API}/ps").json()["models"][0]
    on_gpu = ps["size_vram"] / ps["size"]
    best = runs[1:]
    gen_tps = sum(r["eval_count"] / (r["eval_duration"] / 1e9) for r in best) / len(best)
    pp_tps = sum(r["prompt_eval_count"] / (r["prompt_eval_duration"] / 1e9) for r in best) / len(best)
    rows.append({"model": m, "download_GB": round(size_gb, 1),
                 "load_s": round(runs[0]["load_duration"] / 1e9, 1),
                 "VRAM_used_GB": round(vram / 1024, 1), "on_GPU": f"{on_gpu:.0%}",
                 "prompt_tok_s": round(pp_tps), "gen_tok_s": round(gen_tps, 1)})
    print(rows[-1])
    requests.post(f"{API}/generate", json={"model": m, "keep_alive": 0})   # unload
    time.sleep(3)

speed = pd.DataFrame(rows)
speed.to_csv("/content/speed.csv", index=False)
print(speed.to_string(index=False))
```

*speed.py: the exact benchmark we ran in Colab*

## How to choose your local LLM in five steps

1. **Check your memory.** Note your GPU's VRAM (or your Mac's total memory) and system RAM. That number picks your row in the first table.
2. **Decide the job.** General chat and writing, coding, or reading images and audio. Coding needs more context, so leave more headroom.
3. **Install one tool.** Ollama if you want an API for scripts and coding tools, LM Studio if you want an app.
4. **Start one size smaller than you think.** Run your own real tasks for a day. If answers are good and speed is fine, try the next size up.
5. **Set the context length.** Raise it for coding or long documents, and watch memory use. If the model starts spilling into system RAM, drop the context or the model size.

Remember that a local model is a smaller version of what you get in the cloud. Our guide to [small language models](https://geeklyplug.com/blogs/small-language-models/) explains where small models match big ones and where they fall short. If you want a local model to answer from your own documents, pair it with retrieval, as described in our [RAG explainer](https://geeklyplug.com/blogs/rag-in-ai/). And if any of the vocabulary here is new, start with [what LLM stands for](https://geeklyplug.com/blogs/what-does-llm-stand-for/).

## Local LLM updates: how to keep this current

Local models date faster than almost anything else in AI. Qwen's own model cards show Qwen3.5 arriving in February 2026 and Qwen3.8 in August, with Qwen3.6 in between. To stay current without chasing every launch, re-check two places every month or two: the Ollama library page for the model family you use, which shows new tags and sizes, and the developer's model card, which shows the license and benchmark results. Then rerun your own test tasks before switching. We will update this guide as the picks change.

## The bottom line

The best local LLM is the best model that fits your memory. Today that means Qwen3.8-27B on a 24 GB GPU or 32 GB Mac, Gemma 4 12B or gpt-oss-20b on 16 GB, Phi-4-mini on 8 GB, and Devstral Small 2 or Qwen3-Coder for local coding. Install Ollama or LM Studio, size the model with the script above, and raise the context window before you judge the results. For more practical guides on models and tools, browse our [AI guides](https://geeklyplug.com/blogs/ai/).

## Frequently asked questions

### What is the best local LLM right now?

Qwen3.8-27B is the strongest all-rounder that fits on a single 24 GB GPU or a 32 GB Mac, with an 18 GB Ollama download, a 256K context window and image input. If you have 16 GB, gpt-oss-20b and Gemma 4 12B are the safer fits.

### What is the best local LLM for coding?

Qwen3.8-27B leads on Qwen's own coding benchmarks and is the best single pick for 24 GB. Devstral Small 2 (24B, 15 GB download) is built for agentic coding, and Qwen3-Coder 30B is a fast mixture-of-experts option at 19 GB.

### How much RAM or VRAM do I need to run an LLM locally?

Roughly the model's download size plus room for its context. A 4-bit model needs about half a gigabyte per billion parameters for weights, so 8 GB runs 3B to 4B models, 16 GB runs 12B to 20B models, and 24 GB of VRAM runs 27B to 30B models.

### Is Ollama or LM Studio better for running LLMs locally?

Ollama is better if you like the terminal or want a local API for scripts and coding tools. LM Studio is better if you want a desktop app with a model browser and chat window. Both can serve an OpenAI-compatible API, so most tools work with either.

### Can I run a local LLM without a GPU?

Yes. Ollama, LM Studio and llama.cpp all run on the CPU, and Mistral says Devstral Small runs on CPU-only machines. Expect much slower responses than on a GPU or Apple Silicon, so start with a small model such as Phi-4-mini or Gemma 4 E2B.

### Are local LLMs private?

A model running on your own machine processes prompts locally, so nothing leaves your computer. Check the model name, though: in Ollama a name ending in :cloud runs on Ollama's servers, and you can turn cloud features off with OLLAMA_NO_CLOUD=1.

## Sources

- [Ollama model library](https://ollama.com/library), Ollama
- [Qwen3.8-27B model card](https://huggingface.co/Qwen/Qwen3.8-27B), Qwen (Hugging Face)
- [Gemma 4 model card](https://ai.google.dev/gemma/docs/core/model_card_4), Google AI for Developers
- [Introducing gpt-oss](https://openai.com/index/introducing-gpt-oss/), OpenAI
- [Introducing: Devstral 2 and Mistral Vibe CLI](https://mistral.ai/news/devstral-2-vibe-cli/), Mistral AI
- [Phi-4-mini-instruct model card](https://huggingface.co/microsoft/Phi-4-mini-instruct), Microsoft (Hugging Face)
- [qwen3.8](https://ollama.com/library/qwen3.8), Ollama library
- [gemma4](https://ollama.com/library/gemma4), Ollama library
- [gpt-oss](https://ollama.com/library/gpt-oss), Ollama library
- [devstral-small-2](https://ollama.com/library/devstral-small-2), Ollama library
- [qwen3-coder](https://ollama.com/library/qwen3-coder), Ollama library
- [qwen3-coder-next](https://ollama.com/library/qwen3-coder-next), Ollama library
- [phi4-mini](https://ollama.com/library/phi4-mini), Ollama library
- [OpenAI compatibility](https://docs.ollama.com/api/openai-compatibility), Ollama documentation
- [Context length](https://docs.ollama.com/context-length), Ollama documentation
- [FAQ](https://docs.ollama.com/faq), Ollama documentation
- [Hardware support](https://docs.ollama.com/gpu), Ollama documentation
- [System requirements](https://lmstudio.ai/docs/app/system-requirements), LM Studio documentation
- [OpenAI compatibility endpoints](https://lmstudio.ai/docs/developer/openai-compat), LM Studio documentation
- [Pricing](https://lmstudio.ai/pricing), LM Studio
- [llama.cpp](https://github.com/ggml-org/llama.cpp), ggml-org (GitHub)

## Changelog

- 2026-11-28: Added a tested section: speed, memory and load-time results for six local models on a 16 GB NVIDIA T4 in Google Colab, with screenshots and the benchmark code.
- 2026-11-10: Made the title, search title and headings evergreen by removing the month and year. No facts changed.

---

Source: [Best local LLM: top open models by memory size, tools to run them and hardware math](https://geeklyplug.com/blogs/best-local-llm/) on GeeklyPlug.
