Build applications with generative AI on Google Cloud
martonkodok
269 views
51 slides
Jun 14, 2024
Slide 1 of 51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
About This Presentation
We will explore Vertex AI - Model Garden powered experiences, we are going to learn more about the integration of these generative AI APIs. We are going to see in action what the Gemini family of generative models are for developers to build and deploy AI-driven applications. Vertex AI includes a su...
We will explore Vertex AI - Model Garden powered experiences, we are going to learn more about the integration of these generative AI APIs. We are going to see in action what the Gemini family of generative models are for developers to build and deploy AI-driven applications. Vertex AI includes a suite of foundation models, these are referred to as the PaLM and Gemini family of generative ai models, and they come in different versions. We are going to cover how to use via API to: - execute prompts in text and chat - cover multimodal use cases with image prompts. - finetune and distill to improve knowledge domains - run function calls with foundation models to optimize them for specific tasks. At the end of the session, developers will understand how to innovate with generative AI and develop apps using the generative ai industry trends.
Size: 3.55 MB
Language: en
Added: Jun 14, 2024
Slides: 51 pages
Slide Content
Build applications with generative AI
on Google Cloud
Márton Kodok
Software Architect at REEA.net
June 13-14, 2024 Barcelona
1.Intro
2.Build with Gemini
3.What is Vertex AI?
4.Foundation Models + Model Garden
5.Multimodal use cases + Demo
6.Function calling with Gemini + Demo
Agenda
Build applications with generative AI on Google Cloud @martonkodok
●Google Developer Expert on Cloud technologies (2016→)
●Champion of Google Cloud Innovators program (2021→)
●Among the Top 3 romanians on Stackoverflow 206k reputation
●Crafting Cloud Architecture+ML backends at REEA.net
Build applications with generative AI on Google Cloud @martonkodok
About me
“
@martonkodok
“
demo…
@martonkodok
@martonkodok
Gemini Extensions
@martonkodok
Getting results from Gmail
@martonkodok
list the top 10 incidents from email for service name "trademark", group results in table
@martonkodok
Sum my invoices
@martonkodok
find all emails from this year from Hidroelectrica that contain "factura" and list all invoice values
for this year, with dates, in a table, order by descending
@martonkodok01
Build with
Gemini
Part #1
@martonkodok
Gemini comes in different sizes
Gemini 1.0 Pro
Multimodal reasoning across a
wide range of tasks
GA
Gemini 1.5 Flash
fastest, most cost-efficient
model yet for high volume tasks
GA
Gemini 1.5 Pro
Multimodal reasoning for longer
prompts, 1 million context
window
GA
1M
high volume 1000 (RPM),
lower latency and cost
1M
Large prompt,
1000+ pages of PDF
32K
Text, 16 images,
1 video
* May 2024 @martonkodok
A bit about pricing
For 1M tokens Gemini 1.5 FlashLlama 3 70B C3 Haiku GPT-4o
Input Token $0.35 - $0.70 $0.59 $0.25 $5.00
Output Token $1.05 - $2.10 $0.79 $1.25 $15.00
1 million tokens (for prompts up to 128K tokens | for prompts longer than 128K)
@martonkodok
Where to use
Build with Gemini
Google AI Studio
aistudio.google.com
- API key
- 60 QPM - free outside of EU
- Libraries in Python/Go/Node/Dart/Android
console.cloud.google.com
- service account key
- Vertex AI SDK
- LangChain integration + libraries
- access to 120 models via Model Garden
- available for individual/edu/business
Vertex AI Studio
“
Vertex AI is the Google Cloud product group for ML
End-to-end ML Platform
@martonkodok
Gen AI and Model Garden on Vertex AI @martonkodok
Google Cloud AI Portfolio
Foundation
Models
Vertex AI
End-to-End ML Platform
Text Chat Code ImageVideo
Google Cloud Infrastructure - GPUs/TPUs
Contact Center AI Healthcare AIDiscovery AIDocument AI
Business Users
AI Practitioners
Developers
Audio and
Music
Vertex AI
Studio
Generative AI
APIs
Model Garden
Gemini Business
Google Workspace
Duet Al for
Google Cloud
AI Platform: Fine tuning | Distill | Serve
02
Vertex AI
+
Model Garden
Part #2
Build applications with generative AI on Google Cloud @martonkodok
Model Garden
Task Specific
AutoML and APIs
Open Source
Models
Foundation
Models
Model Garden
Build applications with generative AI on Google Cloud @martonkodok
Model Garden
Foundation Models
Multi-task Large-scale Minimal training
Build applications with generative AI on Google Cloud @martonkodok
Language Foundation Models
Gemini 1.0 Pro
Multimodal reasoning across a
wide range of tasks
Gemini 1.5 Flash
fastest, most cost-efficient
model yet for high volume tasks
Gemini 1.5 Pro
Multimodal reasoning for longer
prompts, 1 million context
window
Imagen 2
Generate images from
Text prompts
Multimodal
Embeddings
Extract semantic information
Chirp for
Speech to Text
Build voice enabled applications
Build applications with generative AI on Google Cloud @martonkodok
Introduction
Generative AI Studio
Console-tool Test generative models Rapid prototyping
Build applications with generative AI on Google Cloud @martonkodok
Generative AI Studio
Build applications with generative AI on Google Cloud @martonkodok
Custom language Prompt samples
1.Summarization
2.Classification
3.Extraction
4.Writing
5.Ideation
cloud.google.com/vertex-ai/docs/generative-ai/learn/prompt-samples
“
Vertex AI
console demo
@martonkodok
Build applications with generative AI on Google Cloud @martonkodok
Prompt structure
1.Text:
2.Question:
3.Answer:
4.Categories:
5.Options:
Build applications with generative AI on Google Cloud @martonkodok
Best practices for the context field of your prompt
Part #3
03
Gemini
Multimodal
in action
Build applications with generative AI on Google Cloud @martonkodok
Introduction
Multi model
Image Video Text Function Calling
Build applications with generative AI on Google Cloud @martonkodok
Multi model use cases
1.Info seeking
2.Object recognition
3.Digital content understanding
4.Structured content generation
5.Captioning / description
6.Extrapolation
Build applications with generative AI on Google Cloud @martonkodok
Multi model use cases
“
demo…
@martonkodok
Build applications with generative AI on Google Cloud @martonkodok
Multimodal - Embeddings
Multi model - Embeddings
Image Video Text Audio
Build applications with generative AI on Google Cloud @martonkodok
Language Foundation Models
Gemini 1.0 Pro
Multimodal reasoning across a
wide range of tasks
Gemini 1.5 Flash
fastest, most cost-efficient
model yet for high volume tasks
Gemini 1.5 Pro
Multimodal reasoning for longer
prompts, 1 million context
window
Imagen 2
Generate images from
Text prompts
Multimodal
Embeddings
Extract semantic information
Chirp for
Speech to Text
Build voice enabled applications
Google Cloud Next ‘24 Proprietary
Joint Embedding
Vector Space
Image:
“gray tabby cat
laying in front of a
Christmas tree”
Text:
size color
living
Multimodal
embeddings
●Embed text, image, and video in the
same semantic space with the same
dimensionality
●Applications: image/video content
search, classification,
recommendation
035Google Cloud Next ‘24 Proprietary
Resources
BQ Embedding Generation
Documentation | Blog | Video
BQ Vector Search
Documentation | Blog | LangChain
Demo Assets
BQ LangChain Notebook |
Gen AI Repo
Vector search and multimodal
embeddings in BigQuery
goo.gle/next24-ana302
“
Cloud Next’24 demo app in action
@martonkodok
04
Gemini
Function Calling
Part #4
Build applications with generative AI on Google Cloud @martonkodok
Function calling in Gemini
A framework to connect LLMs
to real-time data
delegate certain data processing tasks
to functions
cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling @martonkodok
Function calling in Gemini
Gen AI … repository
Build applications with generative AI on Google Cloud @martonkodok
@martonkodok
Sample code for GenAI on Google Cloud
goo.gle/gen-ai-github
Build applications with generative AI on Google Cloud @martonkodok
https://goo.gle/gen-ai-github -> Gemini folder
“
Function calling demo…
@martonkodok
Part #5
05
Open-source
models
Build applications with generative AI on Google Cloud @martonkodok
Open Source models
Llama 2 on Vertex AI
Meta's Llama 2 models
on Vertex AI
Code Llama
Designed for general code synthesis and
understanding, designed for Python
Gemma 2B and 7B
Family of lightweight,
state-of-the-art open models
Claude on Vertex AI
Claude 2, Instant 1.2, and more
“
Vertex AI enables model inference via API
Build applications with generative AI on Google Cloud @martonkodok
Build applications with generative AI on Google Cloud @martonkodok
VertexAI: Managed unified ML platform
Fine-tuning
1 click deploy
@martonkodok
Explore AI models with Colab samples
cloud.google.com/vertex-ai/docs/start/explore-models#test-promptsub
Conclusion
Build applications with generative AI on Google Cloud @martonkodok
1.Build with the groundbreaking ML tools that power Google
2.Model Garden provides a curated collection of 120+ models
3.Approachable from the non-ML developer perspective (managed models, fine-tuning training)
4.Accelerate ML with tooling for pre-trained, open source and custom models
5.Deploy to applications with just one-click
6.End-to-end integration for data and AI with build pipelines that outperform and solve complex ML tasks
Vertex AI: Enhanced ML developer experience
Build applications with generative AI on Google Cloud @martonkodok
Twitter: @martonkodok
Thank you. Q&A.
Reea.net - Integrated web solutions driven by creativity
to deliver projects.
Follow for articles:
martonkodok.medium.com
Slides available on:
slideshare.net/martonkodok