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
In this article
- What each one is and how they fit together
- The comparison in one table
- Installing and running your first model
- Performance: where the real difference is
- Hooking it up to your coding tools
- Licenses: what you can do at a company
- When to move to vLLM or Open WebUI
- What to pick for your use case
- 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-clito chat in the terminal,llama-serverto serve an API, andllama-benchto benchmark. - Ollama is a wrapper that hides all of that. You download with
ollama pull, run withollama 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.
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
| Ollama | llama.cpp | LM Studio | vLLM | Open WebUI | |
|---|---|---|---|---|---|
| Version as of 10-17-2026 | 0.40.6 | v0.7.0 and build b11714 | 0.4.26 | 0.31.0 | 0.12.3 |
| License | MIT | MIT | Proprietary, free for work use too; lms CLI is MIT | Apache 2.0 | Open WebUI License (BSD with a branding clause) |
| Platforms | Windows, macOS, Linux | Windows, macOS, Linux, Android | Windows, macOS (Apple Silicon), Linux | Mainly Linux | Docker or pip |
| Model format | Its own library (GGUF under the hood); MLX on Mac | GGUF | GGUF; MLX on Mac | Hugging Face weights (safetensors) | Doesn’t run models |
| API | OpenAI and Anthropic, port 11434 | OpenAI and Anthropic, port 9931 | OpenAI and Anthropic, port 1234 | OpenAI and Anthropic, port 8000 | Connects to the others |
| Graphical interface | Simple app | Basic web UI included | Full | No | Full, multi-user |
| Who it’s for | One person who wants to start right now | Anyone who wants to tweak everything or has no GPU | People who prefer windows to the terminal | Teams with GPUs and high concurrency | Giving 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--portand 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:
- 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_ctxparameter in Ollama,--context-lengthin LM Studio, and-cin llama.cpp before comparing anything. - 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
-ngland, for MoE models, with--n-cpu-moe, which keeps the experts in RAM and the rest on the GPU. Ollama decides on its own. - Quantization.
ollama pull modeloand LM Studio’s search can give you different quantizations of the same model. A Q4_K_M and a Q8_0 aren’t comparable. - 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 situation | Pick | Why |
|---|---|---|
| You want to try local AI on your laptop today | Ollama | Two commands and it works; API ready for other tools |
| You don’t like the terminal | LM Studio | Model browser, visible settings, and chat in a window |
| Mac with Apple Silicon | Ollama or LM Studio | Both take advantage of MLX as well as Metal |
| VPS or server without a GPU | llama.cpp | Dependency-free binary, control over threads and memory, llama-bench for benchmarking |
| You want to squeeze a large MoE model onto a small GPU | llama.cpp | --n-cpu-moe splits experts between RAM and VRAM |
| A team of several people | Open WebUI + Ollama | Accounts, history, and documents without a terminal |
| Product with many simultaneous users and a GPU | vLLM | Total 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
- Check how much memory you have (RAM, and VRAM if you have a GPU). That decides the model, not the tool.
- Install Ollama or LM Studio and try a small model: Gemma 4 E4B or Qwen3.5 4B.
- If speed falls short, check context, GPU layers, and quantization before switching tools.
- Choose a model with our guide to the best local AI models for your machine.
- 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.