Open-source alternatives to OpenAI API

llama.cpp leads with 94, ahead of LocalAI (92) and Ollama (91). Updated from public GitHub data.

The highest-scoring open-source projects in Model serving. They are picks, not exact replacements, so read the weaknesses before you switch. The same picks fit if you are leaving OpenAI Platform.

Most stars
Ollama 188,212 stars
Open-source alternatives to OpenAI API
RankProjectScore
1llama.cppC/C++ inference engine for GGUF LLMs and VLMs with an OpenAI-compatible serverModel serving136.4k starsMIT94 out of 100
2LocalAISelf-hosted model server with OpenAI, Anthropic and ElevenLabs-compatible APIsModel serving50.6k starsMIT92 out of 100
3OllamaRuns open models locally through a CLI and REST APIModel serving188.2k starsMITknown advisory in latest version91 out of 100
#4strataDesktop and terminal app that runs GGUF models locally with OpenAI-compatible APIsModel serving48.3k stars+14,508 (+43%) in 30 daysMIT89 out of 100
#5modularMojo language and MAX inference framework with an OpenAI-compatible serverModel serving30.2k stars+188 (+0.6%) in 30 dayscustom license89 out of 100
#6vLLMInference engine serving LLMs with PagedAttention and an OpenAI-compatible APIModel serving97.6k starsApache-2.088 out of 100
#7colibriC inference engine that streams MoE experts from disk to run huge modelsModel serving53.6k stars+9,466 (+21%) in 30 daysApache-2.088 out of 100
#8llmfitTerminal tool that checks which LLMs and quantizations fit your hardwareModel serving39.3k stars+1,002 (+2.6%) in 30 daysMIT88 out of 100
#9omlxMLX-based LLM server for Apple Silicon with tiered KV cache and menu bar appModel serving24k stars+951 (+4.1%) in 30 daysApache-2.088 out of 100
#10XinferenceServes LLM, embedding, speech and image models behind an OpenAI-compatible APIModel serving9.7k starsApache-2.087 out of 100

Reviews

194 out of 100

llama.cpp

C/C++ inference engine for GGUF LLMs and VLMs with an OpenAI-compatible server

136.4k starsMITlast commit Nov 2026

llama.cpp runs quantized LLMs and vision-language models on CPUs and GPUs from a plain C/C++ codebase built on ggml. It ships a CLI (`llama cli`) and an OpenAI-compatible HTTP server (`llama serve`) with a built-in web UI, and can pull models directly from Hugging Face. Backends cover CUDA, HIP, Metal, Vulkan, SYCL, CANN, OpenCL and others, with CPU+GPU hybrid offload for models larger than VRAM.

Strengths

  • Many backends: CUDA, HIP, Metal, Vulkan, SYCL, CANN, MUSA, OpenCL, RPC, WebGPU
  • 1.5-bit to 8-bit integer quantization reduces memory use
  • CPU+GPU hybrid inference for models larger than VRAM
  • No dependencies in the core; prebuilt binaries, Docker and winget available

Weaknesses

  • OpenVINO backend is marked in progress
  • Building from source needs backend-specific toolchains such as CUDA or Vulkan SDKs
  • Built-in web UI is minimal next to dedicated chat front-ends
  • Interfaces are CLI and C API; no managed model library in the README
  • GPU optional
  • Docker
  • Models: GGUF, LLM, VLM, Hugging Face download
292 out of 100

LocalAI

Self-hosted model server with OpenAI, Anthropic and ElevenLabs-compatible APIs

50.6k starsMITlast commit Nov 2026

LocalAI is a Go server that runs LLMs, vision, speech, image and video models behind OpenAI-, Anthropic- and ElevenLabs-compatible HTTP APIs. Each of its 60+ backends (llama.cpp, vLLM, whisper.cpp, diffusers, MLX and others) ships as a separate OCI image, pulled when a model needs it. It also has a web UI, API key auth with quotas, MCP support and an optional distributed mode on PostgreSQL and NATS.

