Foundation Model

Also called Base model, General-purpose AI model

Quick answer

A foundation model is a large AI model trained once on broad data, without human-written labels, so that many different tasks can be built on top of it. Teams adapt it with instructions, a few examples or extra training instead of starting over. BERT, GPT-3 and CLIP are examples. It matters because few teams can afford to train their own.

~20 sec read

011 min

The problem foundation models solve

Picture a product team that wants to sort incoming support tickets into twelve topics. Until about 2018, the usual plan was to build a model for exactly that job. The team would need people to read thousands of tickets and mark the right topic on each. Labelling like this took weeks. The finished model could sort these tickets and do nothing else. When a second team wanted to summarise the same tickets, it started again from zero, with new labels and a new model.

Two things were wasted. One was the human time spent on labels. The other was everything the model had to learn along the way, such as grammar, common facts and how sentences connect. Every team's model learned that general knowledge again, from a small set of examples.

The fix was to teach the general knowledge once, on far more data than any one team could label, and let every team start from that model. A model built this way is a foundation model.

ticketstopics
Each ticket needs a person to read it and give it a topic. Every new task repeats that work.

021 min

Where the name foundation model came from

By 2021 many teams already worked this way, but the field had no single word for it. In 2021, Rishi Bommasani and colleagues named these models foundation models, meaning models trained on broad data and adapted to many downstream tasks. Their report came from Stanford, where the authors also started the Center for Research on Foundation Models.

The authors explained why they rejected older names. The group dropped "language model" as the name because the models are not only about language, and they also train on images, video and other sensor data.

Why foundation does not mean finished

The word can mislead. A reader may take "foundation" to mean a solid, complete base. The authors meant something narrower. In their wording the models are central, because many systems depend on them, and incomplete, because nobody can use one for a real job before someone adapts it. In the ticket story, the pretrained model cannot sort tickets until the team gives it the task.

032 min

How a foundation model works

A foundation model is made in two stages, and the ticket team only does the second one.

The first stage is pretraining. The model reads a very large and varied collection of data, such as web pages, books, code, or images paired with text. No one writes labels for it. The data supplies its own answers, which is called self-supervised learning. For a language model the task is to hide part of a text and predict it, or to predict the next word. To do this well across billions of examples, the model has to pick up grammar, facts and patterns of reasoning. Most foundation models are built on the Transformer design. The result is a very large set of numbers, called weights or parameters, that holds what the model learned.

The second stage is adaptation, which makes the pretrained model do one specific job. This is a case of transfer learning: knowledge gained on one task is reused on another. This is the step where the savings happen, because the team no longer teaches language from nothing. There are three common ways to adapt a model, and the ticket team can choose any of them.

Fine-tuning with BERT's single added layer

The first way is fine-tuning, which means training the pretrained model a little more on a small set of labelled examples. Jacob Devlin and colleagues reported in 2018 that BERT, after pretraining on unlabelled text, could be fine-tuned for a task by adding just one output layer. For the ticket team, that layer would produce one score for each of the twelve topics. They would train on far fewer labelled tickets than before.

Prompting with a few examples, as in GPT-3

The second way needs no further training. The team writes the task in the prompt, which is the text given to the model, and adds a few solved examples. In 2020 Tom Brown and colleagues trained GPT-3, a model with 175 billion parameters, and gave it tasks through text alone, with a few worked examples in the prompt and no further training. The ticket team could paste the twelve topic names and three example tickets into a prompt and ask for a topic for each new ticket.

Zero-shot use with CLIP

The third way gives the model no examples at all, only a description in words. Alec Radford and colleagues trained CLIP in 2021 on pairs of images and the text that went with them. After that, CLIP could name what a picture shows by comparing it with category names written in plain language. Radford and colleagues reported that CLIP matched a standard supervised ResNet-50 classifier on ImageNet, though it never saw the 1.28 million ImageNet training images that ResNet-50 learned from.

042 min

Why scale matters for foundation models

The three ways of adapting a model only work well if the pretrained model is large and has seen a lot. A fair question is how much is enough, and whether bigger always wins.

