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

YouTube

Fine-Tuning with Custom Compute Metrics

Trelis Research via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to implement custom compute metrics during model fine-tuning through this comprehensive 50-minute tutorial. Explore the fundamental differences between teacher-forced and auto-regressive decoding methods, understanding when and how to apply each approach in training versus inference scenarios. Discover the challenges and solutions for computing custom metrics during model training, including memory management considerations and GPU utilization optimization. Master the practical implementation of custom metrics in training workflows, including GRPO (Generalized Reward Policy Optimization) integration and advanced memory management techniques. Follow along with hands-on demonstrations covering environment setup, model loading and training, dataset preparation and formatting, custom optimizer configuration, and trainable parameter management. Gain expertise in combining training and inference libraries effectively, implementing custom prediction steps, and handling auto-aggressive decoding for evaluation purposes. Access accompanying slides and repository materials to reinforce your understanding of advanced fine-tuning techniques with custom compute metrics.

Syllabus

00:00 Introduction to Tracking Loss in Model Training
00:50 Understanding Custom Metrics
01:22 Teacher Forced vs. Auto Regressive Decoding
01:32 Training vs. Inference Libraries
01:43 Options for Computing Custom Metrics
02:00 Challenges with Custom Metrics
03:44 Teacher Forced Decoding Explained
05:55 Auto Regressive Decoding Explained
08:19 Combining Training and Inference
09:22 Implementing Custom Metrics in Training
09:31 GRPO and Custom Metrics
12:11 Memory Management in Custom Metrics
15:44 Practical Demonstration: Setting Up the Environment
18:05 Loading and Training the Model
26:14 Setting Up the Training and Evaluation Dataset
26:31 Formatting the Data for Training
27:35 Custom Optimizer Setup
28:03 Loading and Printing Trainable Parameters
29:30 Fine-Tuning the Model
30:03 Custom Prediction Step and Metrics
31:42 Auto Aggressive Decoding and Evaluation
46:40 Handling Memory and GPU Utilization
49:55 Conclusion and Resources

Taught by

Trelis Research

Reviews

Start your review of Fine-Tuning with Custom Compute Metrics

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.