1. Home
  2. Explore
  3. Computer Science
  4. Language Models from Scratch

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Language Models from Scratch

  • 73Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Course Overview and Logistics
The course number for the language models from scratch class is
.

73 questions

  1. 1
    The course number for the language models from scratch class is
    _____
    .
    Hint

    It's a computer science course number.

    Answer

    CS 336

  2. 2
    The instructors for CS 336 are Percy Liang and
    _____
    .
    Hint

    He is a co-instructor and mentioned co-lecturing after a few weeks.

    Answer

    Tatsu Hashimoto

  3. 3
    The TA who failed the class the previous year but is now a course assistant is
    _____
    .
    Hint

    He introduced himself with a story of failure.

    Answer

    Roit

  4. 4
    Compared to the previous year, the class size grew by
    _____
    percent.
    Hint

    Half increase.

    Answer

    50

  5. 5
    The course lectures are published online on
    _____
    .
    Hint

    A popular video platform.

    Answer

    YouTube

  6. 6
    The course is officially
    _____
    units but has a workload equivalent to several other courses combined.
    Hint

    It's a single-digit number.

    Answer

    5

  7. 7
    The target audience for this class is people with an obsessive need to understand how things work all the way down to the
    _____
    .
    Hint

    The smallest units of matter metaphorically.

    Answer

    atoms

  8. 8
    According to the lecturer, if you can solve your problem with prompting or fine-tuning, you should start there rather than training a language model from
    _____
    .
    Hint

    From the beginning without any pre-existing model.

    Answer

    scratch

  9. 9
    The assignments provide unit tests and adapter interfaces but no
    _____
    code.
    Hint

    The code that supports the implementation structure.

    Answer

    scaffolding

  10. 10
    The recommended strategy is to prototype with small data on your laptop and then use the cluster for large runs that benchmark both accuracy and
    _____
    .
    Hint

    Measure of how fast the model runs.

    Answer

    speed

  11. 11
    The cluster used in the course is provided by the company
    _____
    .
    Hint

    A company that provides compute infrastructure.

    Answer

    Together AI

  12. 12
    The assignments that are considered the heaviest are numbers
    _____
    and two.
    Hint

    The first assignment was described as having work equivalent to five assignments from another class.

    Answer

    one

  13. 13
    The course was motivated by a crisis where researchers are becoming more disconnected from the underlying
    _____
    .
    Hint

    The tools and methods used to build models.

    Answer

    technology

  14. 14
    According to the lecture, eight years ago researchers would implement and train their own models; six years ago they would download and fine-tune models like
    _____
    .
    Hint

    A famous language model from Google.

    Answer

    BERT

  15. 15
    The lecturer argues that abstractions in language models are leaky, unlike in programming languages or
    _____
    .
    Hint

    Another layer of abstraction in computing.

    Answer

    operating systems

  16. 16
    The core philosophy of the course is that to understand a technology, you have to
    _____
    it.
    Hint

    Construct from scratch.

    Answer

    build

  17. 17
    Frontier models like GPT-4 are out of reach because they have 1.8 trillion parameters and cost $100 million to
    _____
    .
    Hint

    The process of learning from data.

    Answer

    train

  18. 18
    One example showing small models may not represent large models is the fraction of flops spent in attention layers versus
    _____
    layers, which changes with scale.
    Hint

    Multilayer perceptron.

    Answer

    MLP

  19. 19
    The three types of knowledge the course aims to teach are mechanics, mindset, and
    _____
    .
    Hint

    Hunches or feelings about what works.

    Answer

    intuitions

  20. 20
    The mindset promoted in the course is to squeeze the most out of the hardware and take
    _____
    seriously.
    Hint

    Increasing model size and data.

    Answer

    scaling

  21. 21
    The bitter lesson, as interpreted in the lecture, is that
    _____
    at scale is what matters.
    Hint

    Methods and techniques; not just raw compute.

    Answer

    algorithms

  22. 22
    Algorithmic efficiency improvements on ImageNet from 2012 to 2019 resulted in a
    _____
    times reduction in training time to reach the same accuracy.
    Hint

    A large number, faster than Moore's law.

    Answer

    44

  23. 23
    The correct framing given a compute and data budget is to maximize
    _____
    per resources.
    Hint

    The measure of model performance.

    Answer

    accuracy

  24. 24
    Shannon used language models to estimate the entropy of
    _____
    .
    Hint

    The language of the text.

    Answer

    English

  25. 25
    In 2007, Google trained large n-gram models over
    _____
    trillion tokens.
    Hint

    A small number for the scale.

    Answer

    2

  26. 26
    The first neural language model was developed by Joshra Bengio's group in
    _____
    .
    Hint

    Early 2000s.

    Answer

    2003

  27. 27
    Seq2seq models were a big deal for sequence modeling, developed by Illia and
    _____
    folks.
    Hint

    The company.

    Answer

    Google

  28. 28
    The Adam optimizer, which is still widely used, was developed over a decade
    _____
    .
    Hint

    Past tense.

    Answer

    ago

  29. 29
    The attention mechanism was initially developed in the context of
    _____
    translation.
    Hint

    A task in NLP.

    Answer

    machine

  30. 30
    The transformer paper from 2017 is titled 'Attention is
    _____
    you need'.
    Hint

    Complete phrase.

    Answer

    all

  31. 31
    In the late 2010s, researchers were working on scaling
    _____
    of experts.
    Hint

    A type of architecture.

    Answer

    mixture

  32. 32
    Foundation models like ELMo, BERT, and T5 could be trained on a lot of text and adapted to a wide range of
    _____
    tasks.
    Hint

    Tasks after pretraining.

    Answer

    downstream

  33. 33
    The first major open model after GPT-3 was released by
    _____
    .
    Hint

    A community-driven AI research group.

    Answer

    EleutherAI

  34. 34
    A model that releases only its weights is called an
    _____
    -weight model.
    Hint

    Opposite of closed.

    Answer

    open

  35. 35
    A model that releases both weights and data is called
    _____
    source.
    Hint

    Fully transparent.

    Answer

    open

  36. 36
    Name one company mentioned as a current frontier lab:
    _____
    .
    Hint

    It's an AI research organization.

    Answer

    OpenAI

  37. 37
    A tokenizer converts between strings and sequences of
    _____
    .
    Hint

    Whole numbers.

    Answer

    integers

  38. 38
    Character-based tokenization has a compression ratio of
    _____
    bytes per token.
    Hint

    It's not exactly 1 but close, around 1.5 bytes per token.

    Answer

    1.5

  39. 39
    Byte-based tokenization results in very long sequences and a compression ratio of
    _____
    byte per token.
    Hint

    One byte per token.

    Answer

    1

  40. 40
    Word-based tokenization suffers from an unbounded vocabulary and the need for a special
    _____
    token for unseen words.
    Hint

    Abbreviation for 'unknown'.

    Answer

    UNK

  41. 41
    BPE stands for
    _____
    pair encoding.
    Hint

    A unit of data.

    Answer

    byte

  42. 42
    In the GPT-2 tokenizer, the pre-tokenization step splits text using a
    _____
    expression.
    Hint

    A pattern-matching language.

    Answer

    regular

  43. 43
    In the GPT-2 tokenizer, a space character is conventionally placed
    _____
    the token.
    Hint

    Preceding.

    Answer

    before

  44. 44
    When tokenizing numbers with the GPT-2 tokenizer, the digits are grouped from
    _____
    to right.
    Hint

    Direction of reading.

    Answer

    left

  45. 45
    In the BPE algorithm, the initial vocabulary consists of all possible
    _____
    values.
    Hint

    0-255.

    Answer

    byte

  46. 46
    The first merge step in BPE creates a new token ID starting at
    _____
    .
    Hint

    After the last byte value.

    Answer

    256

  47. 47
    The encoding process in BPE replays the learned merges in the same
    _____
    they were learned.
    Hint

    Sequential arrangement.

    Answer

    order

  48. 48
    A major inefficiency of the basic BPE algorithm is that encoding loops over all
    _____
    that were learned, even those that do not appear.
    Hint

    The step of combining two tokens into one.

    Answer

    merges

  49. 49
    In the assignment, students are to implement BPE from scratch and make it
    _____
    .
    Hint

    Opposite of slow.

    Answer

    fast

  50. 50
    The transformer architecture consists of attention layers and
    _____
    layers.
    Hint

    Multilayer perceptron.

    Answer

    MLP

  51. 51
    One common improvement to the original transformer is the use of
    _____
    positional embeddings.
    Hint

    Also known as RoPE.

    Answer

    rotary

  52. 52
    The
    _____
    activation function, also known as SwiGLU, is a popular choice in modern transformers.
    Hint

    It sounds like 'swish' or 'swiggle'.

    Answer

    swish

  53. 53
    RMS norm is a simpler alternative to
    _____
    norm used in the original transformer.
    Hint

    Layer normalization.

    Answer

    layer

  54. 54
    The optimizer commonly used for training transformers is Adam
    _____
    .
    Hint

    A variant with weight decay.

    Answer

    W

  55. 55
    In assignment 1, the leaderboard metric is
    _____
    on the openwebtext dataset.
    Hint

    A measure of how well a model predicts a sample.

    Answer

    perplexity

  56. 56
    Assignment 1 gives a training budget of
    _____
    minutes on an H100 GPU.
    Hint

    One and a half hours.

    Answer

    90

  57. 57
    In a GPU, the main bottleneck is data
    _____
    between memory and compute units.
    Hint

    Transfer of data.

    Answer

    movement

  58. 58
    Two techniques to minimize data movement in GPU kernels are fusion and
    _____
    .
    Hint

    Breaking data into blocks.

    Answer

    tiling

  59. 59
    In data parallelism, each GPU holds a copy of the model and processes different
    _____
    of data.
    Hint

    Pieces or batches.

    Answer

    shards

  60. 60
    In tensor parallelism, the model itself is
    _____
    across GPUs.
    Hint

    Divided.

    Answer

    split

  61. 61
    During inference, the
    _____
    phase processes the entire prompt and is compute-bound.
    Hint

    First phase.

    Answer

    prefill

  62. 62
    During inference, the
    _____
    phase generates tokens one by one and is memory-bound.
    Hint

    Second phase.

    Answer

    decode

  63. 63
    Speculative decoding uses a cheap model to generate multiple candidate tokens, and then the full model
    _____
    them.
    Hint

    Evaluates acceptability.

    Answer

    scores

  64. 64
    In assignment 2, students must implement at least one form of parallelism, such as
    _____
    parallelism.
    Hint

    Distributes data across GPUs.

    Answer

    data

  65. 65
    The chinchilla optimal rule states that the number of training tokens should be approximately
    _____
    times the model size.
    Hint

    A factor of twenty.

    Answer

    20

  66. 66
    Assignment 3 involves fitting a scaling law to data and predicting hyperparameters for a larger
    _____
    budget.
    Hint

    Floating point operations per second.

    Answer

    flops

  67. 67
    One common evaluation benchmark that tests knowledge across many subjects is
    _____
    .
    Hint

    Massive Multitask Language Understanding.

    Answer

    MMLU

  68. 68
    The raw data source used in assignment 4 is a dump from
    _____
    .
    Hint

    A common web crawl.

    Answer

    CommonCrawl

  69. 69
    In data curation, a classifier is often trained to
    _____
    data based on quality.
    Hint

    Selectively keep or remove.

    Answer

    filter

  70. 70
    Supervised fine-tuning (SFT) involves training on prompt-
    _____
    pairs.
    Hint

    The model's output.

    Answer

    response

  71. 71
    DPO is a simpler alternative to PPO that learns directly from
    _____
    data.
    Hint

    Which response is better.

    Answer

    preference

  72. 72
    GRPO simplifies PPO by removing the
    _____
    function.
    Hint

    A component of the reinforcement learning algorithm.

    Answer

    value

  73. 73
    GRPO was developed by the company
    _____
    .
    Hint

    A Chinese AI lab.

    Answer

    DeepSeek

1 of 73
Question 1 of 73

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent