transformers-js

Execute machine learning models in JavaScript with Transformers.js and ONNX Runtime.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill transformers-js-tyler-r-kendrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transformers-js
Source: https://github.com/Tyler-R-Kendrick/slm-training/tree/main/.agents/skills/transformers-js
Command: npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill transformers-js-tyler-r-kendrick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @huggingface/transformers, @huggingface/tokenizers, and includes references (resource) components.

What problem does it solve?

This skill removes the need for complex Python backends or expensive cloud infrastructure by enabling high-performance machine learning inference directly within browser and server-side JavaScript environments.

Core Features & Use Cases

  • Cross-Platform Inference: Run models in browsers, Node.js, Bun, or Deno using WebGPU or WASM.
  • Diverse Task Support: Perform NLP, computer vision, audio processing, and multimodal tasks with a unified API.
  • Use Case: Build a real-time sentiment analysis tool that runs entirely on the client side, ensuring user data privacy and zero server latency.

Quick Start

Use the transformers-js skill to run a sentiment analysis pipeline on the text I love building with AI.

Frequently Asked Questions about transformers-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run machine learning inference in JavaScript without a Python backend?

You can execute machine learning inference directly in JavaScript using the Transformers.js library and ONNX Runtime. This approach leverages WebGPU and WASM backends to provide hardware-accelerated model execution without requiring a Python server.

Can I perform text classification and object detection in the browser with ONNX?

Yes, ONNX Runtime supports diverse tasks including text classification and object detection in the browser. It uses a unified API to handle NLP, computer vision, audio processing, and multimodal tasks across web and server runtimes.

Does Transformers.js work with Node.js, Bun, and Deno environments?

Transformers.js supports cross-platform inference across Node.js, Bun, and Deno environments. It utilizes WebGPU or WASM backends to execute machine learning models directly within these server-side JavaScript runtimes.

What is the best way to build a client-side sentiment analysis tool?

The best way to build client-side sentiment analysis is running ML models directly in the browser using JavaScript. This ensures user data privacy and zero server latency by keeping all inference entirely on the client side.

Do I need cloud infrastructure to run state-of-the-art ML models in JavaScript?

No, you do not need cloud infrastructure to run state-of-the-art ML models in JavaScript. Transformers.js enables high-performance inference directly within browser and server-side environments, removing the need for expensive cloud services.

What are the limitations of running ML inference with WASM and WebGPU?

While WASM and WebGPU provide hardware-accelerated inference without Python, performance depends heavily on the client's hardware capabilities. Browser environments may face memory constraints compared to dedicated server infrastructure.