# Transformers.js

A JavaScript library that runs Hugging Face Transformers models directly in the browser with no server, using an API similar to the Python Transformers library, for natural language, vision, audio and multimodal tasks.

Transformers.js runs Hugging Face Transformers models directly in the browser, with no server required. It is designed to be functionally equivalent to the Python Transformers library, using a similar pipeline API so existing knowledge of that library carries over.

It supports common tasks across modalities: natural language processing tasks such as text classification, named entity recognition, question answering, summarization, translation and text generation; computer vision tasks such as image classification, object detection, segmentation and depth estimation; audio tasks such as speech recognition, audio classification and text-to-speech; and multimodal tasks such as embeddings and zero-shot classification.

It runs models through ONNX Runtime, and pretrained PyTorch, TensorFlow or JAX models can be converted to ONNX using Hugging Face Optimum. It installs from npm or can be loaded directly from a CDN as an ES module.

Website: https://huggingface.co/docs/transformers.js
