Aadhib
ENع

SYSTEM NOTE

Ollama vs LM Studio vs llama.cpp: which local runtime to use

Ollama, LM Studio and llama.cpp all run the same kind of model on your own hardware, but they differ in licence, interface, concurrency defaults and how much they let you control. This comparison is built from each project's own documentation, and ends with when to move to vLLM instead.

Ask which tool to use for running a language model locally and you will usually be told "Ollama", "LM Studio" or "just use llama.cpp", depending on who you ask. All three answers can be right. The trouble is that most comparisons treat them as three competing apps and score them on speed screenshots, when the real differences are in licence, who operates them, what they do when two people send a request at once, and how much they let you change.

That matters more than it looks. The choice you make for one engineer on a laptop is often the wrong one for a small team sharing a box, and the wrong one again for a company running agents against a GPU server all day.

So this article compares the three on the things that decide a deployment, using only what each project's own documentation and licence say. I read all of it on the publish date, and every source is listed at the end. If you want the step-by-step install, that is in How to run an LLM locally. This one is about choosing.

The short answer

  • Ollama if you are an engineer, you want a background service with an API, and you want something you can script and put on a server. MIT licensed.
  • LM Studio if the person using it wants a desktop app with a model browser and chat window, or you are on a Mac and want MLX without setting it up yourself. Free for work use, but proprietary.
  • llama.cpp if you want the engine itself: every quantisation, every flag, the widest hardware support and a server with continuous batching switched on. MIT licensed.
  • vLLM (not one of the three) once several people or agents depend on one model at the same time on NVIDIA or AMD GPUs.
OllamaLM Studiollama.cpp
What it isModel service with CLI, app and APIDesktop app, plus lms CLI and headless daemonC/C++ inference engine, CLI and server
LicenceMITProprietary, free for home and workMIT
Enginellama.cpp listed as a backend; MLX on Metal referenced in its FAQllama.cpp; MLX on Apple SiliconItself, built on ggml
Model formatsIts library; imports GGUF and SafetensorsGGUF and MLXGGUF
Default address127.0.0.1:11434localhost; examples use port 1234127.0.0.1:9931
Parallel requests by default1 on most backends4 concurrent predictionsAuto-sized slots, continuous batching on
Built-in authNone documented in the FAQRecommends enabling authentication before network use--api-key, off by default
Best forEngineers, servers, agentsNon-engineers, trying models, Mac usersFull control, unusual hardware

How the three relate to each other

The first thing to understand is that these are layers, not alternatives.

llama.cpp describes itself as "LLM inference in C/C++", built on the ggml library, with the goal of minimal setup and strong performance on a wide range of hardware. It reached version 1.0.0, which its README links to from the top of the page. It runs GGUF model files, and its README now has a one-line installer and two commands: llama cli -hf <repo> to chat with a model from Hugging Face, and llama serve -hf <repo> to start a server.

Ollama lists llama.cpp under "Supported backends" in its README. It adds a model library with named tags, a background service, a native REST API on port 11434, an OpenAI-compatible API at /v1/, Python and JavaScript libraries, and ollama launch for wiring coding agents such as Claude Code, Codex and OpenCode to a local model. Its FAQ also refers to MLX on Metal when describing parallel request defaults, so on a Mac it is not only llama.cpp underneath.

LM Studio says in its documentation that it runs models with llama.cpp on Mac, Windows and Linux, and can also use Apple's MLX on Apple Silicon. Its MLX engine is a separate open-source project, mlx-engine, under the MIT licence, and its README says LM Studio 0.3.4 and newer for Mac ships with it bundled. The app around those engines is LM Studio's own.

In practice, a GGUF model that runs in one will usually run in the others, because the same format and engine sit underneath. MLX models are the exception: llama.cpp does not run them. What changes is everything around the model.

Licence and terms: the difference most comparisons skip

For a company, this is often the deciding factor, and it is the one I see skipped most.

Ollama is MIT licensed. The licence file starts "MIT License, Copyright (c) Ollama". You can run it, modify it, ship it inside your own product and host it for clients, within the usual MIT conditions.

llama.cpp is also MIT licensed, per its README.

LM Studio is different. On 8 July 2025 it announced that it is "free to use both at home and at work", with no form to fill in and no need to contact the company. That was a real change: before it, workplace use needed a separate commercial licence. But free is not the same as open. The desktop app terms, in the version dated 23 August 2026, describe the software as "the exclusive property of Company and its suppliers", grant a "non-exclusive, non-transferable license" for personal use and internal business purposes, and prohibit reverse engineering and redistribution.

