Lesson 2 of 5 Generative AI Concepts

Choosing Foundation Model Types and Adapting Models

This lesson explains foundation models, large general-purpose models that can be adapted to many tasks, the types of model, and the lifecycle that helps you choose a model and the right way to customise it.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe what foundation models are and how they are pre-trained.
  • Distinguish large language models, multi-modal models and diffusion models.
  • Describe the stages of the foundation model lifecycle.
  • Order the ways of adapting a model from cheapest to most involved.

What foundation models are

Foundation models (FMs) are pre-trained with self-supervised learning on very large, broad data, often trillions of tokens. One FM can summarise, translate, answer questions, write code and classify text with only prompting or light customisation. Building one costs millions of dollars, so most organisations use existing FMs.

Model types

Foundation models are grouped by the kinds of data they handle. A large language model (LLM) works with text and code, as in chat assistants. A multi-modal model works with more than one kind of data, for example answering a question about a chart image. A diffusion model generates images or video by starting from random noise and removing it step by step, guided by a prompt, as Stability AI's Stable Image models in Amazon Bedrock do for images. An embedding model turns content into vectors, lists of numbers that capture meaning, so that similar content can be found, which is the basis of semantic search and RAG. The following table summarises the types.

TypeWorks withExample
Large language model (LLM)Text and codeChat assistants
Multi-modal modelMore than one type of data, such as text and imagesAnswering questions about a chart
Diffusion modelGenerates images or video by removing noise step by step, guided by a promptStability AI Stable Image models (images), Luma Ray2 (video)
Embedding modelTurns content into vectorsAmazon Titan Text Embeddings

Other architectures you may meet include GANs and variational autoencoders (VAEs).

True or false

Kinds of foundation model

Exam skills 2.1.1 · 2.1.2

Check four claims about the types of foundation model.

Log in to try this activity Interactive activities are free with an account.

The foundation model lifecycle

A foundation model is developed and maintained through a series of stages. The lifecycle consists of the following stages.

  1. Data selection

    Curate large, diverse, clean data.

  2. Model selection

    Choose the architecture and size.

  3. Pre-training

    Self-supervised learning on the broad data.

  4. Fine-tuning and alignment

    Adapt the model for specific tasks and safe behaviour, for example with RLHF.

  5. Evaluation

    Measure quality, safety and bias on benchmarks and task-specific data.

  6. Deployment

    Make the model available for inference, for example through an API.

  7. Feedback

    Collect feedback for continuous improvement.

The following diagram shows the lifecycle stages in order.

The foundation model lifecycle. Data is curated, the architecture and size are chosen, and the model is pre-trained with self-supervised learning on broad data. It is then fine-tuned and aligned, for example with RLHF, evaluated for quality, safety and bias, and deployed for inference. Feedback from use drives further improvement.
Feedback from use drives further improvement.
Put in order

The FM lifecycle

Exam skills 2.1.3

Put the stages of a foundation model's lifecycle in order.

Log in to try this activity Interactive activities are free with an account.

Adapting a model

Start from a pre-trained FM and use the cheapest method that works: prompt engineering, then RAG to add knowledge, then fine-tuning to change behaviour or style, and only rarely continued pre-training.

Typical use cases include summarisation, chat assistants, translation, code generation, customer service agents, search and question answering, marketing copy, recommendations, and image, video and audio generation.

Scenario questions

Start with the cheapest method

Exam skills 2.1.3 · 3.1.5

Choose the first adaptation method to try in each case.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing a model type for each feature

A travel company plans five generative AI features. Each needs a different kind of model:

FeatureModel typeExample on AWS
Chat assistant answering booking questionsLarge language modelAmazon Nova 2 Lite or Claude on Bedrock
Describe what is in a customer's uploaded hotel photoMulti-modal modelAmazon Nova 2 Lite
Generate illustrations for destination guidesDiffusion modelStable Image Core (Stability AI)
Find similar hotels from a descriptionEmbedding modelAmazon Titan Text Embeddings
Short promotional video of a cityVideo generation (diffusion)Luma Ray2 (Luma AI)

None of these requires the company to pre-train a model; that step of the lifecycle has been done by the model providers at enormous cost. The company's work starts at choosing, prompting, grounding and, if needed, fine-tuning existing foundation models.

Check yourself

What makes a model a foundation model?

Show answer

It is pre-trained on very large, broad data and can be adapted to many tasks through prompting, RAG or fine-tuning, rather than being built for a single task.

Exam Tips

Remember for the exam

  • Generating images from text calls for a diffusion model.
  • Understanding images and text together calls for a multi-modal model.
  • Converting content into vectors calls for an embedding model.
  • The lifecycle runs: data selection, model selection, pre-training, fine-tuning, evaluation, deployment and feedback.
  • Most companies adapt an existing foundation model rather than pre-train their own.