Comparison Local AI

Ollama, llama.cpp, or LM Studio: which to use for local AI in 2026

We compare Ollama, llama.cpp, and LM Studio, plus when to move to vLLM or Open WebUI: setup, API, licenses, performance, and what to pick for your use case.

Tested on October 17, 2026 in llama.cpp b11714 (CPU x64) · Windows Server 2022, Ryzen 9 5900X with 3 vCPUs and 12 GB, no GPU. Only llama.cpp was run on our VPS. Ollama, LM Studio, vLLM, and Open WebUI are described based on their official documentation and release notes. How we test

Four hand tools on a wooden board: pliers, a screwdriver, needle-nose pliers, and a hammer.
Photo: Hunter Haley on Unsplash, with the blog’s colour treatment.
In this article
  1. What each one is and how they fit together
  2. The comparison in one table
  3. Installing and running your first model
  4. Performance: where the real difference is
  5. Hooking it up to your coding tools
  6. Licenses: what you can do at a company
  7. When to move to vLLM or Open WebUI
  8. What to pick for your use case
  9. What to do now

If you want to try a model on your computer in five minutes, use Ollama. If you’d rather have an app with windows, go with LM Studio. If you want full control over memory, quantization, and threads, or you’re setting it up on a server without a GPU, use llama.cpp. vLLM is only worth it when you have many users at once and a serious GPU, and Open WebUI doesn’t run models: it’s the ChatGPT-style interface you put in front of any of the others.

That’s the short answer. Below you’ll find the reasoning, with the versions current as of October 17, 2026, the exact commands, and what we ran into when we put llama.cpp to work on our VPS with no graphics card. All three tools changed quite a bit this year: if you’re reading guides from 2025, several things no longer hold.

What each one is and how they fit together

The three main tools don’t fully compete with each other, because they sit at different layers:

  • llama.cpp is the engine. A C/C++ library (built on the ggml tensor library) that loads models in GGUF format and runs them on CPU, on NVIDIA GPUs (CUDA), AMD (ROCm, Vulkan), Intel (SYCL), or Apple (Metal). It ships its own programs: llama-cli to chat in the terminal, llama-server to serve an API, and llama-bench to benchmark.
  • Ollama is a wrapper that hides all of that. You download with ollama pull, run with ollama run, and get an API on port 11434. It originally used llama.cpp under the hood; since May 2025 it has its own engine built on ggml, and on Apple Silicon Macs, starting with version 0.40, it uses MLX, Apple’s library, by default when the model supports it.
  • LM Studio is a desktop app with a graphical interface: you search for the model, download it, set how many layers go to the GPU with a slider, and chat. Under the hood it uses llama.cpp and, on Mac, MLX as well. It has a headless mode (lms server start) so you can use it as a server.

And two more that always come up in the conversation:

  • vLLM is an inference server for production: it serves many people at once thanks to PagedAttention and continuous batching of requests. It requires Linux and a GPU, and it works with the original Hugging Face weights, not GGUF.
  • Open WebUI is a web interface. It connects to Ollama or any OpenAI-compatible API and gives you users, history, documents, and an experience similar to ChatGPT.
InterfaceOpen WebUI (web, multi-user)LM Studio windowsWrapperOllamaAPI on port 11434LM Studio (lms server)API on port 1234Enginellama.cpp / ggmlGGUF, CPU and any GPUMLXApple Silicon onlyvLLMLinux + GPU, many usersHardwareCPU and RAM · NVIDIA, AMD, or Intel GPU · Mac with unified memory
The five tools by layer: Open WebUI is an interface, Ollama and LM Studio are convenient wrappers, llama.cpp and vLLM are the engines that run the model.

The practical upshot: with the same GGUF file and the same settings, Ollama, LM Studio, and llama.cpp perform similarly on Windows and Linux, because in the end ggml does the heavy lifting. The differences you’ll notice come mostly from the defaults (context, GPU layers, which quantization gets downloaded), not from the engine.

The comparison in one table

