liveBook · Manning

Foundational model

As explained in Delivering Machine Learning Projects: From design to deployment

A foundation model is a broadly trained machine learning model that can be adapted to support multiple downstream tasks.

A foundational model is a broadly trained, reusable machine learning model that can support multiple downstream tasks. A prebuilt model of a general domain, such as English text or everyday images, can turn unstructured data into a form useful for exploration or further modeling. section 6.1.4 section 7.2

Many foundational models generate embeddings: ordered vectors of floating-point numbers representing where data items lie in the model’s conceptual space. For exploratory data analysis, choose a model appropriate to the data, generate embeddings for all or a reasonable subset of the items, and use them to investigate relationships. Apply the model with care; its general-domain training may not suit every dataset. section 6.1.4

Exploring text and creating features

The all-MiniLM-L12-v2 sentence transformer can embed text from Shakespeare’s plays to investigate similarity and novelty. Related themes can then be represented as a concept graph. The same general approach can turn unstructured data into features for another modeling process. section 7.2

Figure 6.4 Heat map of nearest neighbor connections in Shakespeare’s plays using all-MiniLM-L12-v2

The heat map illustrates nearest-neighbor connections between plays found using sentence embeddings. section 6.1.4

Before using a foundational model in a delivery pipeline:

  • Check its licensing conditions, tell the customer which model is used, and register it in the appropriate repositories and catalogs. section 5.5.1
  • Track the model version across pipelines and environments. Embeddings generated with one model generally match poorly against those generated with another. section 5.5.1
  • Consider an on-load hash check in model-serving code to verify that the intended model is loaded in development, test, and production. section 5.5.1

How Delivering Machine Learning Projects: From design to deployment covers it

How deep it goes
Explains embedding-based exploration and model governance without detailing how foundational models are trained.
Examples
Uses Shakespeare’s plays to illustrate sentence embeddings, similarity, novelty, and a concept graph.
What you can do after
Apply all-MiniLM-L12-v2 to generate text embeddings for exploratory analysis and downstream features.
How it connects
Connects embeddings with exploratory data analysis, similarity search, and feature engineering.

Also explained in

Compare how 21 books explain foundational model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Delivering Machine Learning Projects: From design to deployment. The section links point to the parts of the book it draws on.