Strengths

  • Covers text, vision, speech, image and video models behind one API
  • Backends install on demand as OCI images, so unused engines are not pulled
  • Runs on CPU, NVIDIA CUDA 12/13, AMD ROCm, Intel oneAPI, Vulkan, Apple Silicon
  • Multi-user auth with API keys, quotas and roles; distributed mode for scaling out

Weaknesses

  • Distributed mode requires running PostgreSQL and NATS alongside the server
  • Broad scope: 60+ backends and frequent releases to keep up with
  • macOS DMG is not signed by Apple and needs a manual quarantine removal
  • vllm.cpp backend is described as alpha development builds
  • GPU optional
  • Docker + Compose
  • Needs PostgreSQL and NATS (distributed mode only)
  • Models: GGUF, safetensors, Hugging Face, Ollama OCI registry, OCI images
  • port 8080
391 out of 100

Ollama

Runs open models locally through a CLI and REST API

188.2k starsMITlast commit Nov 2026known advisory in latest version

Ollama downloads and runs open models locally or in the cloud through a CLI (`ollama run gemma4`) and a REST API on localhost:11434. It is written in Go, lists llama.cpp as its backend, and ships official Python and JavaScript client libraries. `ollama launch` can also connect it to tools such as Claude Code, Codex, OpenCode and OpenClaw.

Strengths

  • Installs via shell script, manual download on macOS/Windows, or the ollama/ollama Docker image
  • REST API with a chat endpoint plus official ollama-python and ollama-js libraries
  • `ollama launch` connects it to coding agents and the OpenClaw assistant
  • Large list of community integrations: chat UIs, RAG tools, SDKs, observability

Weaknesses

  • Only llama.cpp is listed as a supported backend
  • Models come from the ollama.com library; custom ones need import via Modelfile
  • Cloud option is mentioned, but its limits and pricing are not covered in the README
  • No built-in web chat UI described; front-ends are third-party projects
  • Docker
  • Models: Gemma 4, llama.cpp backend, Modelfile import
  • port 11434
#489 out of 100

strata

Desktop and terminal app that runs GGUF models locally with OpenAI-compatible APIs

48.3k stars+14,508 (+43%) in 30 daysMITlast commit Nov 2026

Strata is a C++ local inference engine packaged as a desktop app (Windows, Linux AppImage, macOS arm64 dmg) and a `strata launch` terminal app. It downloads an engine matched to your GPU on first start, runs quantized models such as Qwen3.8-Flash-Next and Qwen3.6-35B-A3B, and exposes OpenAI- and Anthropic-compatible APIs so tools like Claude Code, Codex CLI and OpenCode can connect via `strata connect`.

Strengths

  • Covers NVIDIA RTX 20-50, AMD Radeon, Intel Arc (Linux), Apple Silicon, Strix Halo and DGX Spark
  • Exposes OpenAI- and Anthropic-compatible APIs for Claude Code, Codex CLI, OpenCode and others
  • Desktop app plus terminal monitor showing speed, memory and recent requests
  • Low-bit quantizations (IQ1_M to Q8_0) documented per provider for fitting limited memory

Weaknesses

  • Documented models are limited to Qwen3.8-Flash-Next and Qwen3.6-35B-A3B
  • Intel Arc support is Linux only; AMD RX 6000 support is marked experimental
  • Engine is downloaded on first start, so initial setup needs network access
  • Install script is piped from GitHub releases; Docker is only documented separately
  • GPU required
  • Models: GGUF, Qwen3.8-Flash-Next, Qwen3.6-35B-A3B, NVFP4
#589 out of 100

modular

Mojo language and MAX inference framework with an OpenAI-compatible server

30.2k stars+188 (+0.6%) in 30 dayscustom licenselast commit Nov 2026

Monorepo for the open-source parts of the Modular Platform: the Mojo compiler and standard library, plus MAX, which includes a graph compiler, runtime, Mojo GPU kernels, Python model authoring and prebuilt model pipelines. MAX serves models through an OpenAI-compatible endpoint. Running from the repo uses Bazel via ./bazelw.

