Transformers.js

Run ML models in the browser

README

Transformers.js


Run 🤗 Transformers in your browser! We currently support BERT, ALBERT, DistilBERT, T5, T5v1.1, FLAN-T5, mT5, GPT2, GPT Neo, BART, CodeGen, Whisper, CLIP, Vision Transformer, VisionEncoderDecoder, and DETR models, for a variety of tasks including: masked language modelling, text classification, text-to-text generation, translation, summarization, question answering, text generation, automatic speech recognition, image classification, zero-shot image classification, image-to-text, and object detection.

Check out our demo at https://xenova.github.io/transformers.js/. As you'll see, everything runs inside the browser!

Getting Started


Installation

If you use npm, you can install it using:
  1. ```bash
  2. npm i @xenova/transformers
  3. ```

Alternatively, you can use it in a `