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

Zero To Mastery

Learn Hugging Face by Building a Custom AI Model

via Zero To Mastery

Overview

Learn the Hugging Face ecosystem from scratch including Transformers, Datasets, Hub/Spaces, and more by building and customizing your own AI text classification model and launch it for use in the real-world!
  • How to prepare and process datasets using Hugging Face Datasets
  • Techniques for training and fine-tuning text classification models with Hugging Face Transformers
  • Methods for evaluating model performance using Hugging Face Evaluate
  • Steps to deploy your trained model to the Hugging Face Hub
  • How to create interactive demos for machine learning models using Gradio
  • Practical experience in the full lifecycle of a machine learning project, from data preparation to deployment

Syllabus

  •   Introduction
    • Introduction (Hugging Face Ecosystem and Text Classification)
    • More Text Classification Examples
    • What You Are Going To Build!
    • Exercise: Meet Your Classmates and Instructor
    • Course Resources
  •   Let's Get Started!
    • Getting Setup: Adding Hugging Face Tokens to Google Colab
    • Getting Setup: Importing Necessary Libraries to Google Colab
    • Downloading a Text Classification Dataset from Hugging Face Datasets
  •   Preparing Text Data & Evaluation Metric
    • Preparing Text Data for Use with a Model - Part 1: Turning Our Labels into Numbers
    • Preparing Text Data for Use with a Model - Part 2: Creating Train and Test Sets
    • Preparing Text Data for Use with a Model - Part 3: Getting a Tokenizer
    • Preparing Text Data for Use with a Model - Part 4: Exploring Our Tokenizer
    • Preparing Text Data for Use with a Model - Part 5: Creating a Function to Tokenize Our Data
    • Setting Up an Evaluation Metric (to measure how well our model performs)
  •   Model Training
    • Introduction to Transfer Learning (a powerful technique to get good results quickly)
    • Model Training - Part 1: Setting Up a Pretrained Model from the Hugging Face Hub
    • Model Training - Part 2: Counting the Parameters in Our Model
    • Model Training - Part 3: Creating a Folder to Save Our Model
    • Model Training - Part 4: Setting Up Our Training Arguments with TrainingArguments
    • Model Training - Part 5: Setting Up an Instance of Trainer with Hugging Face Transformers
    • Model Training - Part 6: Training Our Model and Fixing Errors Along the Way
    • Model Training - Part 7: Inspecting Our Models Loss Curves
    • Model Training - Part 8: Uploading Our Model to the Hugging Face Hub
  •   Making Predictions
    • Making Predictions on the Test Data with Our Trained Model
    • Turning Our Predictions into Prediction Probabilities with PyTorch
    • Sorting Our Model's Predictions by Their Probability
  •   Performing Inference
    • Performing Inference - Part 1: Discussing Our Options
    • Performing Inference - Part 2: Using a Transformers Pipeline (one sample at a time)
    • Performing Inference - Part 3: Using a Transformers Pipeline on Multiple Samples at a Time (Batching)
    • Performing Inference - Part 4: Running Speed Tests to Compare One at a Time vs. Batched Predictions
    • Performing Inference - Part 5: Performing Inference with PyTorch
    • OPTIONAL - Putting It All Together: from Data Loading, to Model Training, to making Predictions on Custom Data
  •   Launching Our Model!
    • Turning Our Model into a Demo - Part 1: Gradio Overview
    • Turning Our Model into a Demo - Part 2: Building a Function to Map Inputs to Outputs
    • Turning Our Model into a Demo - Part 3: Getting Our Gradio Demo Running Locally
    • Making Our Demo Publicly Accessible - Part 1: Introduction to Hugging Face Spaces and Creating a Demos Directory
    • Making Our Demo Publicly Accessible - Part 2: Creating an App File
    • Making Our Demo Publicly Accessible - Part 3: Creating a README File
    • Making Our Demo Publicly Accessible - Part 4: Making a Requirements File
    • Making Our Demo Publicly Accessible - Part 5: Uploading Our Demo to Hugging Face Spaces and Making it Publicly Available
    • Summary Exercises and Extensions

Taught by

Daniel Bourke

Reviews

Start your review of Learn Hugging Face by Building a Custom AI Model

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.