Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Introduction to Transformers.js - Machine Learning in the Browser with JavaScript

Coding Train via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to implement machine learning models directly in the browser using the Transformers.js library in this comprehensive 29-minute tutorial. Discover why JavaScript offers unique advantages over Python for browser-based machine learning applications and explore the Hugging Face ecosystem of pre-trained models. Master the Pipeline API fundamentals, including ES6 module imports and object destructuring techniques essential for modern JavaScript development. Build practical examples including sentiment analysis and language detection applications using p5.js, with complete code implementations provided in the p5.js Web Editor. Explore the extensive catalog of available tasks and models on Hugging Face, understand device optimization options including WebGPU and CPU configurations, and learn about data types and quantization techniques for efficient model deployment. Gain hands-on experience with async/await patterns, pipeline creation, and integration of transformer models into interactive web applications, establishing a solid foundation for browser-based natural language processing projects.

Syllabus

0:00 Welcome!
1:53 Why JavaScript and not Python?
3:01 What is Hugging Face?
4:03 Transformers.js Documentation
4:18 Pipeline API
5:41 import syntax and ES6 modules
8:34 Object Destructuring
11:33 Creating a Pipeline
13:18 Sentiment Analysis Example
19:04 Tasks and Models on Hugging Face
20:20 Language Detection Example
22:27 Device: WebGPU, CPU and more
24:25 Data Types and Quantization
27:54 See you next time!

Taught by

The Coding Train

Reviews

Start your review of Introduction to Transformers.js - Machine Learning in the Browser with JavaScript

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.