/llm-finetuning

Primary LanguageJupyter NotebookMIT No AttributionMIT-0

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. Setup workshop dependencies

Distributed data processing

[HIDDEN] 2. Register parquet data in S3 using AWS Glue and Amazon Athena [HIDDEN] 3. Visualize data with serverless distributed PySpark on SageMaker notebooks using Glue interactive sessions [HIDDEN] 4. 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 10.Run inference on a SageMaker Endpoint in real time

Security

See CONTRIBUTING for more information.

License

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