ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念

Training a foundation model

Pre-training, continued pre-training, fine-tuning and distillation: who does what, and what it costs.

本课尚未翻译,暂以英文显示。

Huge raw data
Pre-training
Foundation models
Fine-tuning
Custom model
  1. 1Raw data is collected.
  2. 2Pre-training teaches the model language and general knowledge.
  3. 3The result is a foundation model.
  4. 4Fine-tuning adapts it to a task, giving a custom model.
A model is pre-trained once, then adapted.

分步说明

  1. 1Raw data is collected.
  2. 2Pre-training teaches the model language and general knowledge.
  3. 3The result is a foundation model.
  4. 4Fine-tuning adapts it to a task, giving a custom model.

A model is pre-trained once, then adapted.

  • Pre-training

    Data
    Huge unlabeled data
    Cost
    Highest
  • Continued pre-training

    Data
    Unlabeled domain data
    Cost
    High
  • Fine-tuning

    Data
    Labeled examples
    Cost
    Medium
  • Distillation

    Data
    Outputs from a teacher model
    Cost
    Medium, cheaper to run after
The four training stages compared.

1 / 2

  • Pre-training

    Data
    Huge unlabeled data
    Cost
    Highest
  • Continued pre-training

    Data
    Unlabeled domain data
    Cost
    High
  • Fine-tuning

    Data
    Labeled examples
    Cost
    Medium

2 / 2

  • Distillation

    Data
    Outputs from a teacher model
    Cost
    Medium, cheaper to run after
The four training stages compared.

是什么

A foundation model is built in stages. Pre-training comes first. The model reads huge amounts of raw data, such as text from books and websites, and learns language and general knowledge. It needs very large compute and takes a long time, so only a few providers do it.

Most companies start from a pre-trained model and adapt it. Continued pre-training feeds it more unlabeled data from your field, so it learns your domain. Fine-tuning trains it on labeled examples, so it learns a task or style. Distillation trains a smaller student model to copy a larger teacher, to make a cheaper, faster model.

是什么

Each step uses less data and compute than the one before, except distillation, whose gain is lower cost at inference.

要记住

  • Pre-training: learn from huge raw data sets. Highest cost.
  • Continued pre-training: more unlabeled data to learn a domain.
  • Fine-tuning: labeled examples to learn a task or style.
  • Distillation: a small student learns from a large teacher.
  • Most teams adapt an existing model and do not pre-train.

考试中

  • “Train a model from scratch on very large data” describes pre-training.
  • “Adapt a pre-trained model with a smaller labeled data set” describes fine-tuning.