Transformers.js v4: Now Available on NPM!
We’re excited to announce that Transformers.js v4 is now available on NPM! After a year of development (we started in March 2025 🤯), we’re finally ready for you to use it.
npm i @huggingface/transformers
Performance & Runtime Improvements
The biggest change is undoubtedly the adoption of a new WebGPU Runtime, completely rewritten in C++. We’ve worked closely with the ONNX Runtime team to thoroughly test this runtime across our ~200 supported model architectures, as well as many new v4-exclusive architectures.
In addition to better operator support (for performance, accuracy, and coverage), this new WebGPU runtime allows the same transformers.js code to be used across a wide variety of JavaScript environments, including browsers, server-side runtimes, and desktop applications. That’s right,