Repository navigation
Conversation
Update @huggingface/transformers from 3.7.2 to 4.3.2. It pins onnxruntime-web 1.31.0-dev.20260914-8d85527a0 (was 1.21.0), whose Wasm build moves from Emscripten 4.0.3 to 4.0.23. Models and inputs are bit-identical. - transformers.js 4.x is bundled with esbuild instead of Webpack, so transformers.js.patch (a fix for Webpack's publicPath detection in shells) is gone. - benchmark.js adds a Headers polyfill, since 4.x reads response headers, and routes env.fetch and a missing global fetch through the preload redirect. - benchmark.js deletes Atomics.waitAsync. ONNX Runtime runs single-threaded, but Emscripten's pthread setup registers an async waiter that never resolves and keeps the jsc shell alive. - build.sh logs the transformers.js and ORT versions, and util/package.json pins transformers.js to exactly 4.3.2. ort-wasm-simd-threaded.wasm grows from 11.1 MB to 14.3 MB, with 14% more SIMD instructions. The transformers.js bundle shrinks by 39%. Score change, d8 (15.9.60) / jsc (325217) / SpiderMonkey (160.0b3) (each test alone in a fresh shell, 6 rounds): transformersjs-bert-wasm +1.5% / +7.4% / +4.5% transformersjs-whisper-wasm +1.7% / +2.7% / +2.0% Part of WebKit#277.
✅ Deploy Preview for webkit-jetstream-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #277.
Update @huggingface/transformers from 3.7.2 to 4.3.2. It pins onnxruntime-web 1.31.0-dev.20260914-8d85527a0 (was 1.21.0), whose Wasm build moves from Emscripten 4.0.3 to 4.0.23. Models and inputs are bit-identical.
To review (4 files, +38/−19; the other 4 files are build output):
transformers.js.patch(a fix for Webpack'spublicPathdetection in shells) is gone.benchmark.jsadds aHeaderspolyfill, since 4.x reads response headers, and routesenv.fetchand a missing globalfetchthrough the preload redirect.benchmark.jsdeletesAtomics.waitAsync. ONNX Runtime runs single-threaded, but Emscripten's pthread setup registers an async waiter that never resolves and keeps thejscshell alive.build.shlogs the transformers.js and ORT versions, andutil/package.jsonpins transformers.js to exactly 4.3.2.Binaries:
ort-wasm-simd-threaded.wasmgrows from 11.1 MB to 14.3 MB, with 14% more SIMD instructions; the transformers.js bundle shrinks by 39%.Scores (measured on a Linux x64 workstation with
jsvushells, each test alone in a fresh shell, 6 rounds; change of the mean score, bold = statistically significant at 95% confidence; @kmiller68 may want to check on macOS / arm64):d8(15.9.60)jsc(325217)transformersjs-bert-wasmtransformersjs-whisper-wasmFirst and Average subscores
d8First / AveragejscFirst / Averagetransformersjs-bert-wasmtransformersjs-whisper-wasm