mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2024-11-11 16:09:18 +00:00
Add LlamaGPT (#727)
Co-authored-by: nmfretz <nmfretz@gmail.com> Co-authored-by: Mayank Chhabra <mayankchhabra9@gmail.com>
This commit is contained in:
parent
2e6dd39f69
commit
9942f06028
23
llama-gpt/docker-compose.yml
Normal file
23
llama-gpt/docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
app_proxy:
|
||||
environment:
|
||||
APP_HOST: llama-gpt-ui
|
||||
APP_PORT: 3000
|
||||
|
||||
llama-gpt-api:
|
||||
image: ghcr.io/getumbrel/llama-gpt-api:1.0.1@sha256:57a4323a0254732a45841f447ae4ef733df6510413b692a0589c0e2b68d9ef51
|
||||
restart: on-failure
|
||||
environment:
|
||||
MODEL: '/models/llama-2-7b-chat.bin'
|
||||
|
||||
llama-gpt-ui:
|
||||
image: ghcr.io/getumbrel/llama-gpt-ui:1.0.1@sha256:1ad8a3463e7971b77e6deda8b6a230a42fbe283899d88e12448603e474fedaef
|
||||
restart: on-failure
|
||||
environment:
|
||||
- 'OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXXXXXX'
|
||||
- 'OPENAI_API_HOST=http://llama-gpt-api:8000'
|
||||
- 'DEFAULT_MODEL=/models/llama-2-7b-chat.bin'
|
||||
- 'WAIT_HOSTS=llama-gpt-api:8000'
|
||||
- 'WAIT_TIMEOUT=600'
|
34
llama-gpt/hooks/pre-install
Executable file
34
llama-gpt/hooks/pre-install
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Requirements
|
||||
REQUIRED_SPACE_GB="10"
|
||||
REQUIRED_MEMORY_GB="6"
|
||||
|
||||
# We need to kill the parent install process because exiting this script
|
||||
# only kills the current hook process not the parent. The user won't get
|
||||
# any visual feedback if we exit but it's better than letting them kill
|
||||
# their system.
|
||||
kill_app_install() {
|
||||
pkill --full "app install llama-gpt"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Check available space
|
||||
REQUIRED_SPACE_KB=$((REQUIRED_SPACE_GB * 1024 * 1024))
|
||||
UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../../..)"
|
||||
AVAILABLE_SPACE_KB=$(df "${UMBREL_ROOT}" | tail -1 | awk '{print $4}')
|
||||
if (( AVAILABLE_SPACE_KB < REQUIRED_SPACE_KB ))
|
||||
then
|
||||
echo "Not enough available storage space to install LlamaGPT. Exiting."
|
||||
kill_app_install
|
||||
fi
|
||||
|
||||
# Check available memory
|
||||
REQUIRED_MEMORY_KB=$((REQUIRED_MEMORY_GB * 1024 * 1024))
|
||||
TOTAL_MEMORY_KB=$(free | grep '^Mem' | awk '{print $2}')
|
||||
if (( TOTAL_MEMORY_KB < REQUIRED_MEMORY_KB ))
|
||||
then
|
||||
echo "Not enough system memory to install LlamaGPT. Exiting."
|
||||
kill_app_install
|
||||
fi
|
43
llama-gpt/umbrel-app.yml
Normal file
43
llama-gpt/umbrel-app.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
manifestVersion: 1.1
|
||||
id: llama-gpt
|
||||
category: ai
|
||||
name: LlamaGPT
|
||||
version: "1.0.0"
|
||||
tagline: Self-hosted, offline ChatGPT-like chatbot powered by Llama 2
|
||||
description: >-
|
||||
LlamaGPT is a self-hosted, offline, and private chatbot that provides a ChatGPT-like experience, with no data leaving your device.
|
||||
|
||||
|
||||
Note: The download size of LlamaGPT is about 5.5GB. Depending on your internet speed, it may take some time for it to be installed.
|
||||
|
||||
|
||||
LlamaGPT consumes approximately 5GB of RAM. As a result, it is not suitable for users running umbrelOS on a Raspberry Pi 4 with 4GB RAM. For the best user experience, at least 8GB RAM is recommended.
|
||||
|
||||
|
||||
LlamaGPT is optimized for the Umbrel Home, generating words as fast as ~3 words/sec. On a Raspberry Pi 4 with 8GB RAM, it generates words at ~1 word/sec. Performance can vary depending on which other apps are installed on your Umbrel.
|
||||
|
||||
|
||||
Powered by the state-of-the-art Nous Hermes Llama 2 7B language model, LlamaGPT is fine-tuned on over 300,000 instructions to offer longer responses and a lower hallucination rate.
|
||||
|
||||
|
||||
LlamaGPT has been made possible thanks to the incredible open source work from various developers and teams. We extend our gratitude to Mckay Wrigley for building the Chatbot UI, Georgi Gerganov for implementing llama.cpp, Andrei for developing the Python bindings for llama.cpp, NousResearch for fine-tuning the model, Tom Jobbins for quantizing the model, and Meta for releasing Llama 2 under a permissive license.
|
||||
|
||||
|
||||
An official app from Umbrel.
|
||||
releaseNotes: ""
|
||||
developer: Umbrel
|
||||
website: https://umbrel.com
|
||||
dependencies: []
|
||||
repo: https://github.com/getumbrel/llama-gpt
|
||||
support: https://community.umbrel.com
|
||||
port: 1234
|
||||
gallery:
|
||||
- 1.jpg
|
||||
- 2.jpg
|
||||
- 3.jpg
|
||||
path: ""
|
||||
deterministicPassword: false
|
||||
torOnly: false
|
||||
optimizedForUmbrelHome: true
|
||||
submitter: Umbrel
|
||||
submission: https://github.com/getumbrel/umbrel-apps/pull/...
|
Loading…
Reference in New Issue
Block a user