Upgrade @huggingface/transformers to 4.3.2 and carry the sequential-session patch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-29 21:44:18 +01:00
1 parent 9607c8558f
commit 753ea03979
8 files changed
+136 -67

No files matched your search

+28
View File
@@ -1224,3 +1224,31 @@ whole-file output is equally bad, which is exactly what the absolute bar
exists to catch.
**Consequence:** full `bun test` ≈ 19 min on CPU (en_alien ≈ 20 min of it
on a cold run); the fast suite excludes this file.
## D-WS1a — Transformers.js 4.2.0 → 4.3.2, sequential-session patch carried over
**Status:** Accepted (2026-10-29, spec 001 Goal 1)
`@huggingface/transformers` is now pinned to exactly `4.3.2` (latest; 4.3.0
added Safari 26+ WebGPU). It brings onnxruntime-web
`1.31.0-dev.20260914-8d85527a0` (was `1.26.0-dev.20260416`) and
onnxruntime-node `1.30.0` (was `1.24.3`).
**Patch.** Upstream `constructSessions` (`dist/transformers.web.js`) is
still the bare `Promise.all` over sub-model sessions, so D-027/D-028's
`options.sequentialSessionLoad` branch is still needed. Regenerated with
`bun patch` as `patches/@huggingface%2Ftransformers@4.3.2.patch` (the same
hunk, byte-identical apart from line offsets); the 4.2.0 patch is deleted.
The version is pinned exactly (no caret) because the patch is keyed by
version: a caret range would let a fresh lockfile resolve a version the
patch does not apply to.
**Guard.** `tests/transformers-runtime.test.ts` (fast suite) fails if the
installed version, the `patchedDependencies` key, or the patched
`constructSessions` body drift apart — a lost patch would otherwise only
show up as mobile tab crashes.
**Unchanged by the bump:** onnxruntime-web's WebGPU bundle still loads the
`ort-wasm-simd-threaded.asyncify.{mjs,wasm}` pair (same as 1.26), and
`scripts/build.ts` / `/ort/` already copy every `ort-wasm-*` file.
**Parakeet (for spec 001 Goal 7):** 4.3.2 supports only the CTC variant —
`ParakeetForCTC` (`model_type: "parakeet_ctc"`, routed through the ASR
pipeline's wav2vec2/CTC path) plus `ParakeetFeatureExtractor`. There is no
TDT/RNN-T (transducer) decoder or joint-network loop anywhere in the
package, so **Parakeet TDT 0.6B v3 is not supported natively**; per the
spec, that path uses `parakeet.js`.