Google Cloud Skills Boost — Part 1 — Introduction to Generative AI

Allan Alfonso
Google Cloud - Community
5 min readJun 14, 2023

--

On May 18, 2023, Google Cloud released free Generative AI training. This series of blog posts are my notes from each of the modules. For more details, see this blog post announcement.

Source: https://www.cloudskillsboost.google/course_templates/536

Introduction to Generative AI

  • AI is the theory and development of computer systems able to perform tasks normally requiring human intelligence.
  • ML gives computers the ability to learn without explicit programming.

Types of Machine Learning

  • Supervised Learning: data is labeled so you can predict future values from past values.
  • Unsupervised Learning: data is not labeled. Unsupervised problems are all about looking at the raw data and seeing if it naturally falls into groups.
  • Deep Learning — uses artificial neural networks to process more complex patterns than traditional machine learning.

Generative AI

  • Generative AI is a subset of deep learning which uses an artificial neural network to process both labeled and unlabeled data using supervised, unsupervised, and semi-supervised methods.
Artificial Neural Network

Artificial neural networks

  • Inspired by the human brain, artificial neural networks are made up of many interconnected nodes or neurons that can learn to perform tasks by processing data and making predictions.
  • Deep learning models typically have many layers of neurons which allows them to learn more complex patterns than traditional machine learning models.
  • Neural networks can use both labeled and unlabeled data.
Predictive ML Model vs GenAI Model

Categories of Large Language Models

  • Discriminative:
    - Used to classify or predict
    - Typically trained on a dataset of labeled data
    - Learns the relationship between the features of the data points and labels so it can predict the label for new data points
  • Generative:
    - Generates new data based on the learned probability distribution of existing data
Generative AI
  • Gen AI is more robust than classical Supervised and Unsupervised Learning.
  • Gen AI can take many data types, build a foundational model, and generate new content such as text, code, images, audio, video, etc.
When is an output GenAI or not?

Formal Definition of Generative AI

  • GenAI is a type of AI that creates new content based on what it has learned from existing content.
  • The process of learning from existing content is called training and results in the creation of a statistical model.
  • When given a prompt, GenAI uses a statistical model to predict what an expected response might be and generates new content.
Transformers

Transformers

  • Powers GenAI and produced a 2018 revolution in natural language processing.
  • Consists of an encoder and decoder.
  • Encoder: encode the input sequence and passes it to the decoder.
  • Decoder: learns how to decide the representation for a relevant task.
  • Hallucinations are words or phrases that are generated by the model that are often nonsensical or grammatically incorrect.
  • Hallucinations occur because of:
    - The model is not trained on enough data
    - The model is trained on noisy or dirty data
    - The model is not given enough context
    - The model is not given enough constraints
Prompting
  • A Prompt is a short piece of text that is given to the large language model as input and can be used to control the output of the model.

Model Types

  • Text-to-text: takes a natural language input and produces a text output.
  • Text-to-image: takes a large set of captioned images and produces a video representation from the text input.
  • Text-to-video/Test-to-3D: takes a single sentence or full script and produces a video output corresponding to the text input.
  • Text-to-task: takes text input and performs a defined task or action, such as answering a question, performing a search, or making a prediction based on the text input.
Foundational Models

Foundational Models

  • Large AI models that are pre-trained on a vast quantity of data.
  • Designed to be adapted or fine-tuned to a wide range of tasks.

Google Cloud AI Tools

Vertex AI Models
  • Vertex AI offers a model garden that includes foundational models.
GenAI Studio

Generative AI Studio

  • It lets you quickly explore and customize GenAI models that you can leverage in your applications on Google Cloud.
  • Helps developers create and deploy GenAI models by providing various tools and resources that make it easy to get started.
  • Provides a library of pre-trained models, tools for fine-tuning models, tools for deploying models into production, and a community forum for developers to share ideas and collaborate.

Generative AI App Builder

  • Create GenAI apps without writing any code.
  • Provides a drag-and-drop interface that makes it easy to design and build apps.
  • Provides a visual editor that makes it easy to create and edit app content.
  • Comes with a built-in search engine that can be used to search for information within the app.
  • Has a conversational AI Engine that helps users interact with the app using natural language.
PaLM API and Maker Suite

PaLM API and Maker Suite

  • PaLM API lets you test and experiment with Google’s Large Language Models and GenAI tools.
  • Developers can integrate PaLM API with Maker Suite to access the API using a graphical user interface.
  • Maker Suite includes different tools such as model training tools, a model deployment tool, and a model monitoring tool.

Summary

  • Generative AI is a type of artificial intelligence that can produce various types of content, including text, imagery, audio, and synthetic data.
  • Generative AI works by learning the underlying structure of existing data and then using that knowledge to generate new samples that are similar to the original data.
  • There are two main types of generative AI models: discriminative models and generative models. Discriminative models are used to classify or predict labels for data points, while generative models are used to generate new data instances.
  • Generative AI has a wide range of applications, including natural language processing, computer vision, audio processing, and robotics.
  • Generative AI is a powerful tool that has the potential to revolutionize the way we interact with computers and the world around us.
GenAI Use Cases

Continue to Part 2 — Introduction to Large Language Models.

--

--