Grégory Lebreton eec6eb193b | 7 months ago | |
---|---|---|
app | 8 months ago | |
.dockerignore | 1 year ago | |
.env | 8 months ago | |
.gitignore | 1 year ago | |
Dockerfile | 8 months ago | |
README.md | 8 months ago | |
docker-compose.yaml | 7 months ago |
README.md
GARAGE GPT 👽
Projet pour héberger un Chat-GPT local s'appuyant sur le projet LocalAI utilisant une simple flaskapp comme frontend.
⚠️ seulement le model ggml-gpt4all-j (gpt-3.5-turbo) est pris en charge pour le moment
PREREQUIS 📎
- Docker 🐳
MODELS 🗿
- compatibles: LocalAI
- tous: HugginFace
CONFIGURATION 🔧
La configuration se fait dans le .env.local:
- THREADS -> nombre de cores du CPU utilisés (privilègier le nombre de cores physiques au max)
- DEFAULT_MODEL -> Le modèle chargé par défault (dans la RAM)
- PRELOAD_MODELS -> Renseigner les adresses des modèles que l'on veux télécharger via l'adresse https://github.com/go-skynet/model-gallery/model.yaml
⚠️ L'image LocalAI fait un peu plus de 12Go et les modèles 7B ou 13B font en moyenne 4 à 6Go
UTILISATION 🏁
- Premier lancement:
docker compose up -d
⌛ Attendre que la stack se build ☕
- L'interface est accessible à cette adresse:
- Après les premier lancement:
nano .env
REBUILD=false
A chaque modification des PRELOAD_MODELS, REBUILD=true
voir les logs
docker compose logs -f
OIDC 🔑
voir le README dans le projet flask-keycloak
MODELS OK
✅ ggml-gpt4all-j.bin (= gpt-turbo-3.5)
✅ stablediffusion (image generator)
- wizardlm-13b-v1.1-superhot-8k.ggmlv3.q4_0.bin
- open-llama-7b-q4_0.bin -> HS pour le moment
- whisper (audio to text)
- bloomz (traduction)
- wizardcode (code) -> URL model HS
TEST HARDWARE 💻
MODEL | PROMPT | i5-8350U 16G RAM | RYZEN 7 5800X 32G RAM | TEMP |
---|---|---|---|---|
GPT-TURBO-3.5 | WRITE JS FUNCTION | 41S | 16s | 0.5 |
STABLEDIFFUSION | BLUE FLOWER | 90s | 20S | X |
TO DO 📑
✅ une page gpt / une page stablediffusion avec navbar dans base.html
✅ Temperature bouton
✅ formater code (js
)
✅ Flask app frontend
✅ authentification Keycloak -> https://git.legaragenumerique.fr/GARAGENUM/flask-keycloak
✅ wsgi.py for prod + DNS
✅ Traduction via Argos-Translate 🇬🇧 -> 🇫🇷 et vice-versa
- shoot OIDC for kc-gatekeeper
- ajouter config Nginx (ai.domaine.tld + image.domaine.tld)
- bouton stop generating ?
- bouton home ?
- conserver context (sqlite / json / session ?)
- restart container si timeout
- utiliser GPU (cuda docker image)
- entraîner avec big GPU
bugs 👻
✅ permissions dossier models (root != user)
✅ image url en prod