#3333rd of 55 in Model serving

llama-swap

Go proxy that starts and swaps local inference servers per request

Stars
6.1k
License
MIT
Last commit
Oct 2026
Last release
Oct 2026
Language
Go
Stars, last 30 weeks+3,209
26 Mar 2026: 2,853 stars2 Apr 2026: 2,985 stars9 Apr 2026: 3,100 stars16 Apr 2026: 3,262 stars23 Apr 2026: 3,520 stars30 Apr 2026: 3,679 stars7 May 2026: 3,815 stars14 May 2026: 3,993 stars21 May 2026: 4,141 stars28 May 2026: 4,249 stars4 Jun 2026: 4,331 stars11 Jun 2026: 4,433 stars18 Jun 2026: 4,613 stars25 Jun 2026: 4,725 stars2 Jul 2026: 4,814 stars9 Jul 2026: 4,902 stars16 Jul 2026: 4,970 stars23 Jul 2026: 5,079 stars30 Jul 2026: 5,167 stars6 Aug 2026: 5,246 stars13 Aug 2026: 5,310 stars20 Aug 2026: 5,396 stars27 Aug 2026: 5,460 stars3 Sept 2026: 5,539 stars10 Sept 2026: 5,610 stars17 Sept 2026: 5,670 stars24 Sept 2026: 5,734 stars1 Oct 2026: 5,792 stars8 Oct 2026: 5,902 stars15 Oct 2026: 5,977 stars22 Oct 2026: 6,062 stars

2,853 on 26 Mar 20266,062 on 22 Oct 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

llama-swap is a single Go binary that sits in front of local inference servers such as llama.cpp, vllm, stable-diffusion.cpp and audio.cpp. It reads the `model` field of each OpenAI- or Anthropic-style request, starts the matching server from a YAML `cmd`, and stops the previous one. It includes a web UI, API keys, TTL unloading and a matrix DSL for running models concurrently.

Who it is for: Self-hosters running several local models on one machine behind one API

Strengths

  • One binary and one YAML file, no external dependencies
  • Works with any OpenAI- or Anthropic-compatible upstream server, not only llama.cpp
  • Matrix DSL runs chosen models concurrently; ttl unloads idle ones
  • Built-in web UI with playground, token metrics, log streaming and Prometheus /metrics

Weaknesses

  • Does not run inference itself; you supply and configure the upstream servers
  • Originally designed for llama-server; Python servers like vllm should run in Docker or Podman
  • Swapping reloads the model, so the first request after a switch is slow
  • Auth is limited to API keys; no user accounts mentioned

What it needs

  • GPU optional
  • Docker
  • Needs llama.cpp or another OpenAI-compatible inference server
  • Models: GGUF via llama.cpp, vllm, stable-diffusion.cpp, whisper.cpp, audio.cpp
  • port 8080

Quick answers

Is llama-swap open source?

Yes. Its code is on GitHub under the MIT license.

Can you run llama-swap with Docker?

Yes. Its repository has a Docker setup: a Dockerfile, a Compose file or a published image.

Does llama-swap need a GPU?

No. It runs on a CPU and can use a GPU when you have one.

Also in Model serving

See all 55
Also in Model serving
RankProjectScore
1llama.cppC/C++ inference engine serving GGUF models over an OpenAI-compatible API132.2k starsMIT93 out of 100
2OllamaLocal model runner with CLI and REST API for open-weight LLMs184.6k starsMIT92 out of 100
3LocalAISelf-hosted inference server with OpenAI-compatible API and pluggable backends49.9k starsMIT90 out of 100
#4vLLMInference engine for Hugging Face LLMs with PagedAttention and continuous batching95.3k starsApache-2.088 out of 100
#5colibriC inference engine that streams MoE experts from disk to run huge models43.7k starsApache-2.085 out of 100