# Transformers.js

> Run Hugging Face Transformers models in the browser

Source: https://talira.ai/catalog/transformers-js-wsg4q67k
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [ai / ml / model libraries](https://talira.ai/categories/ai/ml/model-libraries), [ai / inference / runtimes](https://talira.ai/categories/ai/inference/runtimes), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Supports: [ONNX](https://talira.ai/standards/onnx.md)[^3]
- Backed by: [Hugging Face](https://talira.ai/orgs/hugging-face.md)

Transformers.js is Hugging Face's JavaScript library for running pretrained machine learning models directly in the browser, with no server, designed to be functionally equivalent to the Python [Transformers](https://talira.ai/catalog/transformers-fxs828eh.md) library with a very similar pipeline API. It covers natural language processing (classification, question answering, summarization, translation, text generation), computer vision (classification, object detection, segmentation, depth estimation), audio (speech recognition, text-to-speech) and multimodal tasks such as embeddings and zero-shot classification. Models run with [ONNX Runtime](https://talira.ai/catalog/onnx-runtime-82vyrppc.md), on the CPU through WebAssembly by default or on the GPU through WebGPU, and PyTorch, TensorFlow or JAX models can be converted to ONNX with Optimum. It installs from npm or loads from a CDN without a bundler.

## Links

- Website: https://huggingface.co/docs/transformers.js
- GitHub: https://github.com/huggingface/transformers.js
- Docs: https://huggingface.co/docs/transformers.js

## Problems it solves

- run a sentiment or embedding model in the browser without a server
- transcribe speech client-side in a web app
- use Hugging Face models from JavaScript

## Features

- pipeline API like the Python Transformers library
- NLP, vision, audio and multimodal tasks
- runs in the browser on CPU (WebAssembly) or GPU (WebGPU)
- loads from npm or a CDN without a bundler
- convert PyTorch, TensorFlow or JAX models to ONNX with Optimum

## Trust

Overall: 0.65 out of 1.
Signals: maintenance 0.79, adoption 0.84, momentum 0.77, community 0.79, backing 0.30, extensibility 0.00.

- last commit 7 days ago
- 28 commits in the last 90 days
- latest release 4.3.2 33 days ago
- 16.5k GitHub stars
- 92 contributors
- backed by Hugging Face

## Related

- Works with [ONNX Runtime](https://talira.ai/catalog/onnx-runtime-82vyrppc.md)

## Alternatives

- [TensorFlow.js Models](https://talira.ai/catalog/tensorflow-js-models-gcv5d7zm.md): Pretrained models for TensorFlow.js as npm packages: image, pose, face, hand, speech and text

## Sources

[^1]: https://github.com/huggingface/transformers.js/blob/main/README.md (checked 28 Nov 2026)
[^2]: https://github.com/huggingface/transformers.js/blob/main/LICENSE (checked 28 Nov 2026)
[^3]: https://github.com/huggingface/transformers.js/blob/main/README.md (checked 29 Nov 2026)
