SKILL

transformers-js

使用 Transformers.js 直接在 JavaScript/TypeScript 中运行前沿机器学习模型。支持 NLP(文本分类、翻译、摘要)、计算机视觉(图像分类、目标检测)、音频(语音识别、音频分类)和多模态任务。使用 Hugging Face Hub 的预训练模型,通过 WebGPU/WASM 在浏览器及 Node.js、Bun、Deno 等服务端运行时工作。

译文已校对
查看英文原文

Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in browsers and server-side runtimes (Node.js, Bun, Deno) with WebGPU/WASM using pre-trained models from Hugging Face Hub.

适用对象:设计与内容创作。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Transformers.js - Machine Learning for JavaScript
  • When to Use This Skill
  • Installation
  • NPM Installation
  • Browser Usage (CDN)
  • Core Concepts
  • 1. Pipeline API
  • 2. Model Selection

Transformers.js enables running state-of-the-art machine learning models directly in JavaScript across browsers and server-side runtimes (Node.js, Bun, Deno), with no Python server required. Use this skill when you need to: Run ML models for text analysis, generation, or translation in JavaScript Perform image classification, object detection, or segmentation Implement speech recognition or audio processing Build multimodal AI applications (text-to-image, image-to-text, etc.) Run models client-side in the browser without a backend The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing: ⚠️ Memory Management: All pipelines must be disposed with pipe.dispose() when finished to prevent memory leaks. See examples in Code Examples for cleanup patterns across different environments. You can specify a custom model as the second argument: Finding Models: Browse available Transformers.js models on Hugging Face Hub: All models: https://huggingface.co/models?library=transformers.js&sort=trending By task: Add pipelinetag parameter Text generation: https://huggingface.co/models?pipelinetag=text-generation&library=transformers.js&s

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
huggingface/skills
源文件
skills/transformers-js/SKILL.md
固定版本
25910b3d0ba31a2ba102f901cdc9e008c278a69c
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:huggingface/skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T16:01:02.774Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

Apache-2.0。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。