AWS AIF - Notes

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/108

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

109 Terms

1
New cards

Foundation Model

a large, pre-trained AI model trained on massive datasets, offering broad capabilities for text, image, or multimodal tasks

2
New cards

Large Language Model (LLM)

AI designed to generate coherent human-like text

3
New cards

Non-deterministic

generated text may be different for every user that uses the same prompt

4
New cards

Amazon Bedrock

fully managed AWS service that makes it easy to build & scale gen. AI apps by providing Foundation Models (FM)

  • None of your data is used to train the FM

5
New cards

Amazon Titan

High-performing FM from AWS

6
New cards

Amazon Bedrock Fine-Tuning

Adapt a copy of a FM with your own data

  • Training Data:

    • Must adhere to a specific format

    • Must be stored in S3

  • To use a fine-tuned model, you must provision throughput by purchasing capacity

  • Not all models can be fine-tuned

7
New cards

Instruction-based fine-tuning

The model is trained to follow explicit instructions by aligning out-puts with human-provided examples of desired behavior

8
New cards

Continued Pre-training

The model is further trained on domain-specific or custom data to adapt its knowledge base beyond the original pre-training

9
New cards

Single-turn Messaging

The model is optimized to handle one-off prompts where each query & response are independent of prior context

10
New cards

Multi-turn messaging

The model is fine-tuned to maintain context across a conversation, enabling coherent back-and-forth interactions over multiple exchanges

11
New cards

Which of the fine-tuning options is usually cheaper?

Instruction-based fine-tuning because computations are less intense & the amount of data required is usually less

12
New cards

Transfer Learning

the broader concept of reusing a pre-trained model to adapt it to a new related task

13
New cards

For evaluating a model, what do some benchmark datasets allow you to do?

very quickly detect any kind of bias & potential discrimination against a group of people

14
New cards

Automated Metrics to Evaluate an FM

  • ROUGE; Recall-Oriented Understudy for Gisting Evaluations

  • BLEU; Bilingual Evaluation Understudy

  • BERTScore

  • Perplexity (how well the model predicts the next token (lower is better))

15
New cards

Business Metrics to Evaluate a Model on

  • User Satisfaction

  • Average Revenue Per User (ARPU)

  • Cross-Domain Performance (model’s ability to perform cross different domain tasks)

  • Conversion Rate

  • Efficiency

16
New cards

Retrieval-Augmented Generation (RAG)

Allows a FM to reference a data source outside of its training data

17
New cards

RAG Use Cases

  • Customer Service Chatbot

  • Legal Research & Analysis

  • Healthcare Question-Answering

18
New cards

Tokenization

converting raw text into a sequence of tokens

19
New cards

Context Window

The number of tokens an LLM can consider when generating text

20
New cards

Embeddings

create vectors (array of numerical values) out of text, images, or audio

21
New cards

Since vectors have a high dimensionality, what can they do?

they can capture many features for one token, such as semantic meaning, syntactic role, sentiment

22
New cards

What can embedding models power?

search applications

23
New cards

Bedrock-Agent

Manage & carry out various multi-step tasks related to infrastructure provisioning, application deployment, & operational activities

24
New cards

Model Improvement Techniques Cost Order (most cost effective to least)

1.) Prompt Engineering

2.) RAG

3.) Instruction-based Fine-tuning

4.) Domain Adaption Fine-tuning

25
New cards

What can Amazon OpenSearch Serverless help store?

embeddings within vector databases

26
New cards

Prompt Engineering

developing, designing, & optimizing prompts to enhance the output

27
New cards

Improved Prompting techniques consists of:

  • Instructions

  • Context

  • Input data

  • Output Indicator

28
New cards

Negative Prompting

explicitly instruct the model on what not to include or do in its response

29
New cards

Temperature (0 to 1)

creativity of the model’s output

  • Low (ex: .2); more conservative, repetitive responses

  • High (ex: 1); more diverse, creative, and possibly less coherent responses

30
New cards

Top P (0 to 1);

Consideration of words

  • Low P (ex: .25); consider the 25% most likely words, more coherent responses

  • High P (ex: .99); considers a broad range of possible words, more creative & diverse responses

31
New cards

Top K

Limits the number of probable words

  • Low K (ex: 10); more coherent responses, less probable words

  • High K (ex: 500); more probable words, more diverse & creative

32
New cards

Stop Sequences

Tokens that signal the model to stop generating output

33
New cards

What isn’t latency impacted by?

Top P, Top K, or Temperature

34
New cards

Zero-Shot Prompting

Present a task to the model without providing examples or explicit training for that specific task

35
New cards

Few-Shots Prompting

Provide examples of a task to the model to guide its output

36
New cards

Chain of Thought Prompting

Divide the task into a sequence of reasoning steps, leading to more structure, & coherence (first, then, next)

37
New cards

Prompt Templates

predefined structures/patterns to format inputs for AI models. They help standardize prompts so the model produces more reliable & repeatable outputs

38
New cards

“Ignoring the prompt template” attack

users enter malicious inputs to hijack the prompt & provide info on a prohibited or harmful topic

39
New cards

Amazon Q Business

Fully managed Gen-AI assistant for your employees. Based on your company’s knowledge & data. Built on Amazon Bedrock

40
New cards

Amazon Q Apps

Create Gen-AI powered apps without coding by using natural language

41
New cards

Amazon Q Developer

  • Answer questions about the AWS documentation & AWS service selection

  • Answer questions about resources in your AWS account

  • AI Code Companion to help you code new apps

42
New cards

Amazon SageMaker AI

Fully managed service for developers/data scientists to build ML models

43
New cards

SageMaker Automatic Model Tuning (AMT)

a managed service that finds the best hyperparameters for your ML model by automatically running multiple training jobs with different configurations

44
New cards

SageMaker Deployments; Real-time

One prediction at a time; Configure CPU & GPU

45
New cards

SageMaker Deployments; Serverless

Configure RAM; Idle period between traffic spikes; cold starts

46
New cards

SageMaker Deployments; Asynchronous

  • For Large payload sizes up to 1 GB

  • Long processing times

  • Near-real time latency requirements

  • Request & responses are in S3

47
New cards

SageMaker Deployments; Batch

  • Prediction for an entire data set (multiple predictions)

  • Request & responses are in S3

48
New cards

SageMaker Model Deployment Use Cases; Real-time

Fast, near-instant predictions for web/mobile apps

49
New cards

SageMaker Model Deployment Use Cases; Serverless

sporadic, short-term inference without infrastructure, can tolerate cold starts

50
New cards

SageMaker Model Deployment Use Cases; Asynchronous

Large payloads & workloads requiring longer processing times

51
New cards

SageMaker Model Deployment Use Cases; Batch

Bulk processing for large datasets. Concurrent processing

52
New cards

SageMaker Studio

End-to-end ML development from a unified interface

53
New cards

SageMaker Data Wrangler

Prepare tabular data & image data for ML (transform)

54
New cards

ML Features

inputs to ML models used during training & used for inference

55
New cards

Feature Engineering

process of transforming raw data into meaningful input variables features; e.g. birthday to age

56
New cards

SageMaker Feature Store

a managed repository within AWS for storing, sharing, & serving features

57
New cards

SageMaker Clarify

AWS service that helps data scientists detect bias & understand the explainability of their ML models

58
New cards

RLHF

Reinforcement Learning from Human Feedback

59
New cards

SageMaker GroundTruth

help create high-quality training datasets; human-in-the-loop

60
New cards

SageMaker Model Cards

Essential model info

61
New cards

SageMaker Model Dashboard

Centralized repo; Information & insights for all models

62
New cards

SageMaker Role Manager

Define roles for people

63
New cards

SageMaker Model Monitor

monitor the quality of your model; alerts for deviations

64
New cards

SageMaker JumpStart

ML hub that provides pre-trained models, built in algorithms, & end-to-end solutions

  • is for developers needing deep customization & control over a model

