# Transformers.js changelog > Run Hugging Face transformer models directly in the browser or Node. - Vendor: Hugging Face - Category: AI - Official site: https://huggingface.co/docs/transformers.js - Tracked by: What's New (https://whatsnew.fyi/product/transformers-js) - Harvested from: GitHub (huggingface/transformers.js) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## Releases ### 4.0.1 - Date: 2026-04-23 - Version: 4.0.1 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/4.0.1 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/4.0.1 - **added** — Add support for Gemma 4 ##### What's new? - Add support for [Gemma 4](https://deepmind.google/models/gemma/gemma-4/) in [#1627](https://github.com/huggingface/transformers.js/pull/1627) **Full Changelog**: [4.0.0...4.0.1](https://github.com/huggingface/transformers.js/compare/4.0.0...4.0.1) ### 4.2.0 - Date: 2026-04-23 - Version: 4.2.0 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/4.2.0 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/4.2.0 - **added** — Add tools parameter to TextGenerationPipeline - **changed** — Use inputMetadata API for simplified internals - **added** — Add support for OpenAI privacy filter model #### 🚀 Transformers.js v4.2 — Tool calling, simpler internals, and privacy filtering - Added `tools` to `TextGenerationPipeline` in [#1655](https://github.com/huggingface/transformers.js/pull/1655) - Use `inputMetadata` API for simplified internals in [#1657](https://github.com/huggingface/transformers.js/pull/1657) - Add support for OpenAI privacy filter model in [#1658](https://github.com/huggingface/transformers.js/pull/1658) **Full Changelog**: [4.1.0...4.2.0](https://github.com/huggingface/transformers.js/compare/4.1.0...4.2.0) ### 4.1.0 - Date: 2026-04-23 - Version: 4.1.0 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/4.1.0 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/4.1.0 - **added** — Add support for Gemma 4 - **added** — Add support for q1, q1f16, q2, and q2f16 data types - **changed** — Improve cached generation with past_key_values via pipeline function - **changed** — Improve tokenizer types based on input function parameters - **changed** — Update default generation parameters - **fixed** — Re-enable SmolVLM #### 🚀 Transformers.js v4.1 — Gemma 4, KV cache improvements, and new quantization dtypes - Add support for Gemma 4 in [#1627](https://github.com/huggingface/transformers.js/pull/1627) - Cached generation improvements (+ `past_key_values` via pipeline function) in [#1638](https://github.com/huggingface/transformers.js/pull/1638) - Improve tokenizer types based on input function parameters in [#1641](https://github.com/huggingface/transformers.js/pull/1641) - Add support for `q1`, `q1f16`, `q2`, and `q2f16` data types in [#1647](https://github.com/huggingface/transformers.js/pull/1647) - Re-enable SmolVLM in [#1648](https://github.com/huggingface/transformers.js/pull/1648) - Update default generation parameters in [#1649](https://github.com/huggingface/transformers.js/pull/1649) - Pin GitHub Actions to commit SHAs in [#1626](https://github.com/huggingface/transformers.js/pull/1626) **Full Changelog**: [4.0.0...4.1.0](https://github.com/huggingface/transformers.js/compare/4.0.0...4.1.0) ### 4.0.0 - Date: 2026-03-30 - Version: 4.0.0 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/4.0.0 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/4.0.0 - **added** — WebGPU backend completely rewritten in C++ with improved operator support for performance, accuracy, and coverage - **added** — WebGPU-accelerated models can now run in Node, Bun, and Deno in addition to browsers - **added** — Support for models exceeding 8B parameters, with tested performance of GPT-OSS 20B at approximately 60 tokens per second on M4 Pro Max - **added** — Support for Apertus model architecture - **added** — Support for FalconH1 model architecture - **added** — Support for Cohere's Tiny Aya models - **added** — Support for AFMoE model architecture - **added** — Support for Qwen2.5-VL, Qwen3-VL, Qwen3.5, and Qwen3.5 MoE models - **added** — Support for Qwen2 MoE, Qwen3 MoE, Qwen3 Next, Qwen3-VL MoE, and Olmo Hybrid models - **added** — Support for EuroBERT model architecture - **added** — Support for LightOnOCR and GLM-OCR models - **added** — Support for Nemotron-H model architecture - **added** — Support for DeepSeek-v3 model architecture - **added** — Support for mistral4 model architecture - **added** — Support for GLM-MoE-DSA model architecture - **added** — Support for Chatterbox model architecture - **added** — Support for Cohere ASR models - **added** — Support for SolarOpen and CHMv2 models - **added** — Support for Voxtral Realtime, LFM2-VL, and Granite Speech models - **added** — Support for Gemma3 VLM architecture - **changed** — Model export strategy redesigned to use specialized ONNX Runtime Contrib Operators for improved performance #### 🚀 Transformers.js v4 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. ```sh npm i @huggingface/transformers ``` Links: [YouTube Video](https://www.youtube.com/watch?v=KnhppkY4gHs), [Blog Post](https://huggingface.co/blog/transformersjs-v4), [Demo Collection](https://huggingface.co/collections/webml-community/transformersjs-v4-demos) ##### New WebGPU backend 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! WebGPU Overview 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, even in resource-constrained environments. This required completely rethinking our export strategy, especially for large language models. We achieve this by re-implementing new models operation by operation, leveraging specialized ONNX Runtime [Contrib Operators](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md) like [com.microsoft.GroupQueryAttention](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.GroupQueryAttention), [com.microsoft.MatMulNBits](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.MatMulNBits), or [com.microsoft.QMoE](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.QMoE) to maximize performance. For example, adopting the [com.microsoft.MultiHeadAttention](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.MultiHeadAttention) operator, we were able to achieve a ~4x speedup for BERT-based embedding models. Optimized ONNX Exports * ONNX Runtime improvements by @xenova in https://github.com/huggingface/transformers.js/pull/1306 * Transformers.js V4: Native WebGPU EP, repo restructuring, and more! by @xenova in https://github.com/huggingface/transformers.js/pull/1382 ##### New models Thanks to our new export strategy and ONNX Runtime's expanding support for custom operators, we've been able to add many new models and architectures to Transformers.js v4. These include popular models like GPT-OSS, Chatterbox, GraniteMoeHybrid, LFM2-MoE, HunYuanDenseV1, Apertus, Olmo3, FalconH1, and Youtu-LLM. Many of these required us to implement support for advanced architectural patterns, including Mamba (state-space models), Multi-head Latent Attention (MLA), and Mixture of Experts (MoE). Perhaps most importantly, these models are all compatible with WebGPU, allowing users to run them directly in the browser or server-side JavaScript environments with hardware acceleration. We've released several [Transformers.js v4 demos](https://huggingface.co/collections/webml-community/transformersjs-v4-demos) so far... and we'll continue to release more! Additionally, we've added support for larger models exceeding 8B parameters. In our tests, we've been able to run GPT-OSS 20B (q4f16) at ~60 tokens per second on an M4 Pro Max. * Add supp _[Truncated at 4000 characters — full notes: https://github.com/huggingface/transformers.js/releases/tag/4.0.0]_ ### 3.8.1 - Date: 2025-12-02 - Version: 3.8.1 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.8.1 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.8.1 - **added** — Add support for Ministral 3 - **fixed** — Fix Ernie 4.5 naming - **changed** — Update Supertonic TTS paper and authors ##### What's new? * Add support for Ministral 3 in https://github.com/huggingface/transformers.js/pull/1474 * Fix Ernie 4.5 naming in https://github.com/huggingface/transformers.js/pull/1473 * Update Supertonic TTS paper + authors in https://github.com/huggingface/transformers.js/pull/1463 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.8.0...3.8.1 ### 3.8.0 - Date: 2025-11-19 - Version: 3.8.0 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.8.0 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.8.0 - **added** — Add support for EdgeTAM - **added** — Add support for Supertonic TTS - **added** — Add support for SAM2 and SAM3 (Tracker) - **removed** — Remove Metaspace add_prefix_space logic - **changed** — ImageProcessor preprocess uses image_std for fill value #### 🚀 Transformers.js v3.8 — SAM2, SAM3, EdgeTAM, Supertonic TTS * Add support for EdgeTAM in https://github.com/huggingface/transformers.js/pull/1454 * Add support for Supertonic TTS in https://github.com/huggingface/transformers.js/pull/1459 **Example:** ```js import { pipeline } from '@huggingface/transformers'; const tts = await pipeline('text-to-speech', 'onnx-community/Supertonic-TTS-ONNX'); const input_text = 'This is really cool!'; const audio = await tts(input_text, { speaker_embeddings: 'https://huggingface.co/onnx-community/Supertonic-TTS-ONNX/resolve/main/voices/F1.bin', }); await audio.save('output.wav'); ``` * Add support for SAM2 and SAM3 (Tracker) in https://github.com/huggingface/transformers.js/pull/1461 * Remove Metaspace add_prefix_space logic in https://github.com/huggingface/transformers.js/pull/1451 * ImageProcessor preprocess uses image_std for fill value by @NathanKolbas in https://github.com/huggingface/transformers.js/pull/1455 ##### New Contributors * @NathanKolbas made their first contribution in https://github.com/huggingface/transformers.js/pull/1455 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.7.6...3.8.0 ### 3.7.6 - Date: 2025-10-20 - Version: 3.7.6 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.7.6 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.7.6 - **fixed** — Fix issue when temperature=0 and do_sample=true - **fixed** — Fix type errors - **added** — Add support for NanoChat - **added** — Add support for Parakeet CTC ##### What's new? * Fix issue when `temperature=0` and `do_sample=true` by @nico-martin in https://github.com/huggingface/transformers.js/pull/1431 * Fix type errors by @nico-martin in https://github.com/huggingface/transformers.js/pull/1436 * Add support for NanoChat in https://github.com/huggingface/transformers.js/pull/1441 * Add support for Parakeet CTC in https://github.com/huggingface/transformers.js/pull/1440 ##### New Contributors * @nico-martin made their first contribution in https://github.com/huggingface/transformers.js/pull/1431 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.7.5...3.7.6 ### 3.7.5 - Date: 2025-10-02 - Version: 3.7.5 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.7.5 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.7.5 - **added** — Add support for GraniteMoeHybrid model ##### What's new? * Add support for GraniteMoeHybrid in https://github.com/huggingface/transformers.js/pull/1426 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.7.4...3.7.5 ### 3.7.4 - Date: 2025-09-29 - Version: 3.7.4 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.7.4 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.7.4 - **fixed** — Correctly assign logits warpers in _get_logits_processor ##### What's new? * Correctly assign logits warpers in `_get_logits_processor` in https://github.com/huggingface/transformers.js/pull/1422 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.7.3...3.7.4 ### 3.7.3 - Date: 2025-09-12 - Version: 3.7.3 - Original notes: https://github.com/huggingface/transformers.js/releases/tag/3.7.3 - Permalink: https://whatsnew.fyi/product/transformers-js/releases/3.7.3 - **changed** — Unify inference chains - **fixed** — Fix progress tracking bug - **added** — Add support for MobileLLM-R1 (llama4_text) - **added** — Add support for VaultGemma ##### What's new? * Unify inference chains in https://github.com/huggingface/transformers.js/pull/1399 * Fix progress tracking bug by @kukudixiaoming in https://github.com/huggingface/transformers.js/pull/1405 * Add support for MobileLLM-R1 (llama4_text) in https://github.com/huggingface/transformers.js/pull/1412 * Add support for VaultGemma in https://github.com/huggingface/transformers.js/pull/1413 ##### New Contributors * @kukudixiaoming made their first contribution in https://github.com/huggingface/transformers.js/pull/1405 **Full Changelog**: https://github.com/huggingface/transformers.js/compare/3.7.2...3.7.3