In 2020 Jared Kaplan and colleagues found that a language model's error falls along a smooth power-law curve as model size, data and compute grow, across more than seven orders of magnitude. A power law means that each tenfold increase in resources lowers the error by a similar factor. This made progress predictable for the overall error: a lab could estimate what a larger model would reach before paying to train it.

Compute-optimal training with Chinchilla

Size alone is not the answer. In 2022 Jordan Hoffmann and colleagues found that, for a fixed compute budget, model size and training text should grow together, so each doubling of the model calls for a doubling of the data. Their finding implied that earlier large models had seen too little data.

Chinchilla against Gopher

To test the idea they trained Chinchilla, with 70 billion parameters and four times more data than Gopher, a 280-billion-parameter model that used the same compute. Chinchilla did better on a wide range of tests.

A smaller model is cheaper to adapt

The same paper points out a practical gain. A compute-optimal model that is smaller needs less compute for fine-tuning and for answering requests. For the ticket team, which pays for every request, that is a direct saving.

Stopping before training is finished

Kaplan's team added a result that surprises many people. For a fixed budget, the best use of compute was to train a very large model on a modest amount of data and to stop well before the model had finished improving on that data. Chinchilla later moved the balance toward more data. The lesson is that the right mix of size and data was measured, and it changed as people measured more carefully.

051 min

Emergent abilities in foundation models

Scale brings a second effect that is harder to plan around. Some skills seem to be missing from small models and then show up in larger ones.

Jason Wei and colleagues called an ability emergent in 2022 when small models lack it and larger models have it, which means it cannot be forecast by extending the trend from smaller models. For the ticket team this matters when the task is new. Whether a model of a given size can follow an instruction such as name the topic and explain it may not be knowable from a smaller model of the same family.

Emergence and the choice of scoring metric

Not everyone agrees the jumps are real. Rylan Schaeffer and colleagues argued in 2023 that many apparent jumps come from the scoring metric chosen, since all-or-nothing metrics produce sudden jumps and smooth metrics produce gradual change. A task scored as right only when every part of the answer is exact will show zero until the model gets everything right at once, even though it was improving the whole time.

Where does that leave a practitioner? Test your own task on several model sizes, and use a score that gives partial credit. Treat a headline claim that a skill emerged as a question about how it was measured.

061 min

Homogenization: one model under many products

When many teams adapt the same few models, a different risk appears. The Stanford authors call it homogenization.

Say the ticket sorter, a search box and a writing helper in the same company all adapt one foundation model. That helps in one way: when the model improves, all three products improve with it. It hurts in another way. Because the same few models sit under many products, a defect in one model passes to every product adapted from it. If that model has a defect, all three products inherit it.

The Stanford group described this concentration as both a benefit and a single point of failure. A fix made once reaches everyone, and so does a flaw. The practical response is to test each product on its own data rather than trust the shared model, and to keep a record of which model version each product uses.

modeldefectproductproductproduct
The defect sits in one place, the model. Follow the arrows to see it reach every product built on it.

071 min

Foundation model vs. nearby concepts

Several terms are used as if they meant the same thing. They overlap, but they answer different questions.

TermWhat it describesHow it relates to a foundation model
Large language modelA model trained on textOne kind of foundation model. Image and multimodal models are other kinds
Generative AISystems that produce new text, images or audioOverlaps. Many foundation models generate, but BERT mostly produces representations and labels
Transfer learningReusing what one task taught for another taskThe technique. A foundation model is its large-scale form
Pretrained modelAny model trained before a final stepEvery foundation model is pretrained. A small model pretrained for one job is not broad
Frontier modelA model at the top of current capabilityUsually a foundation model too, picked out by capability and risk

The deciding fact is breadth of reuse. A model counts as a foundation model when it was built to serve many later tasks, not one.

081 min

How laws define a foundation model

Because these models sit under so many products, lawmakers have tried to define them. The European Union's AI Act uses the phrase general-purpose AI model, not foundation model.

The Act defines a general-purpose AI model by its generality: it can competently do a wide range of distinct tasks and be built into many downstream systems, whatever way it reaches the market, and it leaves out models used only for research or prototyping before release.

