feat(llm): lokales llama.cpp-Modell (va_llm) als zentrale, sprachoptimierte KI
- scripts/llm-server/: start/stop/status fuer llama.cpp-Server (Port 8001, GPU 1, Modell Qwen3.6-35B-A3B-Uncensored, Alias va_llm) - alles per ENV ueberschreibbar - Defaults auf den lokalen Server umgestellt (config.py, .example-Configs, .env.example) - Provider local-openai-compatible sprachoptimiert: Reasoning aus (chat_template_kwargs.enable_thinking=false) + knapper Sprach-System-Prompt, optional max_tokens/temperature - Antwort ~9x schneller, kurze vorlesbare Texte - Makefile-Targets llm-up/llm-down/llm-status - Doku (README, BEDIENUNGSANLEITUNG) auf llama.cpp statt Ollama aktualisiert Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
cd7aef852d
commit
28c729f1d4
11 changed files with 323 additions and 31 deletions
|
|
@ -29,8 +29,9 @@ Kurzüberblick: [README](README.md).
|
|||
für rein lokalen Betrieb (`local-dev`) nicht
|
||||
- Für **lokales STT** (Provider `faster-whisper`): einmalig `pip install -e .[local]`
|
||||
(lädt beim ersten Lauf ein Whisper-Modell). Für **lokales LLM**: ein laufender
|
||||
Ollama-Server (`http://127.0.0.1:11434`) mit einem Modell (`ollama pull llama3.2`)
|
||||
- Optional: Docker
|
||||
llama.cpp-Server (`http://127.0.0.1:8001/v1`) — starten mit `make llm-up`
|
||||
(siehe README, Abschnitt „Lokales LLM"). Großes, unzensiertes Modell, Default-Alias `va_llm`.
|
||||
- **Docker** (für den lokalen llama.cpp-Server) und eine NVIDIA-GPU
|
||||
|
||||
## 2. Installation
|
||||
|
||||
|
|
@ -226,8 +227,8 @@ Profil global umschalten (Entwickler/Admin): `VA_PROFILE=local-dev make run`.
|
|||
```bash
|
||||
# einmalig: lokales STT installieren
|
||||
pip install -e .[local]
|
||||
# Server mit kleinem lokalem Ollama-Modell (muss in 'ollama list' stehen):
|
||||
echo 'LOCAL_LLM_MODEL=llama3.2:latest' >> .env
|
||||
# lokalen llama.cpp-Server starten (Default: Port 8001, GPU 1, Alias va_llm):
|
||||
make llm-up # mit make llm-status auf "HTTP OK" warten
|
||||
make run
|
||||
# in Terminal 2 — Sprech-Loop mit der Hybrid-Kombi (MOTU = plughw:5,0):
|
||||
python scripts/voice_loop.py --recorder arecord --device plughw:5,0 --session hybrid \
|
||||
|
|
@ -236,7 +237,8 @@ python scripts/voice_loop.py --recorder arecord --device plughw:5,0 --session hy
|
|||
--llm-provider local-openai-compatible \
|
||||
--tts-provider openrouter
|
||||
```
|
||||
Erster Turn ist langsamer (Whisper- und Ollama-Modell laden), danach zügig. STT-Modell
|
||||
Erster Turn ist langsamer (Whisper-Modell lädt; das LLM-Modell ist nach `make llm-up`
|
||||
bereits geladen), danach zügig. STT-Modell
|
||||
und Gerät steuern `FASTER_WHISPER_MODEL`/`FASTER_WHISPER_DEVICE` in `.env`. Satzweises
|
||||
Vorlesen ist Standard (früher Ton); `--stream-text` zeigt den Text live dazu.
|
||||
|
||||
|
|
@ -245,6 +247,8 @@ Datenschutz). TTS läuft hier über **piper** (lokales, CPU-freundliches Neural-
|
|||
```bash
|
||||
# einmalig: lokales STT installieren
|
||||
pip install -e .[local]
|
||||
# lokalen llama.cpp-Server starten (großes, unzensiertes Modell):
|
||||
make llm-up # mit make llm-status auf "HTTP OK" warten
|
||||
# piper-Binary + Stimme bereitstellen: die Stimm-Dateien (<name>.onnx + <name>.onnx.json)
|
||||
# liegen im PIPER_VOICES_DIR (Default ~/.local/share/piper/voices). Deutsche Stimmen z. B.
|
||||
# von huggingface 'rhasspy/piper-voices' (de_DE-thorsten-high, de_DE-kerstin-low).
|
||||
|
|
@ -500,7 +504,7 @@ curl -s $URL/api/metrics | jq '.timers | to_entries
|
|||
| Use-Case | Empfehlung | Begründung |
|
||||
|----------|------------|------------|
|
||||
| Senioren-Standard (kein KI-Rechner zuhause) | **Profil `cloud`** | beste Qualität/Latenz ohne lokale Hardware (~4 s Round-Trip) |
|
||||
| Datenschutz / offline | `local-dev` | alles lokal — benötigt echte lokale Modelle (heute Platzhalter) |
|
||||
| Datenschutz / offline | `local-dev` | alles lokal: faster-whisper + llama.cpp (`va_llm`, unzensiert) + piper — benötigt GPU + `make llm-up` |
|
||||
| Kosten/Ausfallsicherheit | `hybrid` + `*_FALLBACK` | teure Teile lokal, Rest Cloud; automatischer Fallback |
|
||||
|
||||
Empfehlung für den Einstieg: **`cloud`** verwenden, Antwortzeiten mit C2 prüfen, dann
|
||||
|
|
@ -546,8 +550,8 @@ python scripts/voice_loop.py --recorder arecord --device plughw:5,0 --session te
|
|||
|
||||
### C5. Hybrid-Konstellation (STT + LLM lokal, TTS remote) — Kostenvergleich
|
||||
|
||||
Konstellation: **STT** lokal (`faster-whisper`) → **KI** lokal (Ollama, z. B. `llama3.1:8b`)
|
||||
→ **TTS** remote (Gemini/Zephyr). Befehl: siehe Hybrid-Beispiel in Teil B1.
|
||||
Konstellation: **STT** lokal (`faster-whisper`) → **KI** lokal (llama.cpp, großes
|
||||
unzensiertes Modell `va_llm`) → **TTS** remote (Gemini/Zephyr). Befehl: siehe Hybrid-Beispiel in Teil B1.
|
||||
|
||||
| | STT | LLM | TTS | API-Kosten/Runde |
|
||||
|---|-----|-----|-----|------------------|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue