Slide 1

Slide 1 text

Build with AI on Google Cloud Session #1 Intro to GenAI 1/22/2025 Seattle | Surrey | Vancouver | Burnaby

Slide 2

Slide 2 text

GDG Seattle 2 Margaret Maynard-Reid Yenchi Lin Clive Boulton Vishal Pallerla I/O Extended 2019 2024 Build with AI DevFest Seattle 2018 DevFest Seattle 2022 WTM Lightning Talks 2018 Cloud Study Jam 2018 DevFest Seattle 2017 DevFest Seattle 2016 DevFest Seattle 2015 DevFest Seattle 2024 Follow GDG Seattle on LinkedIn

Slide 3

Slide 3 text

GDG Surrey 3 Follow GDG Surrey on LinkedIn

Slide 4

Slide 4 text

GDG Vancouver Follow GDG Seattle on LinkedIn 4 Follow GDG Vancouver on LinkedIn Join our GDG Vancouver Community Volunteer Interest Form

Slide 5

Slide 5 text

GDG Burnaby GDG Burnaby Bevy | LinkedIn 5

Slide 6

Slide 6 text

Build with AI on Google Cloud Agenda ● Study series overview ● Cloud Skills Boost walkthrough ● CSB beginner path repris ● Intro to GenAI on Google Cloud ● Prompt Design ● Q & A - 20 min Seattle | Surrey | Vancouver | Burnaby

Slide 7

Slide 7 text

Build with AI on Google Cloud Study series overview 7

Slide 8

Slide 8 text

Topics for this session ● Online study series overview ● Intro to GenAI on Google Cloud ● GenAI beginner path ● … 8

Slide 9

Slide 9 text

9 Link to Story on Medium

Slide 10

Slide 10 text

Study series overview Follow 5 generative AI paths on Google Cloud Skills Boost: 1. 1/22/25 - Beginner: Intro to GenAI (link) 2. 2/5/25 - Generate Smarter GenAI Outputs (link) 3. 2/19/25 - Build & Modernize Apps with GenAI (link) 4. 3/5/25 - Integrate GenAI into Your DataFlow (link) 5. 3/19/25 - Deploy & Manage GenAI Models (link) Topics are not limited to the above. Each session: 2 short talks (by Googlers or experts) + Q&A section. 10

Slide 11

Slide 11 text

What is a learning path? A learning path has multiple courses Each course has videos, recommended reading, quiz & hands-on labs. You will have at least two weeks to work through the materials It’s OK if you don’t finish and feel free to study ahead 11

Slide 12

Slide 12 text

Access to Cloud Skills Boost ● Sign up here: https://www.cloudskillsboost.google/ ● By RSVP, you get free access for a few months ● The videos are accessible by default while labs each require a credit ● You can work on each GenAI paths before or after each session Note: Make sure to sign up on Google Cloud Skills Boost with the same email that you used for event RSVP. 12

Slide 13

Slide 13 text

Build with AI on Google Cloud Cloud Skills Boost walkthrough 13

Slide 14

Slide 14 text

14 Sign In -Google Cloud Skills Boost

Slide 15

Slide 15 text

15 Explore Paths

Slide 16

Slide 16 text

Build with AI on Google Cloud Beginner: Intro to GenAI Learning Path 16

Slide 17

Slide 17 text

5 courses in the learning path 17 1. Intro to Generative AI (45 minutes) 2. Intro to LLMs (1 hour) 3. Intro to Responsible AI (30 minutes) 4. Prompt Design in Vertex AI (3 hours 45 minutes) 5. Responsible AI: Applying AI Principals with Google Cloud (2 hours)

Slide 18

Slide 18 text

1. Intro to generative AI ● AI vs ML vs deep learning ● What is Generative AI? LLMs and generative Image models… ● Supervised vs unsupervised learning 18

Slide 19

Slide 19 text

2. Intro to LLM 19

Slide 20

Slide 20 text

3. Intro to Responsible AI 20

Slide 21

Slide 21 text

4. Prompt Design 21

Slide 22

Slide 22 text

5. Responsible AI: Applying AI Principles with GCloud 1. Be socially beneficial 2. Avoid creating or reinforcing unfair bias 3. Be built and tested for safety 4. Be accountable to people 5. Incorporate privacy design principles 6. Uphold high standards of scientific excellence 7. Be made available for uses that accord with these principles 22

Slide 23

Slide 23 text

Build with AI on Google Cloud Intro to GenAI Margaret Maynard-Reid, AI/ML GDE 23

Slide 24

Slide 24 text

AI/ML GDE (Google Developer Expert) 3D artist Fashion Designer Instructor of MSIS, UW Foster Ex MS Design Studio, MSR, MS Bing About me margaretmz.art 24

Slide 25

Slide 25 text