So LM Studio is fine for your staff to use on their own machines. It is the wrong base for something you plan to package and hand to a client, or embed in a product. For that, Ollama or llama.cpp. This is not legal advice: if a licence question matters to your business, read the terms yourself and ask your counsel.

Platforms and hardware

All three run on macOS, Windows and Linux, but the details differ.

LM Studio has the strictest requirements. On a Mac it needs Apple Silicon and macOS 14.0 or newer; its page says Intel Macs are "currently not supported". It recommends 16GB of RAM or more. On Windows it supports x64 with AVX2 and ARM (Snapdragon X Elite), and recommends at least 4GB of dedicated VRAM. On Linux it ships as an AppImage for x64 and ARM64, needs Ubuntu 20.04 or newer, and notes that versions newer than 22 are not well tested.

Ollama documents Metal on Apple devices, NVIDIA GPUs with compute capability 5.0 and above on driver 550 or newer (570 for the oldest cards), AMD GPUs through ROCm v7 on Linux and a narrower list of Radeon cards on Windows, and Vulkan on Windows and Linux. It also has an official Docker image, which makes it easy to run on a server.

llama.cpp has the widest list. Its build guide covers CPU builds with several BLAS libraries, Metal, CUDA, HIP for AMD, Vulkan, SYCL for Intel, MUSA, CANN for Huawei Ascend, ZenDNN and Arm KleidiAI. If your hardware is unusual, llama.cpp is the one most likely to support it.

APIs and integrations

All three give you an OpenAI-compatible endpoint on localhost, which means most code written for a hosted model works after changing the base URL. Beyond that:

  • Ollama documents /v1/chat/completions, /v1/completions, /v1/models, /v1/embeddings, a stateless /v1/responses, and audio endpoints, alongside its native API. It describes this as "a subset of the OpenAI API".
  • LM Studio documents /v1/models, /v1/responses, /v1/chat/completions, /v1/embeddings and legacy /v1/completions, with examples on port 1234, plus a REST API it marks as beta. It can also act as an MCP client, so you can attach MCP servers and use them with local models from the app.
  • llama-server lists OpenAI-compatible chat completions, responses and embeddings routes, an Anthropic Messages-compatible route, a reranking endpoint, monitoring endpoints, JSON schema constrained output, GBNF grammars, function calling for almost any model, speculative decoding and a built-in web chat app called Llama Chat.

If you are building agents, the structured output and grammar support in llama-server is worth knowing about. I explain why tool calls and constrained output matter in What is an AI agent?.

On models, Ollama gives you the easiest library, and can import your own GGUF files or Safetensors directories through a Modelfile. Its import page notes that it "does not quantize GGUF models during import", so you quantise with llama.cpp first. LM Studio finds and downloads GGUF and MLX models from inside the app. llama.cpp pulls GGUF files directly from Hugging Face with -hf, and its own tooling is what produces those quantisations in the first place. I cover the bits-per-weight arithmetic in The best local LLMs for 2027.

Serving more than one user

This is where the three behave most differently, and where people get surprised after a successful pilot.

Ollama. The FAQ says OLLAMA_NUM_PARALLEL defaults to 1 on most backends, with MLX on Metal choosing "a conservative default". Up to 512 requests queue by default (OLLAMA_MAX_QUEUE), and beyond that it returns a 503 overloaded error. It keeps up to three models loaded per GPU by default, and unloads a model after five minutes idle. The default context window is 4,096 tokens, whatever the model supports. You can raise all of these, but each parallel request needs more memory.

LM Studio. Since version 0.4.0, released on 28 January 2026, it supports parallel requests through continuous batching. Its documentation says the "Max Concurrent Predictions" setting defaults to 4, and that this is supported on the llama.cpp engine "with MLX coming soon". The 0.4.2 changelog, though, already announces "Parallel Requests with MLX" through continuous batching in mlx-engine 1.0.0, text only at that point. The docs page appears to lag the changelog, so check the version you install.

llama-server. The server README lists "parallel decoding with multi-user support" and continuous batching, which is on by default. The number of slots (-np) defaults to automatic, and the context size defaults to the model's own value rather than a fixed small number.

For one person, none of this matters. For five people sharing a machine, Ollama's defaults will queue requests one behind another until you tune them, while the other two batch from the start.

