IntermediateAbout 18 min

    Understanding Foundation Models

    Read the full article on Substack

    7 min read.

    See what a foundation model is pretrained on, derive the compute-optimal split between model size and training tokens, and step the pretrain → SFT → preference-tuning pipeline that turns a text completer into an assistant.

    Think of it this way: Pretraining is reading the entire library and learning to finish any sentence. Supervised finetuning is being taught that when someone asks a question you answer it. Preference tuning is learning which of two correct answers a person actually wanted. Same reader, three different kinds of schooling.

    Language mix of a web-scale crawl (illustrative)

    English45.88%
    Russian5.97%
    German5.88%
    Chinese4.87%
    Japanese4.79%
    French4.73%
    Spanish4.47%
    Everything else (~100+ languages)23.41%

    English is about 46% of the crawl. More than 100 other languages share about 23%. A model is weakest where its data was thinnest.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    How a chat model gets made

    Sequence

    Order the training stages.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    The pretraining objective for a foundation language model is:

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going