transformers-js

Execute machine learning models in JavaScript and TypeScript with Transformers.js.

2|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/NagyVikt/codex-plugins --skill transformers-js-nagyvikt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transformers-js
Source: https://github.com/NagyVikt/codex-plugins/tree/main/plugins/hugging-face/skills/transformers.js
Command: npx skills add https://github.com/NagyVikt/codex-plugins --skill transformers-js-nagyvikt

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill removes the need for complex backend infrastructure or Python environments by enabling high-performance machine learning inference directly within JavaScript and TypeScript applications.

Core Features & Use Cases

  • Cross-Platform Inference: Run models in Node.js or directly in the browser using WebGPU and WASM acceleration.
  • Diverse Task Support: Perform NLP, computer vision, audio processing, and multimodal tasks using pre-trained models from the Hugging Face Hub.
  • Use Case: Build a real-time sentiment analysis tool that runs entirely on the client side, ensuring user data privacy and reducing server costs.

Quick Start

Use the transformers-js skill to initialize a sentiment analysis pipeline and classify the text I love transformers.

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 models directly in JavaScript without a Python backend?

You can run machine learning models directly in JavaScript by using the Transformers.js library to execute state-of-the-art inference in Node.js or browser environments. This removes the need for Python backends, leveraging WebGPU and WASM for hardware acceleration.

Can I use Hugging Face models for client-side NLP and computer vision tasks in the browser?

Yes, you can use Hugging Face models for client-side NLP and computer vision tasks in the browser. The skill retrieves pre-trained models from the Hugging Face Hub and executes them locally using WebGPU and WASM acceleration.

Does WebGPU acceleration work with ONNX models in TypeScript applications?

WebGPU acceleration works with ONNX models in TypeScript applications by utilizing the Transformers.js library. It leverages WebGPU and WASM to provide high-performance hardware acceleration for machine learning inference across supported runtimes.

What is the best way to perform real-time audio processing and inference in a Node.js environment?

The best way to perform real-time audio processing in Node.js is using the Transformers.js library to execute machine learning models. It supports diverse tasks including audio processing and multimodal inference without requiring complex backend infrastructure.

Are there limitations when running state-of-the-art ML models entirely on the client side?

Running state-of-the-art ML models on the client side requires sufficient local hardware resources for WebGPU and WASM acceleration. While it ensures user data privacy and reduces server costs, performance depends entirely on the user's device capabilities.