Security once it leaves your laptop

All three bind to 127.0.0.1 by default, which is correct. The risk starts when you open them to a network.

  • Ollama's FAQ shows how to change the bind address with OLLAMA_HOST. It does not document built-in authentication; put a reverse proxy with authentication and TLS in front.
  • LM Studio's network page warns that "any bind other than 127.0.0.1 exposes the server beyond localhost", recommends enabling authentication, and adds "only do this if you know what you're doing".
  • llama-server has an --api-key option, which accepts a comma-separated list of keys and defaults to none.

An API key is a start, not a security model. On a shared network I would still put a proxy in front, restrict the port with a firewall, and log access. Ollama also now offers cloud models next to local ones; if the point of running locally is that prompts stay on your hardware, use its local-only mode (OLLAMA_NO_CLOUD=1). And running a model locally does not by itself make a deployment compliant with PDPL or any other law; access control, logging and retention still decide that. I go through the whole architecture in How to build a private ChatGPT for your company.

When to move to vLLM

There is a point where none of the three is the right tool. vLLM describes itself as "a fast and easy-to-use library for LLM inference and serving", with PagedAttention for memory management, continuous batching, chunked prefill and prefix caching. It supports tensor, pipeline, data, expert and context parallelism across GPUs, quantisation formats including FP8, INT4, GPTQ, AWQ and GGUF, and an OpenAI-compatible server with Anthropic Messages API support. Its documentation lists NVIDIA and AMD GPUs and x86, ARM and PowerPC CPUs, with plugins for other hardware including Apple Silicon.

The signals that you have reached that point:

  • Several people or agents depend on the same model all day, and queueing is visible.
  • You have NVIDIA or AMD GPU servers rather than a Mac or a workstation.
  • You need to split one large model across several GPUs.
  • Long shared prompts, such as a system prompt or a document set, repeat across many requests, so prefix caching pays off.

If none of those is true, vLLM is extra operational weight for no gain.

How I would choose

  • One engineer, one laptop: Ollama. It installs in one command, runs as a service, and its OpenAI-compatible API means most agent frameworks can talk to it.
  • A colleague who will not open a terminal: LM Studio. The model browser and chat window are the point, and it is free for them to use at work.
  • A Mac, and speed matters: try both Ollama and LM Studio with an MLX model on your real workload, and keep the faster one. I would not trust a benchmark I had not run myself on that machine.
  • Something you will package for a client or ship inside a product: Ollama or llama.cpp, because of the licence. Not LM Studio.
  • A small team sharing one box: llama-server or LM Studio's server if you want batching without tuning, or Ollama with OLLAMA_NUM_PARALLEL raised and the memory to match. Behind a proxy with authentication in every case.
  • A GPU server for a department or an agent fleet: vLLM.

For my own internal agents I use a Mac Studio, and I am looking at Mac minis for client deployments; I wrote about why in Why I'm interested in Mac minis for local AI deployments. Whichever runtime you pick, the runtime is rarely the hard part. Choosing the model, sizing the memory and deciding what stays local and what goes to a hosted model take more thought, and for many companies the answer is a mix, which I cover in The best architecture is sometimes hybrid.

If you want a local model running inside your own network, on the right runtime, sized and secured properly, that is what my local AI deployment work covers.

Sources

  1. 01Ollama READMEOllama
  2. 02Ollama licenceOllama
  3. 03Ollama FAQOllama
  4. 04Ollama hardware supportOllama
  5. 05Ollama importing modelsOllama
  6. 06Ollama OpenAI compatibilityOllama
  7. 07LM Studio documentationLM Studio
  8. 08LM Studio system requirementsLM Studio
  9. 09LM Studio OpenAI compatibility endpointsLM Studio
  10. 10Introducing LM Studio 0.4.0LM Studio · JAN 2026
  11. 11LM Studio parallel requestsLM Studio
  12. 12LM Studio 0.4.2 changelogLM Studio
  13. 13LM Studio is free for use at workLM Studio · JUL 2025
  14. 14LM Studio Desktop App Terms of ServiceLM Studio · AUG 2026
  15. 15LM Studio serve on local networkLM Studio
  16. 16mlx-engineLM Studio
  17. 17llama.cpp READMEggml-org
  18. 18llama.cpp server READMEggml-org
  19. 19llama.cpp build guideggml-org
  20. 20vLLM documentationvLLM

If this was useful, follow what I’m building.

All notes →

Projects and case studies

All notes