Back to directory

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

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.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.