Ollamallama.cppLM StudiovLLMOpen WebUI
Version as of 10-17-20260.40.6v0.7.0 and build b117140.4.260.31.00.12.3
LicenseMITMITProprietary, free for work use too; lms CLI is MITApache 2.0Open WebUI License (BSD with a branding clause)
PlatformsWindows, macOS, LinuxWindows, macOS, Linux, AndroidWindows, macOS (Apple Silicon), LinuxMainly LinuxDocker or pip
Model formatIts own library (GGUF under the hood); MLX on MacGGUFGGUF; MLX on MacHugging Face weights (safetensors)Doesn’t run models
APIOpenAI and Anthropic, port 11434OpenAI and Anthropic, port 9931OpenAI and Anthropic, port 1234OpenAI and Anthropic, port 8000Connects to the others
Graphical interfaceSimple appBasic web UI includedFullNoFull, multi-user
Who it’s forOne person who wants to start right nowAnyone who wants to tweak everything or has no GPUPeople who prefer windows to the terminalTeams with GPUs and high concurrencyGiving a team access

Two details in this table that trip a lot of people up:

  • llama-server’s port is no longer 8080. The current server documentation lists 9931 as the default; 8080 only shows up in the Docker examples, where it’s set manually. Always pass --port and you won’t have to wonder.
  • All four tools that run models now speak Anthropic’s format (/v1/messages), in addition to OpenAI’s. That means you can point Claude Code at a local model without an intermediate proxy; we cover that below.

Installing and running your first model

Ollama

On Windows and macOS you install it with the installer from its website; on Linux, with its script. Then:

ollama pull gemma4        # download the model
ollama run gemma4         # chat in the terminal
ollama ps                 # which models are loaded and how much memory they use
ollama stop gemma4        # free the memory
ollama ls                 # downloaded models

The API lives at http://localhost:11434. The plain name gemma4 picks whatever size and quantization Ollama treats as the default; if you want a specific one, the model’s page on ollama.com lists the tags.

llama.cpp

There are packages on winget (winget install llama.cpp) and Homebrew (brew install llama.cpp), plus prebuilt binaries on the GitHub releases page for every combination of OS and acceleration (CPU, CUDA, Vulkan, Metal…). On our VPS running Windows Server 2022 with no GPU, we downloaded the CPU x64 zip for build b11714 and unzipped it. Without installing anything else:

# measure prompt processing (pp) and generation (tg) speed with 3 threads
llama-bench -m Llama-3.2-3B-Instruct-Q4_K_M.gguf -t 3 -p 512 -n 128 -r 3

# one question and exit, with reasoning mode off
llama-cli -m modelo.gguf -t 3 -c 4096 -st -rea off -p "Your question"

# server with an OpenAI- and Anthropic-compatible API
llama-server -m modelo.gguf -c 8192 --port 8080 --jinja

--jinja is required for the server to understand tool calls. The recent release also includes a single command, llama, that downloads from Hugging Face and runs: llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF.

LM Studio

Installers for Windows, macOS (Apple Silicon only), and Linux. You can do everything with the mouse, but the lms CLI is what makes it automatable:

lms get nombre-del-modelo                  # search and download
lms ls                                     # downloaded models
lms load nombre-del-modelo --gpu=max --context-length=16384
lms server start                           # API at http://localhost:1234
lms ps                                     # what's loaded

vLLM

uv pip install vllm --torch-backend=auto
vllm serve Qwen/Qwen3.5-9B                 # API at http://localhost:8000/v1

Open WebUI

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway \
  -v open-webui:/app/backend/data --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main

Open http://localhost:3000, create the admin account, and connect Ollama or any OpenAI-compatible API.

Performance: where the real difference is

We couldn’t benchmark Ollama and LM Studio on the same machine: our test VPS had between 1.4 and 8 GB of free disk space depending on the moment and only fit one model at a time, so we only ran llama.cpp. What we can tell you, documentation in hand, is where your tokens per second go when you switch tools:

  1. Context. The more context you reserve, the more memory the KV cache eats. Ollama has historically had a short default context (Aider warns that it silently drops whatever doesn’t fit), and for coding, its own Claude Code guide recommends 64,000 tokens or more. Check the num_ctx parameter in Ollama, --context-length in LM Studio, and -c in llama.cpp before comparing anything.
  2. GPU layers. If the model doesn’t fit entirely in VRAM, part of it goes to RAM and speed plummets. LM Studio shows you this with a slider; llama.cpp controls it with -ngl and, for MoE models, with --n-cpu-moe, which keeps the experts in RAM and the rest on the GPU. Ollama decides on its own.
  3. Quantization. ollama pull modelo and LM Studio’s search can give you different quantizations of the same model. A Q4_K_M and a Q8_0 aren’t comparable.
  4. Mac. Here there is an engine difference: Ollama 0.40 and LM Studio can use MLX, and llama.cpp uses Metal. On an Apple Silicon Mac, it’s worth trying both paths with your model.

