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:
1 parent
cd9aa48b83
commit
9f1d58c0b7
4 files changed
+41
-6
No files matched your search
@@ -47,4 +47,11 @@ describe("@huggingface/transformers runtime", () => {
|
||||
expect(body).toContain("Promise.all(");
|
||||
expect(body).toContain("for (const name of Object.keys(names))");
|
||||
});
|
||||
|
||||
test("Whisper generate still takes the seek loop when max_new_tokens is unset (D-021, D-WS1b)", () => {
|
||||
// The worker's `max_new_tokens: 440` exists only to dodge this branch.
|
||||
// If upstream changes the condition, re-measure D-021 before touching it.
|
||||
const source = read(join(PKG_DIR, "src/models/whisper/modeling_whisper.js"));
|
||||
expect(source).toContain("if (generation_config.return_timestamps && !kwargs.max_new_tokens)");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user