Slide 1

Slide 1 text

Hands-on Gemini with Vertex AI and LangChain4j Mete Atamel Valentin Deleplace Guillaume Laforge Developer Advocates

Slide 2

Slide 2 text

Google Cloud Introduction

Slide 3

Slide 3 text

Google Cloud Artificial Intelligence NLP AI Landscape Data Science Machine Learning — Unsupervised, Supervised, Reinforcement Learning Deep Learning — Artificial, Convolution, Recurrent Neural Networks Generative AI — GAN, VAE, Transformers LLMs — Transformers Image Gen — GAN, VAE

Slide 4

Slide 4 text

Google Cloud Google invented the Transformer architecture Responsible AI at the foundation Google invents Transformer kickstarting LLM revolution Google’s groundbreaking large language model, BERT AlphaFold predicts 3D models of protein structures Text-to-Text Transfer Transformer LLM 10B P model open sourced Google LaMDA model trained to converse Google PaLM single model to generalize across domains Google PaLM 2 model is the SOTA LLM PaLM 2

Slide 5

Slide 5 text

Google Cloud What are Large Language Models (LLM)? ● Transformer-based neural network architecture that can recognize, predict, and generate human language ● Trained on huge corpuses of text in various languages and domains ○ PaLM 2 learned 340 billion parameters, and trained over 3.6 trillions of tokens ● Learns the statistical relationships between words and phrases, as well as the patterns of human language ● Can be fine-tuned for specific tasks or domain knowledge

Slide 6

Slide 6 text

Google Cloud LLM sizes

Slide 7

Slide 7 text

Google Cloud With larger models emerge new capabilities https://blog.research.google/2022/04/pathways-language-model-palm-scaling-to.html

Slide 8

Slide 8 text

Google Cloud What does Google (Cloud) offer?

Slide 9

Slide 9 text

Google Cloud Gemini (brand) previously Bard, Duet AI, … Google (Cloud) Landscape Vertex AI Google AI Studio Model Garden Codey Imagen Llama 2, Claude 2, Falcon, Vicuna, Stable Diffusion … Search & Conversation Vector Search Notebooks Pipelines AutoML PaLM Gemini (model) … Vision, Video, TTS / STT, NL APIs

Slide 10

Slide 10 text

Google Cloud Duet AI Bard Gemini PaLM MakerSuite Google AI Studio

Slide 11

Slide 11 text

Google Cloud What is Gemini (brand)? Gemini is an umbrella brand used in Google products that utilize the Gemini model ● Bard (consumer chat interface) ⇒ Gemini app ● Duet AI (Google Cloud developer assistance) ⇒ Gemini Cloud Assist ● Duet AI for developers ⇒ Gemini Code Assist ● …

Slide 12

Slide 12 text

Google Cloud What is Gemini (model)? Gemini is Google Deep Mind’s most capable LLM ● It’s a multimodal LLM: text, images, videos as inputs ● Comes in 3 sizes: Nano, Pro, and Ultra ● Supports function calling ● Ranks at the top of the various LLM benchmarks (general knowledge, translation, image understanding, reasoning, math, coding, and more…)

Slide 13

Slide 13 text

Gemini 1.5

Slide 14

Slide 14 text

Open-weights model derived from Gemini

Slide 15

Slide 15 text

Google Cloud SDKs and libraries

Slide 16

Slide 16 text

Google Cloud Google AI Studio vs. Vertex AI You can use Gemini from Google AI Studio or Vertex AI in Google Cloud They’re separate products with separate libraries and language coverage In this workshop, we’ll be using Vertex AI in Google Cloud

Slide 17

Slide 17 text

Google Cloud 17 Python is the default language in AI… But what about Java developers?

Slide 18

Slide 18 text

Google Cloud Option 1: Vertex AI Java API for Gemini https://cloud.google.com/java/docs/reference/google-cloud-vertexai/

Slide 19

Slide 19 text

19 Option 2: LangChain4j In this workshop, we’ll be using LangChain4j

Slide 20

Slide 20 text

Google Cloud Let’s get started!

Slide 21

Slide 21 text

Google Cloud Codelab: codelabs.developers.google.com/codelabs/gemini-java-developers Repo: github.com/glaforge/gemini-workshop-for-java-developers/tree/main Google Cloud Console: console.cloud.google.com/ bit.ly/gemini-devoxx-2024

Slide 22

Slide 22 text

Google Cloud Onramp TODO valentin screenshots, etc. Not using Onramp because of quota issues on step 10 (RAG) Instead, distribute frictionless accounts (email + password) Not using Onramp because of quota issues on step 10 (RAG) Instead, distribute frictionless accounts (email + password)

Slide 23

Slide 23 text

Thanks! Mete Atamel Valentin Deleplace Guillaume Laforge Developer Advocates