Section 3: Intro to AWS and Cloud Computing Flashcards
What are the 6 advantages of Cloud Computing?
- Trade CAPEX for OPEX
- Massive Economies of Scale
- Stop Guessing Capacity
- Increase Speed and Agility
- Stop spending money running and maintaining DC
- Go Global in minutes.
Types of Cloud Computing
IaaS
SaaS
PaaS
You Manage in IaaS
Applications
Data
Runtime
Middleware
OS
You Manage by in PaaS
Applications
Data
You manage in SaaS
Nothing
Pricing Models
Compute - Pay for compute time.
Storage - Pay for data stored in the cloud
Data transfer OUT of the cloud
What is Gen AI?
Creating NEW data based on prompts.
Name of ChatGPT Foundation Model?
GPT-4o
LLM
Large Language Model
Designed to create coherent, human-like, text.
ChatGPT is example.
What is needed to use an LLM?
Prompt
“what is AWS”
AWS’s Gen AI Tool
Bedrock
Amazon Titan
High Performing FM from AWS
What is Fine-Tuning?
When you adapt a copy of a foundation model with your own data.
Where do you add data for fine tuning?
S3 Bucket
Instruction based fine tuning uses what?
labeled examples that are prompt-response pairs.
Single Turn Messaging
Part of instruction based fine tuning, to determine how a chatbot should reply.
- System
- Messages
- role
- Content
Multi-Turn messaing
Chatbot conversation. How to handle them.
Transfer Learning
The broader concept of re-using a pre-trained model to adapt it to a new related task.
Widely used for image classification
Use Cases for Fine Tuning
- A chatbot
- Training using up to date information
- training with exclusive data
ROUGE
Recall-Oriented Understudy for Gisting Evaluation
Evaluating automatic summarization and machine translation systems.
ROUGE-N = Measure the number of matching n-grams between reference and generated text.
ROUGE-N
Measure the number of matching n-grams between reference and generated text
ROUGE-L
Longest common subsequence between a reference and generated text.
BLEU
Bilingual Evaluation Understudy
-Evaluate translation text. Considers precision and brevity.
BERTScore
Semantic similarity between generated texts
Perplexity
How well the model predicts the next token (lower is better).
ARPU
Average Revenue per User
Business Metric to evaluate a model
RAG
Retrieval-Augmented Generation
Allows a FM to reference a data source outside of its training data.
RAG Vector Databases
- Amazon OpenSearch Service - search and analytics database.
- Amazon DocumentDB [MongoDB compatibility] - NoSQL database.
- Aurora - ralational DB, proprietary on AWS
- Amazon RDS for PostgreSQl - relational DB, open source
- Amazon Neptune - graph database
RAG Data Sources
- S3
- Confluence
- SharePoint
- Salesforce
- Web pages
tokenization
converting raw text into a sequence of tokens
types of tokenization
Word-based - text is split into individual words
Subword - some words can be split too (un-help-ful)
Context Window
the number of tokens an LLM can consider when generating text.
The larger the context window, the more information.
What is the first factor to consider when looking at a model?
Context Window
Embeddings
Create vectors out of text, images, or audio.
Vector
Array of numerical values. So each word as some/many numerical values.
What can really power search applications?
Embedding models
Guardrails
Control the interaction between users and FM in Bedrock.
Filter out harmful and undesirable content.
Can remove PII, enhance privacy
Agents
manages and carry out various multi-step tasks related to infrastructure provisioning, application deployment, and operational activities.
Think like a chatbot agent
Model Invocation Logging?
How?
Sending logs of all invocations to Amazon CloudWatch and S3
- AWS Cloudwatch
Bedrock Studio
Gives access to Amazon Bedrock to your team so they can easily create AI-powered applications.
Watermark Detection
Check if an image was generated by Amazon Titan Generator
Bedrock Pricing Models
- On-Demand, Text and Embedding are per token, image is per generated image.
- Batch - multiple predictions at a time, discounts up to 50%.
- Provisioned - purchase model unites for a certain time.
Model Improvement Cost order
$ - Prompt Engineering
$$ - Retrieval Augmented Generation (RAG)
$$$ - Instruction-based Fine-tuning
$$$$ - Domain Adaption fine tuning
What type of Gen AI can recognize and interpret various forms of input data, such as text, images, and audio?
Multimodal model
Which AWS service can help store embeddings within vector databases?
Amazon OpenSearch Serverless
Prompt Engineering
Developing, designing, and optimizing prompts to enhance the output of FMs for your needs.
Improved Prompting Consists of?
- Instructions - a task for the model to do.
- Context - external information to guide the model
- Input Data - the input for which you want a response.
- Output Indicator - the output type or format.
Negative Prompting
A technique where you explicitly instruct the model on what NOT to include or do in its response.
Prompt Performance - System Prompts
How the model should behave and reply.
Prompt Performance - Temperature
Value: 0-1
Creativity of the model’s output.
Low Value - more conservative
High Value - more diverse, less predictable, less coherent.
Prompt Performance - Top P
Value 0-1
Low P - Consider the 25% most likely words, more coherent.
High P - Consider a broad range of possible words.
Prompt Performance - Top K
Limits the number of probable words.
Low K - more coherent, less probable words.
High K - more probable words, more diverse
Prompt Performance - Length
Maximum Length of the answer
Prompt Performance - Stop Sequence
Tokens that signal the model to stop generating output.
Prompt Latency
How fast the model responds.
Impacted by model size, model type, number of token in input, number of tokens in output.
Not impacted by Top P, Top K, Temperature!!
Zero Shot Prompting
Present a task to the model without providing examples or explicit training for that specific task.
Few Shots Prompting
Provide examples of a task to the model to guides its output.
Chain of Thought Prompting
Divide the task into a sequence of reasoning steps, leading to more structure and coherence.
Think ‘Step by Step”
How to simplify and standardize the process of generating prompts?
Prompt Templates
AWS’s Solution for a fully managed Gen AI based on your company’s knowledge and data?
Amazon Q Business
What is Amazon Q Built on?
Which FM?
Built on Amazon Bedrock
Can’t choose the FM, it consists of a few.
What benefit is there by having Amazon Q + IAM Identity Center?
Users receive responses generated only from the documents they have access to.
Amazon Q Business - Admin Controls
Controls and customize responses to your organizational needs.
Admin Controls = Gaurdrails
Q Apps
Part of Amazon Q Business
Create Gen AI powered apps without coding by using natural language.
Functions of Amazon Q Developer
- Answer questions about the AWS documentation and AWS Service selection.
- Answer questions about resources in your AWS account.
- Suggest CLI to run to make changes to your account.
- Helps you do bill analysis, resolve errors, troubleshooting
- AI Code companion
QuickSight
Used to visualize your data and create dashboards about them.
Amazon Q for EC2
EC2 - instances are virtual servers.
Amazon Q for EC2 - provides guidance and suggestions for EC2 instance types that are best suited to your new workload.
Amazon Q for Glue
Glue - is an ETL (Extract Transform and Load) service used to move data across places.
PartyRock
GenAI app-building playground (powered by Bedrock)
What is AWS Q Developer?
An AI Coding assistant
AI Components
- Data Layer - where you collect vast amount of data.
- ML Framework & Algorithm Layer
- Model Layer - implement a model and train it.
What is ML?
Machine Learning
Type of AI for building methods that allow machines to learn.
Data is what is leveraged.
Great for making predictions.
What is Deep learning?
Subset of Machine Learning.
Uses neurons and synapses like our brain, to train models.
Process more complex patterns in the data than traditional ML.
Why DEEP learning?
Deep because there’s more than one layer of learning.
Computer Vision
Part of Deep Learning
Image classification, object detection, and image segmentation.
NLP
Natural Language Processing
Part of Deep Learning
test classification, sentiment analysis, machine translation, language generation.
Transformer Model
Able to process a sentence as a whole instead of word by word.
Diffusion Model
Adding or subtracting noise from an image.
Multi-Modal Models
Multiple types of inputs, and can create multiple types of outputs.
GPT
GENERATIVE PRE-TRAINED TRANSFORMER
Generate human text or computer code based on input prompts.
BERT
BIDIRECTIONAL ENCODER REPRESENTATIONS FROM TRANSFORMERS
Similar intent to GPT, but reads the text in two directions.
RNN
RECURRENT NEURAL NETWORK
Meant for sequential data such as time-series or text, useful in speech recognition, time-series prediction.
ResNet
RESIDUAL NETWORK
Deep Convolutional Neural Network (CDN) used for image recognition tasks, objects detection, facial recognition.
SVM
SUPPORT VECTOR MACHINE
ML algorithm for classification and regression.
WaveNet
model to generate raw audio waveform, used in speech synthesis.
GAN
GENERATIVE ADVERSARIAL NETWORK
Models used to gnerate synthetic data such as images, videos, or sounds that resemble the training data.
Helpful for data augmentation.
XGBoost
EXTREME GRADIENT BOOSTING
An implementation of gradient boosting.
Labeled vs Unlabeled Data
Labeled - includes both input features and corresponding output labels.
Unlabeled - Data that includes only input features without any output labels.
Structured Data vs Unstructured
Structured - Put into rows and columns (like excel)
Unstrcuted - no rhyme or reason.
Tabular Data
Data that is arranged in a table with rows. Structued Data.
Time Series Data
Structured Data
Data points collected or recorded at successive points in time.
Articles, Customer Reviews, and Social Media posts are what kind of data?
Unstructured Data
Supervised Learning - Regrssion
Used to predict a numeric value based on input data.
Output variable is CONTINUOUS
Supervised Learning - Classification
Used to predict the categorical label of input data.
Output variable is DISCRETE
Validation Set
Used to tune model parameters and validate performance.
Feature Engineering
Process of using domain knowledge to select and transform raw data into meaningful features.