Strengths

  • Includes an OpenAI-compatible inference server under max/python/max/serve
  • Open Mojo compute kernels and GPU programming abstractions, source available since May 2025
  • Models can be authored in Python on the MAX framework, with ready-made pipelines
  • Mojo compiler and standard library source are included

Weaknesses

  • Mixed licensing: parts of MAX source and binaries fall under a separate MAX license
  • Only some components are open source; more are being released over time
  • The example text generation command requires a compatible GPU
  • Repo workflow depends on Bazel and the Mojo language, unlike typical Python servers
  • GPU required
  • Needs Bazel (via ./bazelw)
  • Models: Hugging Face models (e.g. Qwen/Qwen3.5-0.8B)
#688 out of 100

vLLM

Inference engine serving LLMs with PagedAttention and an OpenAI-compatible API

97.6k starsApache-2.0last commit Nov 2026

vLLM is a Python library and server for LLM inference. It manages attention KV memory with PagedAttention, batches requests continuously, and exposes an OpenAI-compatible API, plus Anthropic Messages API and gRPC. It runs 200+ Hugging Face model architectures on NVIDIA, AMD and Intel GPUs, several CPU types, and hardware plugins such as TPUs and Gaudi.

Strengths

  • Continuous batching, chunked prefill, prefix caching and speculative decoding (n-gram, EAGLE and others)
  • Tensor, pipeline, data, expert and context parallelism for multi-GPU serving
  • Many quantization formats: FP8, NVFP4, INT4, GPTQ/AWQ, GGUF and more
  • Wide hardware coverage: NVIDIA, AMD, Intel GPUs, x86/ARM/PowerPC CPUs, plus plugins

Weaknesses

  • Aimed at server-scale deployments; distributed features need tuning knowledge
  • TPU, Gaudi, Ascend and other hardware run through separate plugins
  • No built-in chat UI or user management; API server only
  • Install has an extra step to download precompiled kernels
  • GPU optional
  • Docker
  • Models: Hugging Face models, Llama, Qwen, Gemma, Mixtral
#788 out of 100

colibri

C inference engine that streams MoE experts from disk to run huge models

53.6k stars+9,466 (+21%) in 30 daysApache-2.0last commit Nov 2026

colibri is a pure-C inference engine for large mixture-of-experts models such as GLM-5.2 (744B), Kimi K3 and DeepSeek V4 Flash. It keeps the dense layers in RAM and reads routed experts from disk through a learned cache, with optional CUDA or Vulkan offload. It serves a browser dashboard plus OpenAI- and Anthropic-style endpoints on port 8000.

Strengths

  • Runs models up to 2.8T parameters on CPU only, with disk streaming of experts
  • One-step setup script picks a model that fits RAM and disk, and resumes downloads
  • Exposes OpenAI and Anthropic base URLs, plus an MCP server for setup
  • README lists measured tok/s per model and machine, with the hardware named

Weaknesses

  • Large models are slow: GLM-5.2 0.05-0.1 tok/s cold on a 25 GB laptop
  • Downloads are big: 23 GB for the smallest chat model, 1.56 TB for Kimi K3
  • Discrete GPU path not measured by the authors; only one user report
  • Supports a fixed list of model families; other architectures are not covered
  • RAM ≥ 8 GB
  • GPU optional
  • Docker + Compose
  • Needs Python 3, C compiler (build-essential or Xcode tools), libomp (macOS), CUDA toolkit or Vulkan driver (optional)
  • Models: GLM-5.2/5.3, GLM-5.3-Flash, Kimi K3, DeepSeek V4 Flash, MiMo-V2.6
  • port 8000
#888 out of 100

llmfit

Terminal tool that checks which LLMs and quantizations fit your hardware

39.3k stars+1,002 (+2.6%) in 30 daysMITlast commit Nov 2026

