0% found this document useful (0 votes)
26 views34 pages

AcademyMachineLearningFoundations EN ILT 07

Uploaded by

supatta.peo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views34 pages

AcademyMachineLearningFoundations EN ILT 07

Uploaded by

supatta.peo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Module 7: Introducing Generative AI

AWS Academy Machine


Learning Foundations

1
Module overview
Sections Demonstrations
• What is generative AI? • Explore an FM and Use Prompt
• How does generative AI work? Engineering in a Notebook
• AWS generative AI offerings • Creating a Linear Regression
Model Using Amazon
• Amazon CodeWhisperer CodeWhisperer

Knowledge check

2
Module objectives
• At the end of this module, you should be able to do the following:
• Define generative artificial intelligence (AI).
• Differentiate between traditional machine learning (ML) and generative AI.
• Use a foundation model (FM) in a Jupyter notebook to generate an image from text.
• Identify the benefits of Amazon CodeWhisperer.
• Explain how CodeWhisperer works with Amazon SageMaker to speed up development
of your ML application.

3
Section 1: What is generative AI?
Module 7: Introducing Generative AI

4
Generative AI definition

5
Generative AI use cases

6
Section 1 key • Generative AI is a type of artificial intelligence
takeaways that can create new content and ideas, including
conversations, stories, images, videos, and
music.
• Generative AI is powered by large models
called FMs.
• Generative AI can be applied for a broad range
of purposes.

7
Section 2: How does generative AI work?
Module 7: Introducing Generative AI

8
Artificial intelligence, machine learning, deep learning, and generative AI

9
What are FMs?

10
Comparison of traditional and foundation models

11
What tasks can foundation models do?

Text Sentiment Text


Q&A
generation analysis summarization Search

Code generation Image generation Image


Audio generation Video generation
classification

12
What are LLMs?
Large language models (LLMs):
• Trained on trillions of words
• Able to understand, learn, and generate text
• Adaptable to various tasks like text generation, summarization, or
sentiment analysis
• Able to perform domain-specific functions

13
What is prompt engineering?

14
Example of a prompt

15
Structure of a prompt

Instructions: Summarize the following restaurant review.


Instruction

Restaurant: Luigi’s; Location: Naples, Italy; Specialty: Pasta


Prompt
Context

Review: We ordered the tagliatelle and mozzarella caprese. The tagliatelle were a
work of art—the pasta was just right and the tomato sauce with fresh basil was
Input perfect. The caprese was OK but nothing out of the ordinary. Service was slow at first
but overall it was fine. Other than that, Luigi’s was a great experience!

Summary: Luigi’s is a great Italian restaurant with delicious pasta and good
service.
Output

16
Demonstration: • Explore what an FM can do.
Explore an FM and Use • Use and modify prompt engineering to generate
Prompt Engineering in an image from text.
a Notebook
• The recorded demo is included in your online
course.

17
Section 2 key • Foundation models (FMs) are pretrained on
takeaways vast amount of data and perform many tasks.
• Some examples of tasks that an FM can do are
language processing, visual comprehension,
and code generation.
• A subset of FMs, large language models
(LLMs), are trained on trillions of words across
many natural-language tasks.
• Prompt engineering is the process of designing
and refining the prompts or input stimuli for a
language model to generate specific types of
output.

18
Section 3: AWS generative AI offerings
Module 7: Introducing Generative AI

19
AWS generative AI offerings

20
Benefits of using AWS for generative AI

21
Section 3 key • AWS offers several generative AI offerings:
takeaways Amazon Bedrock, AWS Inferentia, AWS
Trainium, and Amazon SageMaker JumpStart.
• There are several benefits of using AWS
services to build your generative AI
application.

22
Section 4: Amazon CodeWhisperer
Module 7: Introducing Generative AI

23
Amazon CodeWhisperer
Features and tools include the following:
• Integrates with your IDE

• Generates whole-line and full-function code suggestions in your IDE

• Speeds up development and code writing

• Makes suggestions based on the code comments on current and previous


CodeWhisperer
inputs using generative AI

• Detects securities vulnerabilities and aligns code to best practices

24
Benefits of using Amazon CodeWhisperer
• Accelerate any coding tasks.
• Optimize for AWS.
• Use AI responsibly.
• Enhance application security.
• Generate functions.
• Write unit tests.

25
Setting up Amazon CodeWhisperer
CodeWhisperer Individual Tier CodeWhisperer Professional Tier

• Available to use at no additional • Flat subscription fee


cost • Authenticated using AWS IAM Identity
• Authenticated using an AWS Center
Builder ID • Capabilities in the Individual Tier plus the
• Provides code suggestions, following:
reference tracking, and security • Administrative capabilities with organizational
scans license management
• Organizational policy management to set service
policies at the organizational level

26
Demonstration: Creating a • This demo illustrates how Amazon
Linear Regression Model CodeWhisperer can accelerate coding tasks in
Using Amazon
CodeWhisperer ML applications.
• The recorded demo is included in your online
course.

27
Section 4 key • Amazon CodeWhisperer is a generative AI tool
takeaways that will integrate with your IDE and help you
develop your application faster using a large
language model (LLM).
• CodeWhisperer also has a security scanner that
helps mitigate security vulnerabilities, thus
safeguarding the integrity of the codebase.
• There are two tiers of service for Amazon
CodeWhisperer: Individual Tier and
Professional Tier.

28
Module wrap-up
Module 7: Introducing Generative AI
Module takeaways • Generative AI is a type of artificial intelligence that can
create new content and ideas, including conversations,
stories, images, videos, and music.
• Generative AI is powered by large models called FMs.
• Foundation models (FMs) are pretrained on vast amount
of data and perform many tasks.
• Prompt engineering is the process of designing and
refining the prompts or input stimuli for a language
model to generate specific types of output.
• AWS offers several generative AI offerings: Amazon
Bedrock, AWS Inferentia, AWS Trainium, and Amazon
SageMaker JumpStart.
• Amazon CodeWhisperer is a generative AI tool that will
integrate with your IDE and help you develop your
application faster
30
Module summary
• In summary this module, you learnt how to:
• Define generative artificial intelligence (AI).
• Differentiate between traditional machine learning (ML) and generative AI.
• Use a foundation model (FM) in a Jupyter notebook to generate an image from text.
• Identify the benefits of Amazon CodeWhisperer.
• Explain how CodeWhisperer works with Amazon SageMaker to speed up development
of your ML application.
Complete the knowledge check

32
Additional resources
• Amazon CodeWhisperer
• Setting Up Amazon CodeWhisperer
• Amazon Bedrock
• Amazon SageMaker JumpStart
• AWS Inferentia
• AWS Trainium

33
Thank you

Corrections, feedback, or other questions?


Contact us at https://support.aws.amazon.com/#/contacts/aws-academy.

34

You might also like