JumpStart to Build Generative AI with Amazon SageMaker
Agenda
- Build Generative AI with SageMaker JumpStart
- How To Fine-tune and Train Pre-trained ML Models
- Optimize ML Inference with SageMaker Inference Recommender
- Benefits of ML in Cloud
Build Generative AI with SageMaker JumpStart How To Customize Pre-trained ML Models Optimize ML Inference with SageMaker Inference Recommender Benefits of ML in Cloud
AI – Text Generation Jack went to the university in the early 1970s as a graduate student and started the company that would become McDonald’s. Though he was a long time away from his family, he was an avid cook. “My mom is a huge foodie,” he says. “She likes to know things about what I’m eating.” Her recipes helped him develop an idea of how to go about the food business and eventually made him a fast-food millionaire in 1993. “I mad sure that my family was always watching,” he says. “And I always liked to tell them about everything I was doing on a regular basis.” That early obsession with recipes led to his own idea of what a McDonald’s menu would look like: a menu that would make people say hello to their food, even though they’ve been away.
trends in AI/ML • Models are becoming more complex, with end users moving from classical ML to deep learning • State-of-the-art deep learning models are getting larger and larger as we find that larger models generalize better Source: NVIDIA Transformers 65M BERT 340M GPT-2 1.5B GPT-2 8B 8.3B T5 11B Turing-NLG 17B GPT-3 175B Megatron-Turing 530B GPT-3 1T 1 trillion MID 2017 2018 2019 MID 2019 LATE 2019 2020 MID 2020 LATE 2021 2022 Model size Time 15,000x increase in 5 years
fully managed service that enables data scientists and developers to quickly and easily build machine-learning based models into production smart applications. Amazon SageMaker
Algori thms/models Vision Text Tabular Audio SageMaker JumpStart: ML hub for SageMaker Customers 400+ algorithms and pre-trained, state-of-the-art, open-source models from PyTorch Hub, TensorFlow Hub, and Hugging Face, etc.
and search SageMaker JumpStart content Search for topics or problem types, and get relevant results across all content Browse by content type to explore solutions, models, example notebooks, blogs, and video tutorials
launch pre-built solutions Launch solutions through cloud formation with a single click Easily manage assets from Amazon SageMaker JumpStart Open pre-populated notebooks for solutions to solve the business problems end to end
deploy or fine-tune models Deploy or fine-tune pre- trained models with a single click Open pre-populated notebooks to perform inference on deployed models 400+ pre-trained open source models from Hugging Face, PyTorch, TensorFlow Hubs
to Fine-tune and Train pre-trained ML Models? ML Problem Framing Real-World Problem Define ML Problem Data Preparation Build Training Deploy Amazon SageMaker 한국어 Fine-tuning 가나다라 마바사아 … 1 2
to Fine-tune and Train pre-trained Models • Train Fine-tunable pre-trained models • Fine-tune and train from scratch with Hugging Face, or other open source models.
2023, Amazon Web Services, Inc. or its affiliates. Hugging Face on Amazon SageMaker Scale and accelerate your NLP projects with Hugging Face Integrations
are the Hugging Face libraries? Open-source Datasets, Tokenizers and Transformers Popular 52k+ GitHub stars (March 2021), 1M+ downloads per month Intuitive NLP-specific Python frontends based on PyTorch or TensorFlow State of the art Transformer-based models are state-of-the-art, enable transfer-learning and scale Comprehensive Model zoo with 7000+ model architectures, 160+ languages
strong partnership to make NLP easy & accessible for all Hugging Face is the most popular Open Source company providing state of the art NLP technology Hugging Face SageMaker offers high performance resources to train and use NLP Models AWS https://huggingface.co/ https://aws.amazon.com/sagemaker/
to Fine-tune and Train pre-trained ML Models? ML Problem Framing Real-World Problem Define ML Problem Data Preparation Build Training Deploy 한국어 Fine-tuning 가나다라 마바사아 … 1 2 + Amazon SageMaker Hugging Face
SageMaker Deployment Hosting Services Inference Image Training Image Training Data Model artifacts Amazon SageMaker Amazon S3 Amazon ECR Model artifacts
SageMaker Deployment Hosting Services Inference Image Training Image Training Data Model artifacts Amazon SageMaker Amazon S3 Amazon ECR Model artifacts Inference Image
SageMaker Deployment Hosting Services Inference Image Training Image Training Data Model artifacts Endpoint Amazon SageMaker Amazon S3 Amazon ECR Model artifacts Inference Image
SageMaker Deployment SageMaker Endpoints (Private API) Auto Scaling group Availability Zone 1 Availability Zone 2 Availability Zone 3 Elastic Load Balancing Model Endpoint Client Deployment / Hosting Amazon SageMaker ML Compute Instances Input Data (Request) Prediction (Response)
SageMaker Deployment SageMaker Endpoints (Public API) Auto Scaling group Availability Zone 1 Availability Zone 2 Availability Zone 3 Elastic Load Balancing Model Endpoint Amazon API Gateway Client Deployment / Hosting Amazon SageMaker ML Compute Instances Input Data (Request) Prediction (Response)
ML instance options B A L A N C I N G B E T W E E N C O S T A N D P E R F O R M A N C E High throughput, and low-latency access to CUDA GPU INSTANCES P3 G4 Low throughput, low cost, most flexible CPU INSTANCES C5 Inf1: High throughput, high performance, and lowest cost in the cloud CUSTOM CHIP Inf1
instance ML instance Endpoint Load testing K N O W Y O U R E N D P O I N T S Artificial requests Amazon SageMaker endpoint Endpoint Auto-scaling group Availability Zone 1 Availability Zone 2 ML instance ML instance ML instance ML instance Amazon CloudWatch Elastic Load Balancing
Inference Recommender F E A T U R E S Designed for MLOps engineers and data scientists to reduce time to get models into production Run extensive load tests that include production requirements – throughput, latency Load tests Get endpoint configuration settings that meet your production requirements Endpoint recommendations Instance recommendations Instance type recommendation for initial deployments
integrated with Amazon SageMaker Monitor Monitor for bias and feature attribution drifts Automate pipeline Deploy Flexible deployment with best-price performance Fine-tune Customization for specific domains Human-in- the-Loop Provide feedback, label data, active learning through human-in-loop
Machine Learning with Amazon SageMaker ML Problem Framing Real-World Problem Define ML Problem Data Preparation Build Training Deploy SageMaker JumpStart + Hugging Face • SageMaker Endpoint • SageMaker Inference Recommender SageMaker Training Job SageMaker Studio Raw Data