M8: GPU 파인튜닝 시험 학습 (large-v3-turbo LoRA, CER 4.8% → 1.8%)

- train_lora: GPU 에서 원본 가중치 bf16 적재(VRAM 절반, 최대 2.7GB), 라벨 절반을 타임스탬프 형식으로
  (notimestamps 로만 학습하면 앱의 타임스탬프 모드에서 끝맺음을 잊고 문장 뒤에 말을 지어냄)
- evaluate: 앱과 같은 타임스탬프 모드로 측정
- finetune-e2e: GVR_FT_BASE/STEPS/SYNTH
- README·테스트 기록: M7·M8 완료

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-15 04:21:57 +09:00
parent c32236c3b8
commit 24585e3603
6 changed files with 104 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
// M8 파인튜닝 통합 확인: 사이트 교정(PATCH) → 학습 데이터 → Finetuner(실제 run.py) → CER 비교 → 모델 교체·되돌리기
// GVR_FINETUNE_PYTHON=../worker/.venv-ft/bin/python node --import tsx scripts/finetune-e2e.mts
// 개발 서버는 CPU 라 whisper-tiny, 몇 스텝만 돈다 (파이프라인 확인용. 실제 학습은 게임 PC GPU 에서 large-v3-turbo).
// 기본은 CPU whisper-tiny 몇 스텝 (파이프라인 확인용).
// GPU 시험 학습: GVR_FT_BASE=openai/whisper-large-v3-turbo GVR_FT_STEPS=0(=epochs 기준) GVR_FT_SYNTH=300
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
@@ -35,7 +36,9 @@ const ft = new Finetuner(core, () => undefined);
console.log('학습 도구', ft.python());
const before = core.settings.get().stt.realtimeModel;
const t0 = Date.now();
await ft.start({ base: 'openai/whisper-tiny', maxSteps: 3, synthCount: 16, exportAlways: true });
const ftBase = process.env.GVR_FT_BASE || 'openai/whisper-tiny';
const ftSteps = process.env.GVR_FT_STEPS !== undefined ? Number(process.env.GVR_FT_STEPS) : 3;
await ft.start({ base: ftBase, maxSteps: ftSteps, synthCount: Number(process.env.GVR_FT_SYNTH || 16), exportAlways: ftBase.endsWith('tiny') });
console.log(`소요 ${((Date.now() - t0) / 1000).toFixed(0)}초`);
console.log('결과', ft.status.lastResult);
console.log(ft.status.log.slice(-4).join('\n'));