From the course: Amazon SageMaker for Generative AI Applications
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Customize a pretrained model - Amazon SageMaker Tutorial
From the course: Amazon SageMaker for Generative AI Applications
Solution: Customize a pretrained model
(upbeat music) - [Instructor] Which model did you choose from SageMaker Jumpstart for this challenge? Let me show you the model I chose and how I solved it. The goal was to fine-tune a model specifically for legal text analysis using the sample legal dataset found in the GitHub repo. There are actually two different ways to fine-tune a model. First using SageMaker Jumpstart programmatically from the SageMaker Python SDK, or using the Studio UI. As you can tell by looking at the Jupiter notebook, I opted to go the code route, but you could have opted for the low code, no code Studio UI option. I've already executed all of the cells in this notebook so that it doesn't take away from my explanation. The first step, as always, is to import the necessary libraries. After doing that, I started to pre-process the data, which I did in cells two through five. Notice here in cell three, I prepared the dataset by combining the title and the legal text fields into a single text input. And then I…