llmfit detects CPU, RAM, GPU and VRAM (CUDA, ROCm, Apple Silicon, Intel oneAPI), then scores a catalog of models on memory fit, estimated speed, quality and context. It ships a TUI, a CLI with JSON output, and an HTTP server with a web dashboard and REST API. It estimates rather than serves models, and can measure real tok/s against a running provider.

Strengths

  • Detects NVIDIA, AMD, Apple Silicon and Intel accelerators, including multi-GPU and unified memory
  • Handles MoE models and GGUF, AWQ, GPTQ and EXL2 quantizations in estimates
  • JSON CLI output and REST endpoints (/api/v1/system, /api/v1/models) suit scripts and pipelines
  • Installs via winget, Scoop, Homebrew, MacPorts, uv or cargo; ships a multi-arch Docker image

Weaknesses

  • Speed and memory figures are estimates unless you benchmark on your own hardware
  • Cluster mode for Ray is a preview, tested only against a mock dashboard
  • Recommends models but does not serve them for inference
  • Model catalog is built in; unlisted models need a custom entry
  • GPU optional
  • Docker
  • Needs Ollama (optional), llama.cpp (optional), MLX (optional), LM Studio (optional), Docker Model Runner (optional)
  • Models: GGUF, AWQ, GPTQ, EXL2
  • port 8787
#988 out of 100

omlx

MLX-based LLM server for Apple Silicon with tiered KV cache and menu bar app

24k stars+951 (+4.1%) in 30 daysApache-2.0last commit Nov 2026

oMLX serves MLX-format LLMs, VLMs, OCR models, embeddings and rerankers on Apple Silicon through OpenAI- and Anthropic-compatible APIs on port 8000. It uses continuous batching and a block-based KV cache that spills from RAM to SSD, so prefixes survive context changes and server restarts. A native SwiftUI menu bar app and a web admin dashboard handle model loading, pinning, settings and benchmarks.

Strengths

  • Hot RAM and cold SSD KV cache persists across requests and server restarts
  • OpenAI and Anthropic-compatible endpoints, plus embeddings, rerank and audio transcription
  • Per-model pinning, TTL, LRU eviction and a memory limit (default system RAM minus 8GB)
  • One-click setup for Codex, OpenCode, Copilot and other coding agents from the dashboard

Weaknesses

  • Apple Silicon and macOS 15+ only; no Linux or Windows server
  • Native custom kernels need full Xcode; GLM-5.2, MiniMax M3, Qwen3.5 are much slower without them
  • Multi-Mac distributed inference is experimental and source-build only
  • MCP support is an optional extra install, not included by default
  • GPU required
  • Needs macOS 15+, Python 3.11-3.13, Xcode (for custom kernels), mlx-lm
  • Models: MLX, GGUF (via Splash external engine), safetensors
  • port 8000
#1087 out of 100

Xinference

Serves LLM, embedding, speech and image models behind an OpenAI-compatible API

9.7k starsApache-2.0last commit Nov 2026

Xinference runs language, embedding, speech recognition, image and multimodal models from one server started with `xinference-local`. It exposes an OpenAI-compatible REST API (including function calling), plus RPC, a CLI and a web UI, and can spread inference across multiple workers. A Community Edition is self-hosted; Enterprise, Cloud and a hosted Model API are sold separately.

Strengths

  • Covers LLM, embedding, audio, image and multimodal models in one server
  • OpenAI-compatible REST API with function calling, plus CLI, RPC and web UI
  • Distributed multi-node deployment; Docker image and Helm chart for Kubernetes
  • Multiple engines, including vLLM and llama.cpp via the team's xllamacpp binding

Weaknesses

  • README gives no RAM or VRAM requirements; sizing depends on the chosen model
  • Docker instructions target Nvidia GPUs; other accelerators are not described in the README
  • Enterprise, Cloud and Model API offerings are commercial; feature differences are not listed
  • README is mostly a news and model-support list, with little on configuration
  • GPU optional
  • Models: LLMs, embedding models, speech recognition, text-to-speech, image generation
  • port 9997