llama-swap

Hot-swap proxy that runs many local AI servers behind one OpenAI- and Anthropic-compatible API.

Quick answer

llama-swap is a hot-swap proxy that runs many local AI servers behind one OpenAI- and Anthropic-compatible API, listed under Local model runtimes. A typical small-business use: serve many GGUF or vLLM models on one machine without leaving them all loaded. The project publishes no official RAM figure, so we do not estimate a monthly server cost. License: MIT, which allows internal business use.

Last updated · facts verified against official docs on · sources

GitHub stars6.3k
Forks551
Latest releasev275Nov 20, 2026
Last commitNov 22, 2026
Est. server cost—

Activity data comes from GitHub and was last refreshed Nov 23, 2026.

What is llama-swap?

llama-swap is a single Go binary that starts the local inference server a request asks for (llama.cpp, vLLM, stable-diffusion.cpp, whisper.cpp, ComfyUI and other OpenAI- or Anthropic-compatible servers) and unloads the previous one, or keeps several loaded with a swap matrix. It exposes chat, embeddings, audio, image and Anthropic Messages endpoints, plus a web UI, from one config file.

Where it fits in a 10–200 person business

  • Serve many GGUF or vLLM models on one machine without leaving them all loaded
  • One OpenAI-compatible endpoint for a team chat UI that switches models by name
  • Add idle timeouts (ttl) so VRAM is freed when a model is unused

These use cases are our editorial suggestions, not claims made by the project.

Can a business use llama-swap? (license)

LicenseMIT
TypePermissive: MIT / Apache-2.0: use, modify and sell with few obligations.
Internal business useAllowed under the license text
What to watchPermissive. Internal and commercial use allowed; keep the copyright notice. Models and upstream servers keep their own licenses.

This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.

Data & compliance: does llama-swap phone home?

Telemetry (usage data sent to the vendor) Not documented
Other calls home by default (updates, marketplaces, default cloud services) Not documented
Single sign-on (OIDC / SAML / LDAP) Not documented
Audit log Not documented
Role-based access control (RBAC) Not documented
Data residency / GDPR notes from the project Not documented

Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.

What hardware does llama-swap need?

The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.

GPU: Optional. A CPU image is published (ghcr.io/mostlygeek/llama-swap:cpu). The recommended unified images target NVIDIA (CUDA 12 or 13) or Vulkan GPUs. RAM and VRAM depend on the upstream server and model you configure, not on llama-swap itself.

No official CPU, RAM or disk figures are published for llama-swap. Size the machine for the inference server you put behind it.

Source: github.com/mostlygeek/llama-swap#docker-install-download-images

How much does it cost to host llama-swap per month?

The project publishes no RAM figure we could verify, so we do not estimate a cost.

How to deploy llama-swap

Method: Docker (or a single binary)

docker pull ghcr.io/mostlygeek/llama-swap:unified-cuda13
docker run -it --rm --runtime nvidia -p 9292:8080 \
  -v /path/to/models:/models \
  -v /path/to/custom/config.yaml:/etc/llama-swap/config/config.yaml \
  ghcr.io/mostlygeek/llama-swap:unified-cuda13

From the official instructions: github.com/mostlygeek/llama-swap#docker-install-download-images. Always check the source for the current version before you run it.

Known gotchas when self-hosting llama-swap

  • Behind nginx, disable response buffering and caching on streaming routes (/api/events and /v1/chat/completions). Default nginx buffering breaks Server-Sent Events and streaming chat. source
  • When you publish a container port, keep LLAMA_SWAP_LISTEN on 0.0.0.0 (the unified image default). Binding the process to localhost inside the container is not reachable through -p. source
  • You must supply a config file that names each model and its start command. The unified image default path is /etc/llama-swap/config/config.yaml (or set LLAMA_SWAP_CONFIG). source

Alternatives in Local model runtimes

llama-swap FAQ

How much RAM does llama-swap need?

llama-swap does not publish an official RAM figure, so we do not state one. Size the machine for the inference server you put behind it.

Does llama-swap need a GPU?

Optional. A CPU image is published (ghcr.io/mostlygeek/llama-swap:cpu). The recommended unified images target NVIDIA (CUDA 12 or 13) or Vulkan GPUs. RAM and VRAM depend on the upstream server and model you configure, not on llama-swap itself.

How much does it cost to self-host llama-swap?

The software is free to download. The project publishes no official RAM figure, so we do not estimate a monthly server cost.

Is llama-swap free for commercial use?

llama-swap is licensed under MIT (Permissive). Internal business use is allowed under the license text. Permissive. Internal and commercial use allowed; keep the copyright notice. Models and upstream servers keep their own licenses. This is a summary, not legal advice.

What are common problems when self-hosting llama-swap?

Behind nginx, disable response buffering and caching on streaming routes (/api/events and /v1/chat/completions). Default nginx buffering breaks Server-Sent Events and streaming chat. When you publish a container port, keep LLAMA_SWAP_LISTEN on 0.0.0.0 (the unified image default). Binding the process to localhost inside the container is not reachable through -p. You must supply a config file that names each model and its start command. The unified image default path is /etc/llama-swap/config/config.yaml (or set LLAMA_SWAP_CONFIG).

Is llama-swap still maintained?

Yes, it is actively developed. Last commit: Nov 22, 2026. Latest release: v275 (Nov 20, 2026). Checked Nov 23, 2026.

How do I install llama-swap?

The official method is Docker (or a single binary). The exact commands are in the "How to deploy" section above and in the official instructions: https://github.com/mostlygeek/llama-swap#docker-install-download-images

What are self-hosted alternatives to llama-swap?

Other apps in Local model runtimes: Ollama, llama.cpp, vLLM, LocalAI, TextGen (text-generation-webui), SGLang, llamafile, KTransformers, TensorRT LLM, Xinference, Lemonade, GPUStack, Text Embeddings Inference, Harbor (local LLM stack), RamaLama, Infinity.

Sources

Facts on this page were checked against the project's own repository and docs on 2026-11-10. Spotted something out of date? Tell us.