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

Zero To Mastery

AI Engineering: Build, Train, Fine-Tune and Deploy Models with AWS SageMaker

via Zero To Mastery

Overview

Launch your career in AI with this course that teaches you to build, train, fine-tune and deploy your own AI models using two of the most important AI tools used in the real world: AWS SageMaker and Hugging Face. No machine learning knowledge required!
  • Build and deploy cutting-edge artificial intelligence & machine learning models to the cloud
  • Utilize powerful pre-trained models from Hugging Face with AWS SageMaker
  • Uncover the mathematical secrets behind how Large Language Models work with a deep-dive into the Transformer architecture, tokenization, and more
  • Customize models to meet the needs of your AI applications using PyTorch to create unique solutions
  • Train and test models, ensuring they deliver accurate results every time
  • Learn best practices for monitoring and optimizing your models, including load testing and scaling for massive user demand

Syllabus

  •   Section 0: Introduction
    • AI Engineering Bootcamp: Learn AWS SageMaker with Patrik Szepesi
    • Course Setup
    • Course Introduction Part 1: Build, Train, and Deploy Models with AWS SageMaker
    • Course Introduction Part 2: Fine-Tuning LLMs with QLoRA, AWS, and Open Source
    • Exercise: Meet Your Classmates and Instructor
    • Course Resources
    • Understanding Your Video Player
    • Set Your Learning Streak Goal
  •   Part 1: Build, Train and Deploy Models with AWS SageMaker
    • Starting Point of Part 1
  •   Section 1: Introduction to AWS, Environment Setup, and Best Practices
    • Setting Up Our AWS Account
    • Set Up IAM Roles + Best Practices
    • AWS Security Best Practices
    • Set Up AWS SageMaker Domain
    • UI Domain Change
    • Sagemaker Domain Creation Update Part 1
    • Sagemaker Domain Creation Update Part 2
    • Sagemaker Notebooks Update
    • Setting Up SageMaker Environment
    • SageMaker Studio and Pricing
    • Let's Have Some Fun (+ More Resources)
  •   Section 2: Possible Resource Limit Errors Before Training and Deployment
    • Quota Increase
  •   Section 3: A Gentle Introduction to HuggingFace in SageMaker
    • Setup: SageMaker Server + PyTorch
    • HuggingFace Models, Sentiment Analysis, and AutoScaling
  •   Section 4: Gathering a Dataset for Our Multiclass Text Classification Project
    • Get Dataset for Multiclass Text Classification
    • Link to the Dataset
    • Creating Our AWS S3 Bucket
    • Uploading Our Training Data to S3
    • Unlimited Updates
  •   Section 5: Exploratory Data Analysis
    • Exploratory Data Analysis - Part 1
    • Exploratory Data Analysis - Part 2
    • Data Visualization and Best Practices
  •   Section 6: Setting Up Our Training Notebook
    • Setting Up Our Training Job Notebook + Reasons to Use SageMaker
    • Python Script for HuggingFace Estimator
  •   Section 7: Introduction to Tokenizations and Encodings
    • Creating Our Optional Experiment Notebook - Part 1
    • Creating Our Optional Experiment Notebook - Part 2
    • Encoding Categorical Labels to Numeric Values
    • Understanding the Tokenization Vocabulary
    • Encoding Tokens
    • Practical Example of Tokenization and Encoding
    • Course Check-In
  •   Section 8: Setting Up Data Loading with PyTorch
    • Creating Our Dataset Loader Class
    • Setting Pytorch DataLoader
    • Implement a New Life System
  •   Section 9: Choose Your Path
    • Which Path Will You Take?
  •   Section 10: Mathematics Behind Large Language Models and Transformers
    • DistilBert vs. Bert Differences
    • Embeddings In A Continuous Vector Space
    • Introduction To Positional Encodings
    • Positional Encodings - Part 1
    • Positional Encodings - Part 2 (Even and Odd Indices)
    • Why Use Sine and Cosine Functions
    • Understanding the Nature of Sine and Cosine Functions
    • Visualizing Positional Encodings in Sine and Cosine Graphs
    • Solving the Equations to Get the Values for Positional Encodings
    • Introduction to Attention Mechanism
    • Query, Key and Value Matrix
    • Getting Started with Our Step by Step Attention Calculation
    • Calculating Key Vectors
    • Query Matrix Introduction
    • Calculating Raw Attention Scores
    • Understanding the Mathematics Behind Dot Products and Vector Alignment
    • Visualizing Raw Attention Scores in 2D
    • Converting Raw Attention Scores to Probability Distributions with Softmax
    • Normalization
    • Understanding the Value Matrix and Value Vector
    • Calculating the Final Context Aware Rich Representation for the Word "River"
    • Understanding the Output
    • Understanding Multi Head Attention
    • Multi Head Attention Example and Subsequent Layers
    • Masked Language Learning
    • Exercise: Imposter Syndrome
  •   Section 11: Customizing our Model Architecture in PyTorch
    • Getting Back to SageMaker!
    • Creating Our Custom Model Architecture with PyTorch
    • Adding the Dropout, Linear Layer, and ReLU to Our Model
  •   Section 12: Creating the Accuracy, Training, and Validation Function
    • Creating Our Accuracy Function
    • Creating Our Train Function
    • Finishing Our Train Function
    • Setting Up the Validation Function
  •   Section 13: Optimizer Functions, Model Parameters, Cross Entropy Loss Function
    • Passing Parameters In SageMaker
    • Setting Up Model Parameters For Training
    • Understanding The Mathematics Behind Cross Entropy Loss
    • Finishing Our Script.py File
  •   Section 14: Starting Our Training Job and Monitoring it in AWS CloudWatch
    • Starting Our Training Job
    • Debugging Our Training Job With AWS CloudWatch
    • Analyzing Our Training Job Results
    • Link to the Finished Trained Model
  •   Section 15: Deploying our Multiclass Text Classification Endpoint in SageMaker
    • Creating Our Inference Script For Our PyTorch Model
    • Finishing Our PyTorch Inference Script
    • Setting Up Our Deployment
    • Deploying Our Model To A SageMaker Endpoint
  •   Section 16: Load Testing Our Machine Learning Model
    • Introduction to Endpoint Load Testing
    • Information about the next Lesson
    • Creating Our Test Data for Load Testing
    • Upload Testing Data to S3
    • Creating Our Model for Load Testing
    • Starting Our Load Test Job
    • Analyze Load Test Results
  •   Section 17: Production Grade Deployment of Our Machine Learning Model
    • Deploying Our Endpoint
    • Creating Lambda Function to Call Our Endpoint
    • Setting Up Our AWS API Gateway
    • Testing Our Model with Postman, API Gateway and Lambda
  •   Section 18: Cleaning Up Resources
    • Finishing Part 1 and Cleaning Up Resources for Part 1
  •   Part 2: Fine-Tuning LLMs with QLoRA, AWS, and Open Source
    • Starting Point of Part 2
  •   Setting Up AWS Sagemaker Environment
    • IAM Setup
    • Creating a SageMaker Domain
    • Logging in to our SageMaker Environment
    • Introduction to JupyterLab
    • Let's Have Some Fun (+ More Resources)
  •   Gathering, Chunking, Tokenizing and Uploading our Dataset
    • Sagemaker Sessions, Regions, and IAM Roles
    • Examining Our Dataset from HuggingFace
    • Tokenization and Word Embeddings
    • HuggingFace Authentication with Sagemaker
    • Applying the Templating Function to our Dataset
    • Attention Masks and Padding
    • Star Unpacking with Python
    • Chain Iterator, List Constructor and Attention Mask example with Python
    • Understanding Batching
    • Slicing and Chunking our Dataset
    • Creating our Custom Chunking Function
    • Tokenizing our Dataset
    • Running our Chunking Function
    • Understanding the Entire Chunking Process
    • Uploading the Training Data to AWS S3
    • Course Check-In
  •   Understanding LoRA and Setting up HuggingFace Estimator
    • Setting Up Hyperparameters for the Training Job
    • Creating our HuggingFace Estimator in Sagemaker
    • Introduction to Low-rank adaptation (LoRA)
    • LoRA Numerical Example
    • LoRA Summarization and Cost Saving Calculation
    • (Optional) Matrix Multiplication Refresher
    • Understanding LoRA Programatically Part 1
    • Understanding LoRA Programatically Part 2
    • Unlimited Updates
  •   Improving Training Speed with Bfloat 16
    • Bfloat16 vs Float32
    • Comparing Bfloat16 Vs Float32 Programatically
    • Implement a New Life System - at end of 3rd section
  •   Setting up the QLoRA Training Script with Mixed Precision & Double Quantization
    • Setting up Imports and Libraries for the Train Script
    • Argument Parsing Function Part 1
    • Argument Parsing Function Part 2
    • Understanding Trainable Parameters Caveats
    • Introduction to Quantization
    • Identifying Trainable Layers for LoRA
    • Setting up Parameter Efficient Fine Tuning
    • Implement LoRA Configuration and Mixed Precision Training
    • Understanding Double Quantization
    • Creating the Training Function Part 1
    • Creating the Training Function Part 2
    • Exercise: Imposter Syndrome
    • Finishing our Sagemaker Script
    • Gaining Access to Powerful GPUs with AWS Quotas
    • Final Fixes Before Training
  •   Running our Fine Tuning Script for our LLM
    • Starting our Training Job
    • Inspecting the Results of our Training Job and Monitoring with Cloudwatch
  •   Deploying our Fine Tuned LLM
    • Deploying our LLM to a Sagemaker Endpoint
    • Testing our LLM in Sagemaker Locally
    • Creating the Lambda Function to Invoke our Endpoint
    • Creating API Gateway to Deploy the Model Through the Internet
    • Implementing our Streamlit App
    • Streamlit App Correction
  •   Cleaning up Resources
    • Congratulations and Cleaning up AWS Resources
  •   Where To Go From Here?
    • Thank You!
    • Review This Course!
    • Become An Alumni
    • Learning Guideline
    • ZTM Events Every Month
    • LinkedIn Endorsements

Taught by

Patrik Szepesi

Reviews

Start your review of AI Engineering: Build, Train, Fine-Tune and Deploy Models with AWS SageMaker

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.