Skip to content

tongliuTL/LLMs_SageMaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Science on AWS

Description

This workshop shows AWS users how to use Amazon SageMaker and other associated services to build, train, and deploy generative AI models. These labs go through data science topics such as data processing at scale, model fine-tuning, real-time model deployment, and MLOps practices all through a generative AI lens.

Distributed data processing

In this workflow, we will use the Amazon Customer Reviews Dataset for labs related to data processing as it contains a very large corpus of ~150 million customer reviews. This is useful for showcasing SageMaker's distributed processing abilities which can be extended to many large datasets.

Fine-tuning FLAN-T5 for summarizing conversation dialog

After the data processing sections, we will build our FLAN-T5 based NLP model using the dialogsum dataset from HuggingFace which contains ~15k examples of dialogue with associated summarizations.

Table of Contents

Setup

  1. Lab overview
  2. Setup workshop dependencies

Distributed data processing

  1. Register parquet data in S3 using AWS Glue and Amazon Athena
  2. Visualize data with serverless distributed PySpark on SageMaker notebooks using Glue interactive sessions
  3. Analyze data quality with distributed PySpark on SageMaker Processing Jobs

Fine-tuning FLAN-T5 for summarizing conversation dialog

  1. Analyze the impact of prompt engineering using a HuggingFace model
  2. Perform feature engineering on a raw text dataset using HuggingFace
    1. Option A: Notebook processing in SageMaker studio
    2. Option B: SageMaker Processing Job
  3. Fine-tune a HuggingFace model for dialogue summarization
    1. Option A: Jupyter notebook training in SageMaker studio
    2. Option B: SageMaker Training Job
  4. Create an automated end-to-end ML MLOps workflow with SageMaker Pipelines
  5. Deploy a fine-tuned generative AI model to a real-time SageMaker Endpoint
  6. Run inference on a SageMaker Endpoint in real time

O'Reilly Book: Data Science on AWS

This workshop is based on the O'Reilly Book, "Data Science on AWS", by Chris Fregly and Antje Barth @ AWS.

Data Science on AWS

Related Links

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

Fine-tuning LLMs with Amazon SageMaker

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published