#2828th of 56 in ML frameworks and libraries

transformers.js

Runs Hugging Face models in browser or Node via ONNX Runtime

Stars
16.3k
License
Apache-2.0
Last commit
Oct 2026
Last release
Oct 2026
Language
JavaScript

Missed the latest GitHub check; these facts may be older.

Overview

Transformers.js mirrors the Python transformers `pipeline` API in JavaScript and runs ONNX-converted models client-side with ONNX Runtime. It covers NLP, vision, audio and multimodal tasks such as text generation, speech recognition, text-to-speech, embeddings and object detection. It runs on CPU via WASM by default, with optional WebGPU and quantized dtypes (fp32, fp16, q8, q4).

Who it is for: JavaScript developers running ML models client-side in browsers or Node

Strengths

  • Pipeline API closely matches Python transformers, easing code translation
  • Runs in the browser with no server; models load from the Hugging Face Hub
  • Optional WebGPU and q4/q8/fp16 dtypes to cut download size and speed up inference
  • Wide task coverage: NLP, vision, audio, embeddings, document QA, background removal

Weaknesses

  • Models must be in ONNX format; others need conversion with Optimum
  • README calls WebGPU experimental in many browsers
  • Unsupported tasks include text-to-image, visual QA, mask generation and tabular tasks
  • Default setup fetches models and WASM binaries from remote hosts unless configured locally

What it needs

  • GPU optional
  • Needs ONNX Runtime, Hugging Face Hub (default model source)
  • Models: ONNX, Hugging Face Hub models

Also in ML frameworks and libraries

See all 56
Also in ML frameworks and libraries
RankProjectScore
1transformersPython library defining open models for text, vision, audio and multimodal tasks167.7k starsApache-2.095 out of 100
2pytorchPython tensor library with GPU support and tape-based autograd for deep learning104.7k starscustom license94 out of 100
3ultralyticsPython library and CLI for training and running YOLO vision models62.5k starsAGPL-3.092 out of 100
#4supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.2k starsMIT89 out of 100
#5pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts37.2k starsApache-2.089 out of 100