Skip to main content
AIDiveForge AIDiveForge

LocalAI

FreeOpen SourceAPISelf-Hosted

An OpenAI-compatible API server you run yourself: point existing OpenAI-API code at it and the model runs on your own machine.

Similar tools

Get This Tool

License: MIT Any use incl. commercial
Local-run terms: Open Source MIT Licensed. Users can freely install, modify, and distribute LocalAI under MIT license terms with no restrictions on commercial use.

Pricing

Model
Free

Summary

LocalAI is an MIT-licensed server that gives you an OpenAI-compatible API on your own hardware, so existing OpenAI code can run against local models. We installed v4.11.0 from the official Docker image and ran a 3B model (qwen2.5:3b) on a CPU-only server. The base image is small, 1.2 GB, because the engines that actually run models are separate backends. Its llama-cpp backend was a 165 MB download, and LocalAI's log warned that it installed it without signature verification. With the model loaded it used about 1.7 GB of memory, and back to back with llama.cpp its generation speed was the same within noise. At every start it tries to fetch its model gallery from the internet; when we blocked that, it logged a warning and kept serving.

Bottom line: Pick it when you want a drop-in local replacement for the OpenAI API in Docker. Set the thread count yourself in containers, and expect it to try to reach its online model gallery at start.

We installed and ran it

Tested October 16, 2026 by ForgeBench, our automated test bench · version v4.11.0 · MIT license

How we installed it
Official Docker image, plus its llama-cpp backend
Docker image size on disk
1.2 GB
Model we used
qwen2.5:3b (Q4_K_M GGUF, 1.9 GB)
Server start to first answer, model file not cached
6.4 s
Memory used by the model process
1.7 GB
Outside hosts it tried to reach (we blocked them)
index.localai.io, quay.io, raw.githubusercontent.com
  • LocalAI's Docker image does not include the engine that runs the model. Its llama-cpp backend is a separate download (local-ai backends install llama-cpp, 165 MB on disk, from quay.io), and LocalAI's log warned that it installed it without signature verification. On October 16, 2026 the image pull took about 13 s and the backend install about 4 s on our server's connection.
  • At every start it tried to load its model gallery from index.localai.io, raw.githubusercontent.com and quay.io. We blocked all three; it logged a warning and kept serving.
  • By default it started 8 threads inside a 3-core container, and text generation was 6.1x slower than with threads set to 3 in the model's config. The VM's CPU steal was high during that run (29%), so treat the size of that gap as approximate.

Measured against llama.cpp

Tested October 16, 2026 by ForgeBench, our automated test bench, on the same machine, back to back.

MeasuredLocalAIllama.cpp
Server start to first answer, model file not cached (s)6.43.5
Text generation speed, 53-token prompt, relative1x0.98x
Text generation speed, 441-token prompt, relative1x0.96x
Text generation speed, 723-token prompt, relative1x0.99x
Prompt reading speed, 53-token prompt, relative1x1.22x
Prompt reading speed, 441-token prompt, relative1x0.99x
Prompt reading speed, 723-token prompt, relative1x0.94x
Memory used by the model process (GB)1.71.6
Docker image size on disk (GB; LocalAI's backend is a separate download)1.21.21

Same GGUF model file, same 3 cores, same 4,096-token context, measured back to back in one session; LocalAI runs the model through its own llama-cpp backend. CPU steal: 12.8% during the llama.cpp run, 11.5% during LocalAI's, so differences under about 10% are within noise. LocalAI's image size does not include that backend, a separate 165 MB download. The llama.cpp numbers here come from a second llama.cpp run that day, not the one in the Ollama comparison.

LocalAI vs llama.cpp →

Test machine: 8-vCPU AMD EPYC 9354P cloud VM, each test limited to 3 cores and 10 GB RAM, no GPU, no internet (isolated Docker network). Times in seconds are from this CPU-only machine; a desktop with a GPU will be much faster. The VM is shared, so text-generation speed is shown only as a ratio between tools run back to back, not as tokens per second. Docker image size is the on-disk size from docker image ls for every tool. Local AI tools we tested · How we test · raw data

Find your fit

Before you choose LocalAI

More options in Local Inference Runtimes. Compare pricing, platforms, and features side by side.

Browse Local Inference Runtimes

Pros

  • OpenAI-compatible API, so code written for the OpenAI API can use a local endpoint by changing the base URL.
  • Backends download on demand, so the base image stays small (1.2 GB on disk in our test).
  • It kept serving when its online model gallery was blocked, so it works on an offline network.

Cons

  • The model engine is a separate download; in our test LocalAI logged that it installed the llama-cpp backend without signature verification.
  • It ignores a container's CPU limit when choosing threads; in a 3-core container that made generation about 6 times slower until we set threads in the model config.
  • Answer quality is limited by the open-weight model you can run on your hardware.

About

Platforms
Docker, Linux, macOS, Windows, CPU, NVIDIA GPU, AMD GPU, Intel GPU
API Available
Yes
Self-Hosted
Yes
Last Updated
June 9, 2026

Best For

Who it's for

  • Developers who already use the OpenAI API and want the same calls to run against a local model.
  • Self-hosted or offline setups that run services in Docker.

What it does well

  • Serving local models behind an OpenAI-compatible API
  • Switching existing OpenAI-API code to a self-hosted endpoint
  • Running models on CPU-only servers or with NVIDIA, AMD or Intel GPUs

Integrations

LangChainLangChain4jLingooseLLPhantHome AssistantVSCodeGitHub ActionsHelm

Frequently Asked Questions

Is LocalAI free?
LocalAI offers a free option. Hosting, model usage, or optional services may have separate costs; check the pricing details and official terms.
Is LocalAI open source?
Yes. LocalAI is open source — the source repository is at https://github.com/mudler/LocalAI.
Does LocalAI have an API?
Yes. LocalAI exposes a developer API. See the official documentation at https://localai.io for details.
Can I self-host LocalAI?
Yes. LocalAI supports self-hosting on your own infrastructure.
When was LocalAI released?
LocalAI was first released in 2023.
What platforms does LocalAI support?
LocalAI is available on: Docker, Linux, macOS, Windows, CPU, NVIDIA GPU, AMD GPU, Intel GPU.

LocalAI runs an OpenAI-compatible REST API on your own machine. Applications written against the OpenAI API can point at a LocalAI server instead, and the model runs locally. It is MIT-licensed and developed in the open at github.com/mudler/LocalAI by Ettore Di Giacinto and contributors.

The project ships Docker images for CPU-only machines and for NVIDIA CUDA, AMD ROCm, Intel GPU and Vulkan setups. The engines that actually run models are backends that LocalAI downloads separately, so the base image stays small and you install only the backends you use.

We installed version 4.11.0 from the official Docker image on a CPU-only server and ran the same 3B model file we used for Ollama and llama.cpp. The image was 1.2 GB on disk, and the llama-cpp backend was a second 165 MB download. With the model loaded it used about 1.7 GB of memory. Our measured results, including how its speed compared with llama.cpp run back to back, are in the test section on this page.

Two things to know before you deploy it. At every start it tries to fetch its model gallery from the internet; on an offline network it logs a warning and keeps serving. And it does not size its thread count to a container’s CPU limit: inside a 3-core container it started 8 threads and generated text about 6 times slower than with threads set to 3 in the model config, so set threads yourself when you limit CPUs.

Share This Tool

Back to comparison
Contribute