CertBrain
CoursesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

How Foundation Models Are Trained

A foundation model can be trained in four main ways: pre-training, fine-tuning, continued pre-training and distillation. Each one changes something different about the model and needs a different kind of data. For the exam, the skill is reading a scenario and naming the method that matches what…

9 cards
Study this deck

How Foundation Models Are Trained

A foundation model can be trained in four main ways: pre-training, fine-tuning, continued pre-training and distillation. Each one changes something different about the model and needs a different kind of data. For the exam, the skill is reading a scenario and naming the method that matches what the business wants to change.

Pre-training builds general ability

Pre-training creates a model from scratch. The model reads an enormous, broad collection of mostly unlabeled text, or images, and learns by repeatedly predicting what comes next. It changes every part of the model, because the model starts with no knowledge at all. The result is a general-purpose model with wide knowledge but no particular specialty. Few organizations do this themselves, because it takes huge datasets and a great deal of computing power.

Fine-tuning changes behavior on a task

Fine-tuning starts from a model that's already pre-trained and trains it further on a much smaller set of labeled examples. Each example pairs an input with the output you want, such as a support question and an ideal answer. The model's internal settings, called weights, are adjusted so its answers move toward the examples. Fine-tuning mainly changes how the model behaves: its format, tone, or skill at one kind of task. In Amazon Bedrock, this is supervised fine-tuning, and it produces a private custom copy of the model.

Continued pre-training adds domain knowledge

Continued pre-training also starts from a pre-trained model, but it keeps going with the pre-training method on new, unlabeled text from one field, such as medical research or a company's engineering manuals. Because no labels are needed, a business can use documents it already has. What changes is the model's knowledge and vocabulary, not its task skills. AWS's guidance for Amazon Nova notes that it works best with very large volumes of domain text, and that it should usually be followed by instruction tuning so the model can use what it learned.

Distillation makes a smaller model smarter

Distillation transfers skill from a large, capable model, the teacher, to a smaller, faster model, the student. In Amazon Bedrock Model Distillation, you supply example prompts for your use case. Bedrock has the teacher answer them, then fine-tunes the student on those answers. What changes is the student. It gets close to the teacher's quality on that one use case, while keeping its own speed and lower cost per request.

MethodStarts fromDataMainly changes
Pre-trainingNothingHuge, broad, unlabeledEverything
Fine-tuningPre-trained modelSmall, labeledTask behavior
Continued pre-trainingPre-trained modelLarge, unlabeled, one domainDomain knowledge
DistillationSmall student modelPrompts, answered by a teacherStudent's quality

On the exam

Match the clue to the method. "Labeled examples of the ideal answer" means fine-tuning. "Lots of unlabeled documents from our industry" means continued pre-training. "Same quality but faster and cheaper" means distillation. "Build our own model from nothing" means pre-training, which is almost never the right answer for a business with a budget. Cost comparisons between these methods, and against RAG, are covered in the Customization Cost Tradeoffs lesson.

Quiz me on this
A pharmaceutical company has millions of unlabeled internal research papers. It wants a foundation model to understand its chemistry terms and research areas before any task-specific training. Which training method fits best?
  1. ✓ Continued pre-training on the research papers
  2. Supervised fine-tuning on the unlabeled research papers
  3. Distillation from a larger teacher model
  4. Pre-training a brand-new model from scratch
Which statement best describes pre-training a foundation model?
  1. Adjusting a finished model with a few hundred labeled examples
  2. Teaching a small model to copy the answers of a larger one
  3. ✓ Training a new model on vast general data to learn broad patterns
  4. Adding company documents to a prompt at the moment of each request
A retailer's product-description assistant runs on a large model that writes well but is too slow and costly at peak traffic. The team wants similar quality from a smaller model for this one task. Which approach meets this goal?
  1. Continued pre-training of the large model on product catalogs
  2. Pre-training a new small model on public web text
  3. Raising the large model's temperature to shorten its answers
  4. ✓ Distillation, using the large model as the teacher
An insurer fine-tuned a model on 2,000 labeled claim summaries, and the summaries now follow its required format. Users then ask about a policy type that appears nowhere in the training data, and the answers are weak. What does this show about fine-tuning?
  1. It erased the model's general knowledge
  2. ✓ It mostly shapes task behavior, not broad new knowledge
  3. It works only when the model is pre-trained again afterward
  4. It needs unlabeled data, so the labeled set was the wrong choice
Pre-training
Building a model from scratch on a huge, broad, mostly unlabeled dataset so it learns general patterns.
Supervised fine-tuning
Further training a pre-trained model on labeled input-output examples to improve one task's behavior.
Continued pre-training
Extending pre-training on large amounts of unlabeled text from one domain to add knowledge and vocabulary.
Model distillation
A large teacher model answers prompts, and a smaller student is fine-tuned on those answers to get near-teacher quality.
Model weights
A model's internal learned settings. Training methods like fine-tuning work by adjusting them.