feat(local-llm): B0 — GGUF Auto-Download via llama.cpp -hf (kein manuelles Ablegen)

Statt einer manuell abgelegten Datei zieht llama.cpp das Modell beim ersten
Start selbst von Hugging Face (-hf Qwen/Qwen3-8B-GGUF:Q4_K_M, offizielles
Repo verifiziert) und cached es unter xtts/models (persistent). Modell/Quant
via LLM_HF_REPO/LLM_HF_QUANT in der .env wechselbar, kein Code.

Diagnostic-Modellauswahl (on-demand laden/aktivieren mehrerer Modelle) als
Folge-Baustein B0.5 via llama-swap ins Plan-Doc aufgenommen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 10:33:59 +02:00
co-authored by Claude Opus 4.8
parent 98c78af7ad
commit b5ba54d05f
4 changed files with 59 additions and 21 deletions
+12 -4
View File
@@ -93,10 +93,16 @@ services:
# ─── Lokales LLM (Plan B, B0) — llama.cpp-Server (GPU) ────────
# Serviert Qwen3-8B (GGUF Q4_K_M) OpenAI-kompatibel auf :8081, NUR im
# Compose-Netz (kein RVS direkt) — die Bruecke macht der llm-adapter.
# Modell-Datei nach ./models/ legen: siehe llm-adapter/README.md.
#
# AUTO-DOWNLOAD: llama.cpp zieht das GGUF beim ersten Start selbst von
# Hugging Face (-hf <repo>:<quant>) und cached es unter /models (persistent
# via Bind-Mount -> kein Re-Download bei Restart). Kein manuelles Ablegen
# noetig. Modell wechseln = LLM_HF_REPO/LLM_HF_QUANT in der .env aendern +
# Container neu. (Alternativ lokale Datei: command auf -m /models/x.gguf.)
#
# VRAM auf der RTX 3060 (12 GB): whisper-small (~1-2) + f5tts (~1-2) +
# qwen3-8b-q4 (~6) ~= 9-10 GB. Passt, aber knapp — bei OOM: LLM_CTX kleiner
# oder Modell auf Q4_K_S/IQ4 wechseln.
# oder Quant auf Q4_K_S/IQ4_XS wechseln.
llama:
image: ghcr.io/ggml-org/llama.cpp:server-cuda
container_name: aria-llama
@@ -108,9 +114,11 @@ services:
count: 1
capabilities: [gpu]
volumes:
- ./models:/models
- ./models:/models # HF-Download-Cache (persistent)
environment:
- LLAMA_CACHE=/models # llama.cpp legt -hf-Downloads hier ab
command: >
-m /models/${LLM_GGUF:-qwen3-8b-q4_k_m.gguf}
-hf ${LLM_HF_REPO:-Qwen/Qwen3-8B-GGUF}:${LLM_HF_QUANT:-Q4_K_M}
--host 0.0.0.0 --port 8081
-ngl 99 -c ${LLM_CTX:-8192} --jinja
restart: unless-stopped