သဘောတရား
Training a foundation model
Pre-training, continued pre-training, fine-tuning and distillation: who does what, and what it costs.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
- 1Raw data is collected.
- 2Pre-training teaches the model language and general knowledge.
- 3The result is a foundation model.
- 4Fine-tuning adapts it to a task, giving a custom model.
အဆင့်ဆင့်
- 1Raw data is collected.
- 2Pre-training teaches the model language and general knowledge.
- 3The result is a foundation model.
- 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
| Stage | Data | Cost |
|---|---|---|
| Pre-training | Huge unlabeled data | Highest |
| Continued pre-training | Unlabeled domain data | High |
| Fine-tuning | Labeled examples | Medium |
| Distillation | Outputs from a teacher model | Medium, cheaper to run after |
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
| Stage | Data | Cost |
|---|---|---|
| Pre-training | Huge unlabeled data | Highest |
| Continued pre-training | Unlabeled domain data | High |
| Fine-tuning | Labeled examples | Medium |
2 / 2
Distillation
- Data
- Outputs from a teacher model
- Cost
- Medium, cheaper to run after
| Stage | Data | Cost |
|---|---|---|
| Distillation | Outputs from a teacher model | Medium, cheaper to run after |
ဘာလဲ
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.
ဒါတွေနဲ့ မရောပါနဲ့
- The foundation model lifecycleThe stages a foundation model goes through, from choosing data to learning from users, as a loop.
- Fine-tuning methodsWays to adapt a pre-trained model: instruction tuning, domain adaptation, transfer learning and continued pre-training.
- Customization cost tradeoffsFive ways to adapt a model, from cheapest to costliest, and when each one is the answer.