transformers.js
State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
💡 Why It Matters
This library enables running Hugging Face transformer models directly in the browser using ONNX Runtime, bypassing the need for a backend server. It offers a JavaScript API closely mirroring the popular Python transformers library, easing the transition for teams familiar with Hugging Face's ecosystem. By leveraging WebAssembly and optionally WebGPU, it runs models on the client side, reducing latency and privacy concerns tied to server calls. Frontend developers and ML engineers focusing on client-heavy applications will find it particularly useful. Despite over 16,000 stars and recent commits, the project shows limited growth momentum, indicating a niche but stable user base. It is not suited for heavy-duty server-side inference or large-scale model deployment where frameworks like Hugging Face Transformers in Python or TensorFlow Serving remain better options.
🎯 When to Use
Choose this library when you need to run transformer models entirely in the browser for low-latency inference without server dependency. For backend inference or large-scale model serving, consider Hugging Face Transformers in Python or ONNX Runtime on server environments instead, as they handle larger models and batch processing more efficiently.
👥 Team Fit & Use Cases
Typically used in web applications requiring on-device natural language processing, vision, or audio tasks such as sentiment analysis, image classification, or speech recognition without server roundtrips. Examples include browser-based chatbots, client-side content moderation tools, or interactive multimedia apps that benefit from privacy and responsiveness.
🎭 Best For
🏷️ Topics & Ecosystem
📊 Activity
Latest commit: 2026-11-23. Over the past 372 days, this repository gained 1.6k stars (+11.0% growth). Activity data is based on daily RepoPi snapshots of the GitHub repository.