To give you a sense of scale without a GPU: on our VPS (3 threads of a Ryzen 9 5900X), llama.cpp generates with Llama 3.2 3B in Q4_K_M at 8.94 tokens per second according to llama-bench, and processes the prompt at 41.16. With Qwen3.5 0.8B generation goes up to 24.9, and with Qwen3.5 4B it drops to 6.7. The details of those tests are in our article on which local AI runs on a VPS without a GPU.

Hooking it up to your coding tools

Since all four speak Anthropic’s format, Claude Code can use a local model. With Ollama there’s a shortcut:

ollama launch claude --model qwen3.5

Or manually, with environment variables:

export ANTHROPIC_BASE_URL=http://localhost:11434   # 1234 for LM Studio
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
claude --model qwen3.5

It works, but don’t expect the Claude experience: Claude Code is designed for models that handle long contexts and many back-to-back tool calls well, and a 9-billion-parameter model on your laptop isn’t up to that. For short tasks it does the job. If you’re new to the tool, start with our Claude Code guide.

Other options that connect the same way: Continue (ollama provider), Cline (Ollama and LM Studio providers; its guide suggests 32 to 64 GB of RAM for mid-size coding models), and Aider (aider --model ollama_chat/modelo).

Licenses: what you can do at a company

  • Ollama, llama.cpp, and the LM Studio CLI are MIT: no practical restrictions.
  • The LM Studio app is proprietary, but since July 8, 2025 it’s free for work use too.
  • vLLM is Apache 2.0.
  • Open WebUI is no longer pure BSD. Its license adds a branding clause: you can’t remove or change the Open WebUI name and logo unless you have 50 users or fewer in any 30-day period, written permission, or an enterprise license. For internal use by a small team nothing changes; for reselling it under your own brand, it does.

Heads up: the tool’s license isn’t the model’s license. Gemma 4, Qwen3.5, and gpt-oss are Apache 2.0, but other models have commercial-use limits. We go over this in the best local AI models by type of machine.

When to move to vLLM or Open WebUI

vLLM makes sense when you’re serving a model to several people or processes at once from a Linux server with a GPU. There, its memory management and request batching give it much higher total throughput than llama.cpp. For one person on a laptop it adds nothing, and its installation is more finicky.

Open WebUI makes sense when you want other people to use the model without touching the terminal: each with their own account, their own history, and the ability to upload documents. The usual setup is Open WebUI in front of Ollama on the same machine or on an office server.

What to pick for your use case

Your situationPickWhy
You want to try local AI on your laptop todayOllamaTwo commands and it works; API ready for other tools
You don’t like the terminalLM StudioModel browser, visible settings, and chat in a window
Mac with Apple SiliconOllama or LM StudioBoth take advantage of MLX as well as Metal
VPS or server without a GPUllama.cppDependency-free binary, control over threads and memory, llama-bench for benchmarking
You want to squeeze a large MoE model onto a small GPUllama.cpp--n-cpu-moe splits experts between RAM and VRAM
A team of several peopleOpen WebUI + OllamaAccounts, history, and documents without a terminal
Product with many simultaneous users and a GPUvLLMTotal throughput under concurrency

Our pick for the blog was llama.cpp, for one specific reason: we needed to benchmark on a machine with no GPU, little disk space, no installed services, and reproducible numbers. For everyday use on a personal computer, most people will be more comfortable with Ollama.

What to do now

  1. Check how much memory you have (RAM, and VRAM if you have a GPU). That decides the model, not the tool.
  2. Install Ollama or LM Studio and try a small model: Gemma 4 E4B or Qwen3.5 4B.
  3. If speed falls short, check context, GPU layers, and quantization before switching tools.
  4. Choose a model with our guide to the best local AI models for your machine.
  5. If you’re going to use it for coding, compare it first with what Claude gives you: we cover that in local models for coding vs. Claude.

Keep reading

More on Local AI

The AI Universe newsletter

What we have tested: a new guide, a tool worth using and a mistake you don’t need to repeat. No filler, and we never sell your data.