AI, ML, Deep Learning & GenAI Artificial Intelligence Machine Learning Deep Learning 25 25 Generative AI

Slide 26

Slide 26 text

What is Generative AI? A type of AI that creates new content with generative models: 26 Text Image Video Audio Generative AI Text Image Video Audio

Slide 27

Slide 27 text

What are Generative Models? “Generative models: take a machine, observe many samples from a distribution and generate more samples from that same distribution”. - Ian Goodfellow 2016 27

Slide 28

Slide 28 text

What is an LLM? LLMs Explained [...] [...] [...] [...] 0.02 0.03 0.9 0.01 0.0 … Dogs Rain Drops Fish Wind … and cats raining It’s

Slide 29

Slide 29 text

Type of Generative Models ● 2014 Generative Adversarial Networks (GANs) ● 2016 Autoregressive Models ● 2019 Variational autoencoders (VAEs) ● Flow-based models ● 2020 Diffusion models ● 2022 Diffusion Transformer 29 Source: Lilian Weng blog (link)

Slide 30

Slide 30 text

Diffusion Models 1. Gradually add gaussian noise to training data 2. Learn how to reverse the process to generate images from noise. 30 Source: Nvidia developer blog (link) Forward image diffusion Generative reverse denoise

Slide 31

Slide 31 text

CLIP: Contrastive Language-Image Pre-training CLIP is a bridge between NLP and computer vision, connecting text and Images It has a text encoder and image encoder, trained with 400 million image-text pairs. ● DALLE, DALLE-2 ● Stable Diffusion ● Imagen, Imagen 2, Imagen 3 Paper: Learning Transferable Visual Models From Natural Language Supervision 31

Slide 32

Slide 32 text

Diffusion Transformer Paper: Scalable Diffusion Models with Transformers SoTA models using diffusion transformer: ● Pixart-a ● SORA ● Stable Diffusion 3 32

Slide 33

Slide 33 text

The U-Net 33 U-Net architecture (image source: U-Net paper) 2015 paper for medical imaging segmentation Used in many popular GenAI models: ● Pix2Pix ● CycleGAN ● Diffusion Models (DDPM) ● DALL-E ● Midjourney ● Stable Diffusion…

Slide 34

Slide 34 text

U-Net vs Diffusion Transformer U-Net - not crucial to the good performance of the diffusion model - struggle with capturing long-range dependencies and global context in the input data Diffusion Transformer - More flexible - Can use more training data and larger model parameters - Transformers can model long-range dependencies without the need for deep networks or large filters, because of the self-attention mechanisms 34

Slide 35

Slide 35 text

Timeline: generative AI in vision Source: Sora paper 35 Imagen 3 Veo/VideoFX

Slide 36

Slide 36 text

Thank you! Connect with me learn more about AI, art & design! @margaretmz @margaretmz @margaretmz @margaretmz 36

Slide 37

Slide 37 text

Build with AI on Google Cloud Prompt Design - By Priti Y. 37 What is Prompt Design?

Slide 38

Slide 38 text

Prompt Design Workflow 38 Define Objectives and Expected Outcomes Create the Prompt Content, Structure, Components Test the Prompt Identify Areas for Improvement Refine Iterate Iterate

Slide 39

Slide 39 text

The Components of a Prompt ● Define the Task ● Contextual Information ● Include Few-Shot Examples ● System Instructions 39

Slide 40

Slide 40 text

Common Pitfalls in Prompt Design ● Vague Instructions ● Not Providing Enough Context ● Poorly Structured Prompts ● Not Using Examples ● Not Assigning a Role or Persona ● Not Breaking Down Complex Tasks ● Not Specifying the Output Format ● Not Iterating on Prompts ● Not Experimenting with Parameters 40

Slide 41

Slide 41 text

Best Practices for Designing Prompts ● Assign a Role ● Structure Prompts ● Instruct the Model to Explain its Reasoning ● Break Down Complex Tasks ● Experiment with Parameter Values ● Specify the Output Format ● Optimize Image Prompts ● Tailor for Task Type ● Consider the Model’s Limitations 41

Slide 42

Slide 42 text

Demo Prompt Design in Vertex AI 42

Slide 43

Slide 43 text

Thank you! Let's connect to explore AI Projects/Research and Board Games together! 43 @pritiyadav888 @mentors/priti-yadav

Slide 44

Slide 44 text

Build with AI on Google Cloud Q&A 44

Slide 45

Slide 45 text

More questions? Post them on GDG Surrey Discord server #gen_ai_gcp 45 Scan Me

Slide 46

Slide 46 text

Have fun studying! Action items: ● Join discord - post your questions there ● Get access to Cloud Skills Boost credits ● Complete Beginner GenAI path on CSB ● Get started on the 2nd GenAI path on CSB Next session: ● Feb 5, 2025 - Session #2 - Deep Dive (RSVP) 46