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

Coursera

Getting Started with Hugging Face Transformers

HuggingFace via Coursera

Overview

AI, Data Science & Cloud Certificates from Google, IBM & Meta — 40% Off
One plan covers every Professional Certificate on Coursera. 40% off Coursera Plus Annual.
Unlock All Certificates
By the end of this course, you will be able to: • Explain the role of models, datasets, and Spaces in the HF ecosystem and use the pipeline API to run inference across text, vision, and audio tasks. • Tokenize and encode text inputs using AutoTokenizer, handle padding and truncation, and apply chat templates for LLM-compatible formatting. • Load pre-trained models using the appropriate AutoModel class, inspect model configuration, run manual inference, and load models in reduced precision with device_map="auto". • Evaluate model cards to assess intended use, limitations, bias disclosures, and license compatibility before recommending a model for deployment. Go from zero to confident model evaluation in four hours. All you need is basic Python — no machine learning or Hugging Face experience required. The course opens with a realistic challenge: your VP needs an AI feasibility assessment by Thursday, and the Hugging Face Hub has over 2 million models to choose from. You'll build a systematic approach to navigating that ecosystem, using filters, model cards, and task categories to find the right model instead of guessing. Run inference across text, vision, and audio tasks with the pipeline API, then go deeper: learn how tokenizers convert raw text into the numerical inputs models actually process, debug why a classifier fails silently on long messages, and discover how chat templates turn a language model into a conversation partner. Load models manually with AutoModel classes, inspect their configuration, and manage memory with reduced precision. The course closes with a hands-on model selection challenge: three candidate models, one task, and you have to decide which one ships — backed by model card evidence, not gut instinct.

Syllabus

  • The HF Ecosystem and Pipeline API
    • With over two million models on the Hugging Face Hub, knowing where to start is half the battle. Build a mental map of the HF ecosystem—models, datasets, Spaces, and how they connect—then use the pipeline API to run inference across text, vision, and audio tasks in just a few lines of code. By the end of this module, you’ll know how to find the right model for a given task and get results fast.
  • Tokenizers and Text Preprocessing
    • Most production model failures don’t come from bad models — they come from bad inputs. Tokenization, padding, truncation, and attention masks are where text becomes the numerical representation a model can actually process. Get any of these wrong and the model fails silently — no error message, just bad results. This module teaches you what happens between raw text and model input, and how to control every step.
  • Loading and Running Models with AutoModel
    • The pipeline API bundles preprocessing and model execution into one call — convenient, but opaque. This module hands you the components separately. Load models with the right AutoModel class, inspect the configuration to understand what you’re working with, run manual inference on tokenized inputs, and manage memory by loading in reduced precision. By the end, you’ll understand exactly what pipeline was doing for you — and be able to do it yourself.
  • Reading Model Cards and Responsible Use
    • A model that works in a notebook can still fail catastrophically in production — not because of accuracy, but because of misaligned intended use, undisclosed biases, or incompatible licensing. This module teaches the evaluation skills that separate responsible practitioners from reckless ones. Read model cards critically, assess intended use against your actual use case, evaluate bias and limitation disclosures, and verify license compatibility before recommending a model for deployment.

Taught by

Hugging Face

Reviews

Start your review of Getting Started with Hugging Face Transformers

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.