DESCRIPTION: In this video, we managing common sources of randomness when training deep neural networks. We cover sources of randomness, including model weight initialization, dataset sampling and shuffling, nondeterministic algorithms, runtime algorithm differences, hardware and driver variations, and generative AI sampling.
DESCRIPTION: In this video, we managing common sources of randomness when training deep neural networks. We cover sources of randomness, including model weight initialization, dataset sampling and shuffling, nondeterministic algorithms, runtime algorithm differences, hardware and driver variations, and generative AI sampling.
OUTLINE: 00:00 – Introduction 01:14 – 1. Model Weight Initialization 04:28 – 2. Dataset Sampling and Shuffling 07:45 – 3. Nondeterministic Algorithms 11:13 – 4. Different Runtime Algorithms 14:30 – 5. Hardware and Drivers 15:39 – 6. Randomness and Generative AI 20:56 – Recap 22:34 – SurpriseLLMs: A Journey Through Time and ArchitectureSebastian Raschka2024-09-24 | REFERENCES: - Step-by-step guide converting GPT to Llama: github.com/rasbt/LLMs-from-scratch/blob/main/ch05/07_gpt_to_llama/converting-gpt-to-llama2.ipynb - Build a Large Language Model (From Scratch): http://mng.bz/M96o - LitGPT: github.com/Lightning-AI/litgpt - The Llama 3 Herd of Models (31 July 2024), arxiv.org/abs/2407.21783 - Qwen2 Technical Report (15 July 2024), arxiv.org/abs/2407.10671 - Apple Intelligence Foundation Language Models (29 July 2024), arxiv.org/abs/2407.21075 - Gemma 2: Improving Open Language Models at a Practical Size (31 July 2024), arxiv.org/abs/2408.0011
DESCRIPTION: In this video, you'll learn about the architectural difference between the original GPT model and the various Llama models. Moreover, you'll also learn about new pre-training recipes used for Qwen 2, Gemma 2, Apple's Foundation Models, and Llama 3, as well as some of the efficiency tweaks introduced by Mixtral, Llama 3, and Gemma 2.
DESCRIPTION: This tutorial is aimed at coders interested in understanding the building blocks of large language models (LLMs), how LLMs work, and how to code them from the ground up in PyTorch. We will kick off this tutorial with an introduction to LLMs, recent milestones, and their use cases. Then, we will code a small GPT-like LLM, including its data input pipeline, core architecture components, and pretraining code ourselves. After understanding how everything fits together and how to pretrain an LLM, we will learn how to load pretrained weights and finetune LLMs using open-source libraries.
OUTLINE: 0:00 – Workshop overview 2:17 – Part 1: Intro to LLMs 9:14 – Workshop materials 10:48 – Part 2: Understanding LLM input data 23:25 – A simple tokenizer class 41:03 – Part 3: Coding an LLM architecture 45:01 – GPT-2 and Llama 2 1:07:11 – Part 4: Pretraining 1:29:37 – Part 5.1: Loading pretrained weights 1:45:12 – Part 5.2: Pretrained weights via LitGPT 1:53:09 – Part 6.1: Instruction finetuning 2:08:21 – Part 6.2: Instruction finetuning via LitGPT 02:26:45 – Part 6.3: Benchmark evaluation 02:36:55 – Part 6.4: Evaluating conversational performance 02:42:40 – ConclusionUnderstanding PyTorch BuffersSebastian Raschka2024-07-27 | Sebastian's books: sebastianraschka.com/books
This video explains what PyTorch buffers are, a concept that is particularly useful when dealing with GPU computations and implement large models like LLMs.
DESCRIPTION: This video provides an overview of the three stages of developing an LLM: Building, Training, and Finetuning. The focus is on explaining how LLMs work by describing how each step works.
Low-rank adaptation (LoRA) stands as one of the most popular and effective methods for efficiently training custom Large Language Models (LLMs). As practitioners of open-source LLMs, we regard LoRA as a crucial technique in our toolkit.
In this talk, I will delve into some practical insights gained from running hundreds of experiments with LoRA, addressing questions such as: How much can I save with quantized LoRA? Are Adam optimizers memory-intensive? Should we train for multiple epochs? How do we choose the LoRA rank?
This video offers a quick dive into the world of finetuning Large Language Models (LLMs). This video covers
- common usage scenarios for pretrained LLMs - parameter-efficient finetuning - a hands-on guide to using the 'lit-GPT' open-source repository for LLM finetuning
In this short tutorial, I will show you how to accelerate the training of LLMs and Vision Transformers with minimal code changes using open-source libraries.
00:00 Three elements of PyTorch 02:10 (1) Tensor library 05:56 (2) Automatic differentiation engine 13:32 (3) Deep learning library 14:27 PyTorch in 3 Steps 15:17 Step 1: defining the model 23:32 Step 2: defining the training loop 30:20 Step 3: defining the dataset 39:34 Why do I like PyTorch? 42:25 Hands-on code demo
This talk is an hour long introduction to PyTorch focusing on its three core elements: tensor (array) computing, automatic differentiation, and deep learning utilities.Ratings and Rankings Using Deep Learning When Class Labels Have A Natural OrderSebastian Raschka2022-02-21 | Sebastian's books: sebastianraschka.com/books
Deep learning offers state-of-the-art results for classifying images and text. Common deep learning architectures and training procedures focus on predicting unordered categories, such as recognizing a positive and negative sentiment from written text or indicating whether images contain cats, dogs, or airplanes. However, in many real-world problems, we deal with prediction problems where the target variable has an intrinsic ordering. For example, think of customer ratings (e.g., 1 to 5 stars) or medical diagnoses (e.g., disease severity labels such as none, mild, moderate, and severe). This talk will describe the core concepts behind working with ordered class labels, so-called ordinal data. We will cover hands-on PyTorch examples showing how to take existing deep learning architectures for classification and outfit them with loss functions better suited for ordinal data while only making minimal changes to the core architecture.
0:00 Introduction 0:32 Many Real-World Predictions Problems Have Ordered Labels 0:57 Ordered Labels? Tell Me More! 3:59 Can't we just use regular classifiers for ordered labels? 5:47 How? Let's (Re)Use What We Already know: An Extended Binary Classification Framework 8:07 Problem: rank inconsistency 10:53 Converting a Classifier into a CORN Model in 3 Lines of Code 13:09 Acknowledgements13.4.5 Sequential Feature Selection Code Examples (L13: Feature Selection)Sebastian Raschka2022-01-06 | Sebastian's books: sebastianraschka.com/books
This final video in the "Feature Selection" series shows you how to use Sequential Feature Selection in Python using both mlxtend and scikit-learn.
Timestamps: 00:00 Dataset setup and KNN baseline 04:08 Selecting the best 5 features 10:18 Inspecting the results 13:40 Selecting the best subset of any size 17:29 Exhaustive search 21:12 Sequential feature selection in scikit-learn
-------
This video is part of my Introduction of Machine Learning course.
This video explains how sequential feature selection works. Sequential feature selection is a wrapper method for feature selection that uses the performance (e.g., accuracy) of a classifier to select good feature subsets in an iterative fashion. You can think of sequential feature selection method as an efficient approximation to an exhaustive feature subset search.
Sequential feature selection paper: Ferri, F. J., Pudil P., Hatef, M., Kittler, J. (1994). "Comparative study of techniques for large-scale feature selection." Pattern Recognition in Practice IV : 403-413. sciencedirect.com/science/article/pii/B9780444818928500407
-------
This video is part of my Introduction of Machine Learning course.
This video shows code examples for computing permutation importance in mlxtend and scikit-learn.
Permutation importance is a model-agnostic, versatile way for computing the importance of features based on a machine learning classifier or regression model.
This video introduces permutation importance, which is a model-agnostic, versatile way for computing the importance of features based on a machine learning classifier or regression model.
In this video, we start our discussion of wrapper methods for feature selection. In particular, we cover Recursive Feature Elimination (RFE) and see how we can use it in scikit-learn to select features based on linear model coefficients.
This video explains how decision trees training can be regarded as an embedded method for feature selection. Then, we will also look at random forest feature importance and go over two different ways it's computed: (a) impurity-based and (b) permutation-based.
If you want to be notified about future videos, please consider subscribing to my channel: youtube.com/c/SebastianRaschka13.3.1 L1-regularized Logistic Regression as Embedded Feature Selection (L13: Feature Selection)Sebastian Raschka2021-12-14 | Sebastian's books: sebastianraschka.com/books
Without going into the nitty-gritty details behind logistic regression, this lecture explains how/why we can consider an L1 penalty --- a modification of the loss function -- as an embedded feature selection method.
Sorry, I had some issues with the microphone (a too aggressive filter to remove background noise). Should be better in the next vids!
Description: This video dives into "filter methods" for feature selection. In particular, we focus on using a variance threshold to select informative features.
This video gives a brief intro of how we care about dimensionality reduction and introduces feature selection as a subcategory that we will cover in more detail in the upcoming videos.
This lecture introduces the main concepts behind Generative Adversarial Networks (GANs) and explains the main ideas behind the objective function for optimizing the generator and discriminator subnetworks. Hands-on examples include GANs for handwrittten digit and face generation, implemented in PyTorch. Lastly, this talks summarizes some of the main milestone GAN architectures that emerged in recent years.Designing Generative Adversarial Networks for Privacy-enhanced Face Recognition (Conference rec.)Sebastian Raschka2021-09-13 | Sebastian's books: sebastianraschka.com/books
After introducing the main concepts behind face recognition and soft-biometric attribute mining (i.e., the extraction of information such as age, gender, race, health information, and others), this talk discusses different methods for hiding soft-biometric information from facial recognition systems. After introducing the main methodologies, the talk focuses on the PrivacyNet architecture, which is a GAN-based approach to collective and selective facial privacy.L19.5.2.2 GPT-v1: Generative Pre-Trained TransformerSebastian Raschka2021-05-14 | Sebastian's books: sebastianraschka.com/books
0:00 Introduction 0:33 BART. Combining Bidirectional and Auto-Regressive Transformers 2:14 BART. BERT Encoder + GPT Decoder - Noise Transformations 4:39 Noise Transformations in BART for Pre-Training on Unlabeled Data 6:19 BART Performance Under Different Noise Transformations 7:04 Fine-Tuning on Labeled Data 8:21 BART Performance for Discriminative Tasks 9:26 BART Performance for Generative Tasks
-------
This video is part of my Introduction of Deep Learning course.