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 WintherandClaude Opus 5.5 committed 2026-10-29 22:59:35 +01:00
1 parent cd9aa48b83
commit 9f1d58c0b7
4 files changed
+41 -6

No files matched your search

+3 -3
View File
@@ -82,16 +82,16 @@ onnxruntime-node 1.30.0), bun:test.
**Files:** Modify `tests/transformers-runtime.test.ts`, `docs/Decisions.md`,
`src/worker/inference.worker.ts` (comment only: "4.2" → "4.2–4.3", cite D-WS1b).
- [ ] **Step 1: Test** `"Whisper generate still takes the seek loop when max_new_tokens is unset (D-021)"`
- [x] **Step 1: Test** `"Whisper generate still takes the seek loop when max_new_tokens is unset (D-021)"`
— `src/models/whisper/modeling_whisper.js` contains
`if (generation_config.return_timestamps && !kwargs.max_new_tokens)`. Run → PASS expected
(tripwire; it encodes the revisit condition, verified against the 4.3.2 source).
- [ ] **Step 2: Measure** (`/tmp/ws1/d021.ts`, onnxruntime-node, under the lock): tiny.en q8 on
- [x] **Step 2: Measure** (`/tmp/ws1/d021.ts`, onnxruntime-node, under the lock): tiny.en q8 on
`en_alien.opus` (ffmpeg-static → 16 kHz f32), pipeline options as the worker
(`chunk_length_s 30, stride_length_s 5, return_timestamps true`), with and without
`max_new_tokens: 440`; record wall-clock, generate-pass count (wrap `model.generate`), window
count, WER vs `en_alien.txt` (`tests/dsp.ts` `wordErrorRate`).
- [ ] **Step 3:** `D-WS1b` with the numbers; keep `max_new_tokens: 440` unless the seek path is now
- [x] **Step 3:** `D-WS1b` with the numbers; keep `max_new_tokens: 440` unless the seek path is now
both faster and not worse on WER. Commit.
### Task 3: D-014 re-test (WASM graphOptimizationLevel)