Language Models from Scratch
- 73Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
73 questions
- 1The course number for the language models from scratch class is_____.
Hint
It's a computer science course number.
Answer
CS 336
- 2The 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
- 3The 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
- 4Compared to the previous year, the class size grew by_____percent.
Hint
Half increase.
Answer
50
- 5The course lectures are published online on_____.
Hint
A popular video platform.
Answer
YouTube
- 6The course is officially_____units but has a workload equivalent to several other courses combined.
Hint
It's a single-digit number.
Answer
5
- 7The 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
- 8According 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
- 9The assignments provide unit tests and adapter interfaces but no_____code.
Hint
The code that supports the implementation structure.
Answer
scaffolding
- 10The 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
- 11The cluster used in the course is provided by the company_____.
Hint
A company that provides compute infrastructure.
Answer
Together AI
- 12The 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
- 13The 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
- 14According 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
- 15The lecturer argues that abstractions in language models are leaky, unlike in programming languages or_____.
Hint
Another layer of abstraction in computing.
Answer
operating systems
- 16The core philosophy of the course is that to understand a technology, you have to_____it.
Hint
Construct from scratch.
Answer
build
- 17Frontier 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
- 18One 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
- 19The three types of knowledge the course aims to teach are mechanics, mindset, and_____.
Hint
Hunches or feelings about what works.
Answer
intuitions
- 20The 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
- 21The bitter lesson, as interpreted in the lecture, is that_____at scale is what matters.
Hint
Methods and techniques; not just raw compute.
Answer
algorithms
- 22Algorithmic 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
- 23The correct framing given a compute and data budget is to maximize_____per resources.
Hint
The measure of model performance.
Answer
accuracy
- 24Shannon used language models to estimate the entropy of_____.
Hint
The language of the text.
Answer
English
- 25In 2007, Google trained large n-gram models over_____trillion tokens.
Hint
A small number for the scale.
Answer
2
- 26The first neural language model was developed by Joshra Bengio's group in_____.
Hint
Early 2000s.
Answer
2003
- 27Seq2seq models were a big deal for sequence modeling, developed by Illia and_____folks.
Hint
The company.
Answer
Google
- 28The Adam optimizer, which is still widely used, was developed over a decade_____.
Hint
Past tense.
Answer
ago
- 29The attention mechanism was initially developed in the context of_____translation.
Hint
A task in NLP.
Answer
machine
- 30The transformer paper from 2017 is titled 'Attention is_____you need'.
Hint
Complete phrase.
Answer
all
- 31In the late 2010s, researchers were working on scaling_____of experts.
Hint
A type of architecture.
Answer
mixture
- 32Foundation 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
- 33The first major open model after GPT-3 was released by_____.
Hint
A community-driven AI research group.
Answer
EleutherAI
- 34A model that releases only its weights is called an_____-weight model.
Hint
Opposite of closed.
Answer
open
- 35A model that releases both weights and data is called_____source.
Hint
Fully transparent.
Answer
open
- 36Name one company mentioned as a current frontier lab:_____.
Hint
It's an AI research organization.
Answer
OpenAI
- 37A tokenizer converts between strings and sequences of_____.
Hint
Whole numbers.
Answer
integers
- 38Character-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
- 39Byte-based tokenization results in very long sequences and a compression ratio of_____byte per token.
Hint
One byte per token.
Answer
1
- 40Word-based tokenization suffers from an unbounded vocabulary and the need for a special_____token for unseen words.
Hint
Abbreviation for 'unknown'.
Answer
UNK
- 41BPE stands for_____pair encoding.
Hint
A unit of data.
Answer
byte
- 42In the GPT-2 tokenizer, the pre-tokenization step splits text using a_____expression.
Hint
A pattern-matching language.
Answer
regular
- 43In the GPT-2 tokenizer, a space character is conventionally placed_____the token.
Hint
Preceding.
Answer
before
- 44When tokenizing numbers with the GPT-2 tokenizer, the digits are grouped from_____to right.
Hint
Direction of reading.
Answer
left
- 45In the BPE algorithm, the initial vocabulary consists of all possible_____values.
Hint
0-255.
Answer
byte
- 46The first merge step in BPE creates a new token ID starting at_____.
Hint
After the last byte value.
Answer
256
- 47The encoding process in BPE replays the learned merges in the same_____they were learned.
Hint
Sequential arrangement.
Answer
order
- 48A 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
- 49In the assignment, students are to implement BPE from scratch and make it_____.
Hint
Opposite of slow.
Answer
fast
- 50The transformer architecture consists of attention layers and_____layers.
Hint
Multilayer perceptron.
Answer
MLP
- 51One common improvement to the original transformer is the use of_____positional embeddings.
Hint
Also known as RoPE.
Answer
rotary
- 52The_____activation function, also known as SwiGLU, is a popular choice in modern transformers.
Hint
It sounds like 'swish' or 'swiggle'.
Answer
swish
- 53RMS norm is a simpler alternative to_____norm used in the original transformer.
Hint
Layer normalization.
Answer
layer
- 54The optimizer commonly used for training transformers is Adam_____.
Hint
A variant with weight decay.
Answer
W
- 55In assignment 1, the leaderboard metric is_____on the openwebtext dataset.
Hint
A measure of how well a model predicts a sample.
Answer
perplexity
- 56Assignment 1 gives a training budget of_____minutes on an H100 GPU.
Hint
One and a half hours.
Answer
90
- 57In a GPU, the main bottleneck is data_____between memory and compute units.
Hint
Transfer of data.
Answer
movement
- 58Two techniques to minimize data movement in GPU kernels are fusion and_____.
Hint
Breaking data into blocks.
Answer
tiling
- 59In data parallelism, each GPU holds a copy of the model and processes different_____of data.
Hint
Pieces or batches.
Answer
shards
- 60In tensor parallelism, the model itself is_____across GPUs.
Hint
Divided.
Answer
split
- 61During inference, the_____phase processes the entire prompt and is compute-bound.
Hint
First phase.
Answer
prefill
- 62During inference, the_____phase generates tokens one by one and is memory-bound.
Hint
Second phase.
Answer
decode
- 63Speculative decoding uses a cheap model to generate multiple candidate tokens, and then the full model_____them.
Hint
Evaluates acceptability.
Answer
scores
- 64In assignment 2, students must implement at least one form of parallelism, such as_____parallelism.
Hint
Distributes data across GPUs.
Answer
data
- 65The chinchilla optimal rule states that the number of training tokens should be approximately_____times the model size.
Hint
A factor of twenty.
Answer
20
- 66Assignment 3 involves fitting a scaling law to data and predicting hyperparameters for a larger_____budget.
Hint
Floating point operations per second.
Answer
flops
- 67One common evaluation benchmark that tests knowledge across many subjects is_____.
Hint
Massive Multitask Language Understanding.
Answer
MMLU
- 68The raw data source used in assignment 4 is a dump from_____.
Hint
A common web crawl.
Answer
CommonCrawl
- 69In data curation, a classifier is often trained to_____data based on quality.
Hint
Selectively keep or remove.
Answer
filter
- 70Supervised fine-tuning (SFT) involves training on prompt-_____pairs.
Hint
The model's output.
Answer
response
- 71DPO is a simpler alternative to PPO that learns directly from_____data.
Hint
Which response is better.
Answer
preference
- 72GRPO simplifies PPO by removing the_____function.
Hint
A component of the reinforcement learning algorithm.
Answer
value
- 73GRPO was developed by the company_____.
Hint
A Chinese AI lab.
Answer
DeepSeek

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