Keep max_new_tokens: 440 on Transformers.js 4.3.2 and pin the seek-loop condition it avoids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Winther
2026-10-29 22:59:35 +01:00
co-authored by Claude Opus 5.5
parent cd9aa48b83
commit 9f1d58c0b7
4 changed files with 41 additions and 6 deletions
+4 -3
View File
@@ -348,9 +348,10 @@ async function transcribe(message: TranscribeMessage): Promise<void> {
stride_length_s: STRIDE_LENGTH_S,
return_timestamps: true,
// With return_timestamps and no explicit max_new_tokens, Transformers.js
// 4.2's Whisper generate() takes a seek-loop path that re-decodes each
// window's tail (1–3 generate passes per window). Under this pipeline's
// own 30 s/5 s chunking that is pure overhead: ~1.4× slower on long
// 4.2–4.3 Whisper generate() takes a seek-loop path (D-021; re-measured
// on 4.3.2, D-WS1b) that re-decodes each window's tail (1–3 generate
// passes per window). Under this pipeline's own 30 s/5 s chunking that
// is pure overhead: ~1.4× slower on long
// files, duplicated boundary text, on_finalize firing once per pass
// (breaking TranscribeProgressTracker's one-finalize-per-window
// assumption — the progress bar saturated early, then looked frozen),