10-405/605/805�ML FROM LARGE DATASETS
Outline
10-605 ± 200�ADMINISTRIVIA
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
Who/Where/When
What/How
What/How: cheating vs working together
What/How: using GenAI
What/How: SlotA/SlotB and GenAI
What/How: SlotA/SlotB and GenAI
Why can’t you use GenAI more?
Humans learn much more by doing than by watching
Outline
BIG DATA HISTORY
Big ML c. 1993 (Cohen, “Efficient…Rule Learning”, IJCAI 1993)
talk_announcement :- WORDS ~ talk, WORDS ~ Subject_talk (54/1).
talk_announcement :- WORDS ~ '2d416' (26/3).
talk_announcement :- WORDS ~ system, WORDS ~ 'To_1126@research' (4/0).
talk_announcement :- WORDS ~ mh, WORDS ~ time (5/1).
talk_announcement :- WORDS ~ talk, WORDS ~ used (3/0).
talk_announcement :- WORDS ~ presentations (2/1).
default non_talk_announcement (390/1).
" :-" means "if", "~" means "contains"
How do we use very large amounts of data?
*
* according to William
Big ML c. 1993 (Cohen, “Efficient…Rule Learning”, IJCAI 1993)
Why is the method slow for noisy data?
Algorithm
Asymptotic Analysis
L1
quadratic
talk_announcement :- WORDS ~ talk, WORDS ~ Subject_talk, WORDS ~ p_comma (52/0).
talk_announcement :- WORDS ~ '2d416', WORDS ~ be (19/0). (54/1)
talk_announcement :- WORDS ~ show, WORDS ~ talk (7/0).
talk_announcement :- WORDS ~ mh, WORDS ~ time, WORDS ~ research (4/0).
talk_announcement :- WORDS ~ system, WORDS ~ 'To_1126@research' (3/0).
talk_announcement :- WORDS ~ '2d416', WORDS ~ memory (3/0).
talk_announcement :- WORDS ~ interfaces, WORDS ~ From_p_exclaim_point (2/0).
talk_announcement :- WORDS ~ presentations, WORDS ~ From_att (2/0).
default non_talk_announcement .
So in early-mid 1990’s…..
Big ML c. 2001 (Banko & Brill, “Scaling to Very Very Large Corpora …)
Task: distinguish pairs of easily-confused words (“affect” vs “effect”) in context
Why does more data help?
Why More Data Helps: A Demo
FineWeb is 15 trillion tokens, ~180x bigger
Why More Data Helps
Observations [from playing with data]:
So in 2001…..
…and in 2009
Eugene Wigner’s article “The Unreasonable Effectiveness of Mathematics in the Natural Sciences” examines why so much of physics can be neatly explained with simple mathematical formulas such as f = ma or e = mc2. Meanwhile, sciences that involve human beings rather than elementary particles have proven more resistant to elegant mathematics. Economists suffer from physics envy over their inability to neatly model human behavior. An informal, incomplete grammar of the English language runs over 1,700 pages.
Perhaps when it comes to natural language processing and related fields, we’re doomed to complex theories that will never have the elegance of physics equations. But if that’s so, we should stop acting as if our goal is to author extremely elegant theories, and instead embrace complexity and make use of the best ally we have: the unreasonable effectiveness of data.
Norvig, Pereira, Halevy, “The Unreasonable Effectiveness of Data”, 2009
Bengio, Foundations & Trends, 2009
1M vs 10M
labeled examples
2.5M examples for “pretraining”
SCALING LAWS FOR LLMS
History of LLMs
Models got bigger and bigger
Chinchilla Scaling Laws
2022
Chinchilla Scaling Laws
Main idea: better model joint distribution of model size (# parameters), model performance (test set loss / perplexity), and training cost (floating point operations, aka FLOPS)
Chinchilla Scaling Laws
63B
1.4T
Constraint = Budget = $$
Idea: fit a simple model to the data that relates compute, parameters, and loss, and use that to optimize loss given a total compute budget.
Chinchilla Scaling Laws
MMLU
Compute Scaling Laws = Data Scaling Laws
Nowadays mostly distinct tokens
Llama 1 (2023) training mixture
Compute Scaling Laws = Data Scaling Laws
Llama 1 (2023) training mixture
7B params: 200B 🡪 1T toks
1B toks: 7B🡪33B params
IS BIG DATA ALL YOU NEED?
The Joint Density
The Joint Can Be Used To Implement A Classifier
46
The joint density:
A classifier for C based on the joint density estimator:
and predict
An experiment: how useful is that classifier?
5% error
Of 723 examples:
Naïve Bayes
An experiment: how useful is that classifier? (Is big data all you need?)
Pattern | Used | Errors |
P(C|A,B,D,E) | 101 | 1 |
P(C|A,B,D) | 157 | 6 |
P(C|B,D) | 163 | 13 |
P(C|B) | 244 | 78 |
P(C) | 58 | 31 |
17.8% error
What’s more naïve than a big table of counts?
49
The (brute force) joint density estimator:
The naïve estimator assumes independence:
A “naïve” but useful estimate of joint probability
50
If you want to use this to predict C you can’t assume everything is independent of C….so….
and predict
Naïve Bayes refinement - 1
51
In n-grams we look at Pr(b)=Pr(second word is “b”), etc.
For long documents you usually don’t keep track of where a word appears, so:
“Multinomial naïve Bayes”
Naïve Bayes refinement - 2
52
For numeric stability it’s best to compute with logs:
Naïve Bayes refinement - 3
53
You also usually smooth the estimates:
where V is the number of words.
(But for Pr(y), use the number of classes instead of V).
This is usually a terrible density estimator but often is a pretty good classifier!
Classification vs Density Estimation
Classification
Density Estimation
Is Big Data All You Need?
* joint
Outline
SCALING LAWS FOR LLMS
History of LLMs
Models got bigger and bigger
Chinchilla Scaling Laws
2022
Chinchilla Scaling Laws
Main idea: better model joint distribution of model size (# parameters), model performance (test set loss / perplexity), and training cost (floating point operations, aka FLOPS)
Chinchilla Scaling Laws
63B
1.4T
Constraint = Budget = $$
Idea: fit a simple model to the data that relates compute, parameters, and loss, and use that to optimize loss given a total compute budget.
Chinchilla Scaling Laws
MMLU
Compute Scaling Laws = Data Scaling Laws
Nowadays mostly distinct tokens
Llama 1 (2023) training mixture
Compute Scaling Laws = Data Scaling Laws
Llama 1 (2023) training mixture
7B params: 200B 🡪 1T toks
1B toks: 7B🡪33B params
Outline