transformers-js

Run state-of-the-art ML models in JavaScript across browsers and Node.js.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/domattioli/DomI --skill transformers-js-domattioli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transformers-js
Source: https://github.com/domattioli/DomI/tree/main/plugins/huggingface-skills/skills/transformers-js
Command: npx skills add https://github.com/domattioli/DomI --skill transformers-js-domattioli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Running state-of-the-art ML models typically requires a Python environment or servers. Transformers.js lets developers execute NLP, computer vision, audio, and multimodal models directly in JavaScript, enabling client-side and server-side inference without Python dependencies.

Core Features & Use Cases

  • Cross-runtime ML: run models in browsers, Node.js, Bun, or Deno with WebGPU or WASM backends.
  • Pipeline-driven inference: load tasks such as text-classification, image-classification, translation, and more via a simple pipeline API.
  • Model discovery, quantization, caching, and per-component options to balance performance and memory.
  • Examples include sentiment analysis in a web app, image classification in a mobile browser, or offline inference in a Node.js service.

Quick Start

Install the package and load a pipeline for a given task and model, then run inference.

Frequently Asked Questions about transformers-js

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

FAQPage Schema
How do I run ML models in JavaScript without a Python backend?

Run ML models in JavaScript without Python backends by using Transformers.js to execute NLP, computer vision, audio, and multimodal tasks directly in browsers or Node.js via a pipeline API.

Can I use WebGPU or WASM for inference in a web browser?

WebGPU and WASM backends are supported for running inference directly in web browsers, allowing flexible execution of state-of-the-art models without server-side dependencies.

How do I load a text-classification or image-classification pipeline in Node.js?

Load a pipeline in Node.js by installing the package and specifying a task like text-classification or image-classification with a model, then run inference to process inputs.

What is the best way to manage caching and quantization for ML inference in JavaScript?

Manage caching and quantization for ML inference in JavaScript by configuring environment settings, which allow per-component options, loading modes, and resource management to balance performance and memory.

Does Transformers.js work across different JavaScript runtimes like Bun and Deno?

Transformers.js works across multiple JavaScript runtimes including Bun and Deno, enabling cross-runtime ML inference with support for both WebGPU and WASM backends.

Why use a JavaScript pipeline API instead of a Python server for ML inference?

A JavaScript pipeline API enables client-side and server-side ML inference without Python dependencies, supporting offline execution in Node.js services and direct browser deployment.