Files
duffyduckandClaude Opus 4.8 8ae20a9bd8 feat(local-llm): B0.5 — llama-swap + lokale Modellauswahl in Diagnostic
Mehrere lokale Modelle, on-demand geladen/geswappt, in Diagnostic waehlbar.
Design: das Brain schickt den Modellnamen (aus local_llm.json) im llm_request
mit -> Adapter -> llama-swap laedt/swappt. Keine separate Gamebox-Config noetig.

- xtts: `llama`-Container -> `llama-swap` (unified-cuda), config.yaml mit
  qwen3-8b (Standard) + qwen3-4b; Auto-Download via -hf, Cache /models geteilt
  (qwen3-8b schon da). Adapter -> llama-swap:8080, Timeout 600s (Erst-Download).
- adapter: `model` aus dem Request an llama-swap durchreichen (Fallback env).
- brain: router.load_config liest localLlmModel; local_llm_chat(model=...);
  agent gibt cfg-Modell mit; bridge reicht model durch (_local_llm + Route).
- diagnostic: /api/local-models-list (aus /shared/config/local_models.json,
  seeded), local-llm-config um localLlmModel erweitert; Dropdown "Lokales
  Modell" im Settings-Block + Erst-Download-Hinweis.

BLIND gebaut (Gamebox nicht testbar hier): llama-swap CLI/Config-Pfad beim
ersten Start via `docker logs aria-llama-swap` pruefen. Live-Lade-Status
(Adapter->Diagnostic) ist B0.5-2 (Folgeschritt).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 14:11:59 +02:00

43 lines
1.6 KiB
YAML

# llama-swap Modell-Liste fuer ARIA (Plan B, B0.5).
# Welches Modell geladen wird, bestimmt das `model`-Feld im Request (das Brain
# schickt es aus /shared/config/local_llm.json mit). llama-swap laedt es
# on-demand, swappt bei Bedarf (nur eins passt gleichzeitig in die 12 GB).
# Erster Load zieht das GGUF via -hf von Hugging Face (Cache unter /models).
#
# Die Modell-KEYS hier muessen zu local_models.json (Diagnostic-Dropdown) passen.
#
# healthCheckTimeout: Sekunden, die llama-swap auf "Modell bereit" wartet.
# GROSSZUEGIG, weil der erste Load ein GGUF (mehrere GB) herunterlaedt. Wenn der
# erste Download laenger dauert und abbricht: hier hochsetzen.
healthCheckTimeout: 1800
models:
# Standard — Qwen3 8B (~6 GB Q4). Bestes Tool-Calling, passt auf 12 GB.
"qwen3-8b":
cmd: |
llama-server --port ${PORT} --host 127.0.0.1
-hf Qwen/Qwen3-8B-GGUF:Q4_K_M
-ngl 99 -c 8192 --jinja
ttl: 3600 # nach 1h Idle entladen (VRAM freigeben)
# Kleiner + schneller — Qwen3 4B (~3 GB). Fuer noch flottere Antworten,
# etwas schwaecher. Guter A/B-Vergleich gegen 8B.
"qwen3-4b":
cmd: |
llama-server --port ${PORT} --host 127.0.0.1
-hf Qwen/Qwen3-4B-GGUF:Q4_K_M
-ngl 99 -c 8192 --jinja
ttl: 3600
# ── Vorlagen fuer spaeter (auskommentiert; brauchen mehr VRAM / 2. Karte) ──
# "qwen3-14b":
# cmd: |
# llama-server --port ${PORT} --host 127.0.0.1
# -hf Qwen/Qwen3-14B-GGUF:Q4_K_M -ngl 99 -c 8192 --jinja
# ttl: 3600
# "mistral-small-3":
# cmd: |
# llama-server --port ${PORT} --host 127.0.0.1
# -hf <mistral-small-3-gguf-repo>:Q4_K_M -ngl 99 -c 8192 --jinja
# ttl: 3600