# huggingface/transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!

Repository: https://github.com/huggingface/transformers.js
Canonical: https://ross.abutalabs.com/products/transformersjs
Homepage: https://huggingface.co/docs/transformers.js
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: browser, javascript, transformers, webml
Last push: 2026-08-26T10:02:04+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 80, longevity 92
- inputs: {"age_days": 1297, "days_push": 7, "days_rel": 132, "gap_med": 9, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 16270, forks 1184 (observed 2026-08-28T04:11:15.020714+00:00)

## What it is
Transformers.js is a JavaScript library that lets you run Hugging Face Transformers pretrained models directly in the browser (or Node.js) using ONNX Runtime, with no server required. It offers a pipeline API functionally equivalent to the Python transformers library, covering NLP, computer vision, audio, and multimodal tasks.

## Use cases
- run sentiment analysis in the browser without a server
- do object detection on uploaded images client-side
- transcribe speech to text in a web app
- translate text multilingually in a React app
- generate text embeddings for semantic search in JavaScript
- classify images or audio with zero-shot models in the browser
- run text generation or summarization locally in the user's browser

## When to choose
- you want privacy-preserving, client-side ML inference with no backend or API costs
- you want to use Hugging Face pretrained models from JavaScript with a familiar pipeline API
- you're building a web app (vanilla JS, React, Next.js) that needs NLP, vision, or audio ML features
- you want models cached in the browser for fast offline-capable inference

## When to avoid
- you need to train or fine-tune models — this is inference only
- you need maximum performance or very large models better suited to GPU servers
- your model architecture isn't supported by ONNX Runtime / Optimum conversion
- you're working in Python — use the transformers library instead

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-inference, nlp, computer-vision, speech-recognition, tts, image-processing, audio-processing
- domain: machine-learning, deep-learning, computer-vision, web-development, artificial-intelligence
- platform: browser, wasm
- tags: onnx-runtime, transformers, client-side-inference, hugging-face, webml, pretrained-models, natural-language-processing, nodejs, javascript

## Member repositories
- huggingface/transformers.js (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:15.020714+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:05:09.706727+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/transformers.js (fetched 2026-08-28T04:11:15.020714+00:00, sha 401df7f8d6af)
  - homepage: https://huggingface.co/docs/transformers.js (fetched 2026-08-29T08:03:05.426310+00:00, sha 1223e94e767d)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T08:03:05.432673+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/transformers.js/installation (fetched 2026-08-29T08:03:05.437829+00:00, sha 3c35d566188a)
  - site_page: https://huggingface.co/docs/transformers.js/pipelines (fetched 2026-08-29T08:03:05.439951+00:00, sha 3370190dcb7b)
  - site_page: https://huggingface.co/docs/transformers.js/custom_usage (fetched 2026-08-29T08:03:05.442418+00:00, sha 405368d5497a)
  - site_page: https://huggingface.co/docs/transformers.js/tutorials/vanilla-js (fetched 2026-08-29T08:03:05.448277+00:00, sha 2cbc9b01dc2d)
  - site_page: https://huggingface.co/docs/transformers.js/tutorials/react (fetched 2026-08-29T08:03:05.450783+00:00, sha 9500c5e2a849)
  - site_page: https://huggingface.co/docs/transformers.js/tutorials/next (fetched 2026-08-29T08:03:05.453130+00:00, sha 6830708f880e)
  - site_page: https://huggingface.co/pricing (fetched 2026-08-29T08:03:05.435307+00:00, sha de6b7a178be5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
