selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

llama-gpt logo

Self-host llama-gpt

1.0.1

Offline ChatGPT-style chatbot powered by Llama 2 models

ReleaseOpen SourceMIT
Updated3 years ago
LanguageTypescript
Setup difficultyModerate
Stars
10 924
RAM
6.29GB
Ports
3000 (Chat web UI (host mapping 3000:3000)), 8000 (Model server / OpenAI-compatible API inside the container; published to the host as 3001)
Docker
ghcr.io/getumbrel/llama-gpt-ui
Install with Kubernetes

What is llama-gpt?

LlamaGPT is Umbrel's packaged local chatbot: a web chat front-end plus a llama-cpp-python model server, so a Llama 2 or Code Llama weights file answers prompts entirely on your own hardware and nothing is sent to a third party. It ships six preconfigured quantized models — Nous Hermes Llama 2 7B, 13B and 70B chat builds and Code Llama 7B, 13B and the Phind-tuned 34B — and on first launch it downloads the chosen weights into a ./models volume. The inference server speaks the OpenAI wire format and serves interactive docs at /docs, so existing OpenAI client code can point at it instead. Installation is one click from the Umbrel App Store on umbrelOS, via the run.sh Docker script on any x86 or arm64 host (with a --with-cuda flag for NVIDIA GPUs), via run-mac.sh with Metal acceleration on Apple Silicon Macs, or with the manifests under deploy/kubernetes. The chat UI listens on port 3000 and the API is published on 3001. The model list is fixed: loading custom models and switching between models were still open roadmap items, and the repository has had no pushes since April 2024.

Should you self-host llama-gpt?

llama-gpt scores 65/100 on selfhost.directory (how scoring works) and ranks #12 of 68 in AI Chat. It has 10 924 GitHub stars, -10 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is openhands (87/100, 93 041 stars). It scores higher overall, so compare the two before you pick. See llama-gpt vs openhands side by side.

Features

  • Apple Silicon Metal acceleration
  • Automatic model download
  • Code Llama model support
  • Custom model loadingRoadmap item, not released.
  • Llama 2 chat model supportFixed model list; custom models are on the roadmap.
  • NVIDIA CUDA GPU acceleration
  • Offline chat interface
  • OpenAI Compatible API

llama-gpt README

LlamaGPT

LlamaGPT

A self-hosted, offline, ChatGPT-like chatbot, powered by Llama 2. 100% private, with no data leaving your device.
New: Support for Code Llama models and Nvidia GPUs.

umbrel.com (we're hiring) »

How to install llama-gpt

Install llama-gpt with Kubernetes

a running Kubernetes cluster with kubectl configured
Environment variables
DEFAULT_MODEL, OPENAI_API_HOST, OPENAI_API_KEY, WAIT_HOSTS, WAIT_TIMEOUT
kubectl create ns llama

Then apply the manifests under the /deploy/kubernetes directory with

kubectl apply -k deploy/kubernetes/. -n llama

Expose the service as usual; kustomize manifests for API and UI deployments plus services.

How to configure llama-gpt

  • MODELPath of the model weights file loaded by the llama-cpp-python server.

    values: /models/<model file>

  • MODEL_DOWNLOAD_URLhttps://huggingface.co/TheBloke/Nous-Hermes-Llama-2-7B-GGML/resolve/main/nous-hermes-llama-2-7b.ggmlv3.q4_0.binURL the model weights are downloaded from on first run.
  • N_GQA1Grouped-query attention factor the server runs with; 8 for the 70B and 34B models, 1 otherwise.

    values: 1, 8

  • USE_MLOCK1Locks the model in memory for the API container (with IPC_LOCK capability).
  • OPENAI_API_KEYPlaceholder API key the UI sends to the local OpenAI-compatible server.

More in AI Chat

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…