SciPy 2023

Modern Deep Learning with PyTorch
07-10, 13:30–17:30 (America/Chicago), Classroom 106

We will kick off this tutorial with an introduction to deep learning and highlight its primary strengths and use cases compared to traditional machine learning. In recent years, PyTorch has emerged as the most widely used deep learning library for research. However, a lot has changed regarding how we train neural networks these days. After getting a firm grasp of the PyTorch API, you will learn how to train deep neural networks using various multi-GPU training paradigms. We will also fine-tune large language models (transformers) and deploy them to the cloud.


This tutorial will be aimed at Python programmers new to PyTorch and deep learning. However, even more experienced deep learning practitioners and PyTorch users may be exposed to new concepts and ideas when exploring other open source libraries to extend PyTorch.

Throughout this 4-hour tutorial session, attendees will learn how to use PyTorch to train neural networks for image and text classification. We will discuss the individual strengths and weaknesses of deep learning and contrast it with traditional machine learning via libraries such as scikit-learn.

We will discuss the PyTorch library in detail, exploring it as a tensor library, automatic differentiation library, and library for implementing deep neural networks.

After getting a firm grasp of the PyTorch API, we will introduce additional open source libraries to familiarize attendees with the modern open source stack for deep learning. For instance, we will organize our model training loops using the Lightning Trainer, which will help us reduce boilerplate code and get additional benefits such as model checkpointing, logging, and convenient mixed precision training.

Then, we will explore multi-GPU training strategies from DeepSpeed library to accelerate model training if multiple GPUs are available. Note that all model code in this tutorial can be run on a laptop computer, but attendees will also be introduced to free GPU options for this tutorial via Google Colab and Lightning to get the full benefits of this multi-GPU training section.

Large language transformers have largely replaced recurrent neural networks for text classification and generation. So, in this tutorial, attendees will learn how to adopt and fine-tune large language models from the HuggingFace transformer library.

Lastly, as a bonus, we will also build a deep learning model demo using Gradio and deploy it to the cloud using Lightning.


Prerequisites

Attendees are expected to be familiar with Python. Familiarity with other deep learning frameworks and APIs (for example, TensorFlow and Keras) is not required. All code will be executable on a laptop without CPU, and optional GPU cloud resources will be shared as part of this tutorial.

Installation Instructions

https://github.com/rasbt/scipy2023-deeplearning

Sebastian Raschka is a machine learning and AI researcher with a strong passion for education. As Lead AI Educator at Lightning AI, he is excited about making AI and deep learning more accessible and teaching people how to utilize these technologies at scale.
Sebastian was previously an Assistant Professor of Statistics at the University of Wisconsin-Madison. However, in 2023, he resigned from his position to devote himself fully to the Lightning AI startup company, which he had joined in 2022. While working at UW-Madison, Sebastian focused on researching deep learning and machine learning. To learn more about his research, you can visit his website at https://sebastianraschka.com/publications.

Moreover, Sebastian loves open-source software and has been a passionate contributor for over a decade. Next to coding, he also loves writing and authored the bestselling Python Machine Learning book and Machine Learning with PyTorch and Scikit-learn.

If you like to find out more about Sebastian and what he is currently up to, please visit his personal website at https://sebastianraschka.com. You can also find Sebastian on Twitter (@rasbt), Mastodon (@mastodon.social@SebRaschka), and LinkedIn (https://www.linkedin.com/in/sebastianraschka/)