The research and prototyping exemption

The last part of that definition is easy to miss. A model that a lab uses only for research, development or prototyping is outside the definition until it is placed on the market. A model is therefore covered at the point it becomes available to others, and not while it is being built.

Transparency across developers

Law is one response. Another is measurement. In 2023, Rishi Bommasani and colleagues scored ten major developers against 100 transparency indicators, covering data, labour, compute, the model and its use. They found that no developer gave meaningful detail on what its main model does once deployed, such as how many people use it. For a team choosing a model, that gap matters: the vendor may not be able to tell you how the model behaves in products like yours.

091 min

What this means for your work

Back to the ticket team. A foundation model changes which decisions each person makes.

  • Product manager. The question stops being "do we have enough labelled tickets to build this?" and becomes "which way of adapting the model gives good enough quality at a price we can pay?" Start with a prompt, because it needs no training. Move to fine-tuning only if the prompt falls short.
  • Engineer. The model is a dependency that someone else trained and may change. Build an evaluation set from real tickets before you pick a model, and rerun it whenever the model version changes.
  • Designer. The model will sometimes be wrong, and the product shows that. Design the screen so a person can see the suggested topic and change it in one step.
  • Founder. Training your own foundation model is out of reach for most companies, and your competitors can adapt the same ones. Any edge has to come from your data, your adaptation work and your product.

101 min

What foundation models do not solve

Adapting a foundation model is cheaper than training one, but it does not remove the need to check the result.

The GPT-3 authors themselves reported some datasets where its few-shot learning still struggled. Building the model was also a large effort: GPT-3 had 175 billion parameters, ten times more than any earlier non-sparse language model. Most teams will rent or download a model, and then they depend on a vendor's choices about data, updates and price.

A foundation model is the wrong tool when the task is narrow and well labelled. Suppose the ticket team only needs to route messages by a few fixed keywords. A small model or plain rules will run faster, cost less and be easier to explain than a large general model.

Defects also travel. As the homogenization section showed, a flaw in the shared model reaches every product built on it, so the team still needs its own tests.

?3 questions

Questions people ask

Is ChatGPT a foundation model?

ChatGPT is a product. The GPT model underneath it is the foundation model. Products add instructions, extra training and a chat interface on top of the model, so the two names refer to different layers.

Do I need a foundation model to add AI to my product?

No. For a narrow task with plenty of labelled data, a small model trained on your own data can be cheaper and faster. A foundation model pays off when tasks vary or labels are scarce.

Can I run a foundation model on my own servers?

Sometimes. Some developers release the weights, so you can host the model yourself. Others offer access only through a paid interface, and then your data and costs depend on that vendor.

§11 sources

Sources

Show all 11 sources
  1. Bommasani, R. et al. (2021). On the Opportunities and Risks of Foundation Models. arXiv:2108.07258

  2. Stanford CRFM and HAI (2021). Reflections on Foundation Models

  3. Devlin, J. et al. (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv:1810.04805

  4. Brown, T. B. et al. (2020). Language Models are Few-Shot Learners. arXiv:2005.14165

  5. Radford, A. et al. (2021). Learning Transferable Visual Models From Natural Language Supervision (CLIP). arXiv:2103.00020

  6. Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361

  7. Hoffmann, J. et al. (2022). Training Compute-Optimal Large Language Models. arXiv:2203.15556

  8. Wei, J. et al. (2022). Emergent Abilities of Large Language Models. arXiv:2206.07682

  9. Schaeffer, R., Miranda, B. and Koyejo, S. (2023). Are Emergent Abilities of Large Language Models a Mirage? arXiv:2304.15004

  10. European Union. Artificial Intelligence Act, Article 3: Definitions

  11. Bommasani, R. et al. (2023). The Foundation Model Transparency Index. arXiv:2310.12941

Keep reading

More from AI & Engineering

All of AI & Engineering
All of AI & Engineering

Missing a concept?

Tell us what to write next. We’ll email you when it’s live.

Several? Separate them with commas.

Only to tell you when it’s live.

How we use your email: privacy.