Navid MoazzezNavid Moazzez

Transformers.js

Run Transformers directly in your browser, with no need for a server!

Transformers.js is designed to be functionally equivalent to Hugging Face's transformers python library, meaning you can run the same pretrained models using a very similar API. These models support common tasks in different modalities, such as: Natural Language Processing: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation. Computer Vision: image classification, object detection, segmentation, and depth estimation. Audio: automatic speech recognition, audio classification, and text-to-speech. Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection.

Transformers.js uses ONNX Runtime to run models in the browser. The best part about it, is that you can easily convert your pretrained PyTorch, TensorFlow, or JAX models to ONNX using Optimum.

View Transformers.js on GitHub
Navid MoazzezCurated by Navid Moazzez·Updated Sept 30, 2026·1 min read·
Transformers.js

Run Transformers directly in your browser, with no need for a server!

Transformers.js is designed to be functionally equivalent to Hugging Face's transformers python library, meaning you can run the same pretrained models using a very similar API. These models support common tasks in different modalities, such as: Natural Language Processing: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation. Computer Vision: image classification, object detection, segmentation, and depth estimation. Audio: automatic speech recognition, audio classification, and text-to-speech. Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection.

Transformers.js uses ONNX Runtime to run models in the browser. The best part about it, is that you can easily convert your pretrained PyTorch, TensorFlow, or JAX models to ONNX using Optimum.

Transformers.js at a glance

Stars16k
Forks1.2k
LanguageJavaScript
LicenseApache-2.0
Last update2026-09-25
Contributors82

How to install Transformers.js

bash npm i @huggingface/transformers