Transformers.js v4 Preview: Now Available on NPM!
About this article
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
Back to Articles Transformers.js v4 Preview: Now Available on NPM! Published February 9, 2026 Update on GitHub Upvote 63 +57 Joshua Xenova Follow Nico Martin nico-martin Follow We're excited to announce that Transformers.js v4 (preview) is now available on NPM! After nearly a year of development (we started in March 2025 🤯), we're finally ready for you to test it out. Previously, users had to install v4 directly from source via GitHub, but now it's as simple as running a single command! npm i @huggingface/transformers@next We'll continue publishing v4 releases under the next tag on NPM until the full release, so expect regular updates! 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, you can now run WebGPU-accelerated models directly in Node, Bun, and Deno! We've proven that it's possible to run state-of-the-art AI models 100% locally in the browser, and now we're focused on performance: making these models run as fast as possible, eve...