From fdae4ce119d197904eec642e2fedb7612ba3efb7 Mon Sep 17 00:00:00 2001 From: schakal00783 Date: Thu, 16 Jul 2026 23:04:57 +0200 Subject: [PATCH] =?UTF-8?q?rkllm=20vor=20Diar/Identify=20freigeben=20?= =?UTF-8?q?=E2=80=94=20TitaNet-OOM=20neben=20residentem=20LLM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit llm.stopServer() am Anfang von rediarize() und analyzeRecording(): spk-embed starb sonst OOM (48 Roh-Sprecher auf #71). E2E #71: 48->2 Sprecher + saubere Whole-Pass-Summary. Offen: identify-spk-Fehler auch mit freiem RAM (Voice-Auto-Naming tot). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0113vDKdSNtD3Dwcw4QMu9yV --- app/server.js | 9 +++++++++ docs/08-changelog.md | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/server.js b/app/server.js index fd5fdfc..20c6bd9 100644 --- a/app/server.js +++ b/app/server.js @@ -86,6 +86,11 @@ async function identifySpeakers(recData) { // and a long Gemma generation hit 95-97°C uncapped on the fanless board (#70, // 16-min run) — same shutdown risk transcribeWav/rediarize already guard against. async function analyzeRecording(id) { + // Free the resident rkllm (~5.9GB) BEFORE identifySpeakers: the TitaNet + // spk-embed helper OOM-dies next to it ("spk beendet" per cluster, #71 got + // 48 raw speakers). llm.analyze() below respawns it (~96s load, noise + // against a 15-min analysis). + llm.stopServer(); await pexec('sudo', ['-n', '/opt/callrec/aime-cpucap.sh', '1608000']).catch(() => {}); try { const rec = await db.getRecording(id); @@ -261,6 +266,10 @@ async function rediarize(id, numSpeakers) { const wav = path.join(REC_DIR, r.wav_file); if (!fs.existsSync(wav)) throw new Error('wav-Datei nicht gefunden: ' + r.wav_file); const words = r.words || []; + // Free the resident rkllm first — diar's consolidation embeds every cluster + // via TitaNet, which OOM-dies next to a resident 5.9GB LLM (see + // analyzeRecording; on #71 that silently yielded 48 raw speakers). + llm.stopServer(); // Diarization runs on the A76 cores; the board is fanless, so cap the clock // for the whole run (transcribeWav does this for the record path — rediarize // is the other entry point and must do it too, or a long re-diar overheats). diff --git a/docs/08-changelog.md b/docs/08-changelog.md index 0202c47..21651e2 100644 --- a/docs/08-changelog.md +++ b/docs/08-changelog.md @@ -3,6 +3,17 @@ Chronik der Entwicklungsschritte. **Regel: jede zukünftige Änderung bekommt hier einen Eintrag** (Datum, Was, Warum, betroffene Dateien/Backups). +## 2026-07-16 — rkllm vor Diar/Identify freigeben (TitaNet-OOM) + #71 validiert + +- **Bug:** residenter rkllm (5,9 GB) ließ den TitaNet-spk-embed-Helper OOM-sterben („spk beendet" pro + Cluster) → Konsolidierung bekam NULL Centroids → #71 bekam still **48 Roh-Sprecher**. Fix (`server.js`): + `llm.stopServer()` am Anfang von `rediarize()` UND `analyzeRecording()` (Reload ~96 s, egal bei 15-min-Analysen). +- **#71 E2E danach:** Diar 48 → **2 Sprecher** (5 schwache gefoldet), Qwen3-Whole-Pass auf 31,3k Zeichen → + „Steuergestaltung für wachsendes Unternehmen" mit konkreten Zahlen (30 MA, 3 Mio Umsatz, 15-20 %-Ziel, + Kick-off Hamburg, Termin 23.) — alter Titel war generisch, alte Sprecherzahl 28. +- **OFFEN:** `identify … spk beendet` schlägt auch MIT freiem RAM fehl → Voice-Auto-Naming (Voiceprints) + aktuell tot; Teilnehmer erscheinen als „Sprecher N". Separater Bug, noch zu untersuchen (spk.js/Helper). + ## 2026-07-16 — ✅ LLM → **Qwen3-4B-Instruct-2507** (Nacht; Gemma-Rollback vorhanden) Auf User-Wunsch Qwen3-4B selbst konvertiert und im A/B gegen Gemma getestet — **3/3 Prompts klar besser**,