65
New cards

SageMaker Canvas

Build ML models using a visual interface (no coding required)

66
New cards

ML Flow

open-source tool which helps ML teams manage the entire ML lifecycle

67
New cards

SageMaker Network Isolation mode

Run SageMaker job containers without any outbound internet access

68
New cards

SageMaker DeepAR

Used to forecast time series data

69
New cards

Deep Learning

  • subset of ML

  • uses neurons & synapses (like our brain) to train a model

70
New cards

GPT (Generative Pre-trained Transformer)

generate human text or computer code based on input prompts

71
New cards

BERT (Bidirectional Encoder Representations from Transformers)

similar to intent to GPT, but reads the text in two directions

72
New cards

RNN (recurrent Neural Network)

meant for sequential data such as time-series or text, useful in speech recognition, time series prediction

73
New cards

ResNet (Residual Network)

Deep Convolutional Neural Network (CNN) used for image recognition tasks, object detection, facial recognition

74
New cards

SVM (Support Vector Machine)

ML algorithm for classification & regression

75
New cards

WaveNet

model to generate raw audio waveform used in speech synthesis

76
New cards

GAN (Generative Adversarial Network)

models used to generate synthetic data such as images, videos, or sounds that resembles the training data. Helpful for data augmentation

77
New cards

XGBoost (Extreme Gradient Boosting)

an implementation of gradient boosting

78
New cards

RLHF Steps

  • Data collection

  • Supervised fine-tuning of a language model

  • Build a separate reward model

  • Optimize the language model with the reward-based model

79
New cards

Overfitting

Performs well on the training data, but doesn’t perform well on evaluation data (high variance)

80
New cards

Underfitting

Model performs poorly on training data; the model could be too simple or there could be poor data features (high bias)

81
New cards

Bias

Difference or error between predicted and actual values

82
New cards

Variance

How much the performance of a model changes if trained on a different dataset which has a similar distribution (data is all over the place if the variance is high)

83
New cards

Binary Classification Evaluation Metrics

Precision, Recall, F1, & Accuracy

84
New cards

AUC-ROC

shows what the curve for true positives compared to false positives looks like (binary classification)

85
New cards

Regression Evaluation Metrics

Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), Root Mean Squared Error (RMSE), R Squared

86
New cards

ML Project Phases

1.) Business Goal Identification

2.) ML Problem Framing

3.) Data Processing

4.) Model Development

5.) Model Deployment

6.) Model Monitoring

87
New cards

Hyperparameter tuning

the process of finding the best settings (hyperparameters) for a ML model before training, to maximize its performance & accuracy

88
New cards

Important Hyperparameters

Learning rate, Batch size, Number of Epochs, Regularization

89
New cards

Amazon Comprehend

For Natural Language Processing (NLP)'; extract insights; sentiment analysis; Named Entity Recognition (NER)

90
New cards

Amazon Transcribe

convert speech to text

91
New cards

Amazon Polly

Turn text into lifelike speech using deep learning

92
New cards

Amazon Rekognition

Find objects, people, text, scenes in images & videos; Facial Analysis and Facial Search

93
New cards

Amazon Lex

Same tech that powers Alexa

  • ASR to convert speech to text

  • Natural Language Understanding

  • Helps build chatbots, call center bots

94
New cards

Amazon Personalize

Fully managed ML-service to build apps with real-time personalized recommendations

95
New cards

Amazon Textract

Automatically extracts text, handwriting, & data from any scanned documents using AI & ML

96
New cards

Amazon Kendra

Fully managed ML document search service

97
New cards

Amazon Comprehend Medical

Uses NLP to detect PHI in a document

98
New cards

Amazon Polly Lexicons

Define how to read certain specific pieces of text; AWS → Amazon Web Services

99
New cards

Amazon Polly Speech Synthesis Markup Language (SSML)

Markup for your text to indicate how you pronounce it

100
New cards

Amazon Mechanical Turk

Crowdsourcing marketplace to perform simple human tasks; Distributed virtual workforce