Tokens and Vocabulary in Language Models
The GPT-3 dataset totals 499 billion tokens, but the model was trained on 300 billion tokens, and the source gives no reason for the difference.
Why One Dataset Size Is Not Enough
When people say a model was trained on a dataset, they usually mean a single number. For GPT-3, that number is not as simple as it first looks. The dataset the training data was drawn from is reported at one size, and the amount the model actually consumed during training is reported at a smaller size. Understanding the gap between those two numbers is the first step toward reading any large-model dataset description accurately.
In this article you will follow the GPT-3 figures from the full pool to the training run, place them beside the much larger CommonCrawl corpus, and then look at the additional data sources that later models added. Throughout, keep one question in mind: is a given figure a count of tokens, a size in gigabytes, or a share of a sample?
Tracing the GPT-3 Token Pool
The GPT-3 training data is described in a table that lists its component subsets together with a count of tokens for each one. If you add up the token counts in that column, the total is 499 billion tokens. This is the size of the dataset as a whole. It is the pool that the training data was drawn from.
The model itself was trained on 300 billion tokens, which is less than the full 499 billion. The source does not give a reason for this. The authors of the GPT-3 paper did not explain why training stopped short of the full pool, so the accurate statement is that the size of the dataset and the size of the training run are two different figures. Neither number is wrong; they answer different questions.
Following the GPT-3 figures in order
Track the GPT-3 numbers from the full pool to the amount used in training, the way you would track money moving from a total balance into a spending account.
- 1Start with the pool
Adding up the token column of the GPT-3 data table gives 499 billion tokens. This is the size of the whole dataset.
- 2Identify the training count
The model was trained on 300 billion tokens. This is the amount consumed during the training run.
- 3Compare the two
300 billion is less than 499 billion, so training used fewer tokens than the pool contains. The source gives no reason for the difference.
- 4Keep the labels straight
Report the dataset as 499 billion tokens and the training run as 300 billion tokens. Quoting only one of them misrepresents the other.
The GPT-3 dataset is 499 billion tokens, and the model was trained on 300 billion of them. The two figures describe different things.
Reading the Proportions and Token Columns
The GPT-3 data table has two numeric columns, and they measure different things. The token column gives the size of each subset, so it tells you how big each part of the pool is. The proportions column gives each subset's share of the sampled data. Those shares add up to 100 percent of the sample, with small adjustments made for rounding errors.
In short, the proportions tell you how the sample is split across subsets, while the token column tells you how big the pool is. When you read a dataset description, check which column a number came from before you interpret it.
Setting CommonCrawl Beside GPT-3
To judge whether 499 billion tokens is a large amount, it helps to compare it with another dataset. The source uses the CommonCrawl dataset for this purpose. CommonCrawl alone consists of 410 billion tokens and requires about 570 GB of storage.
The two measures in that sentence answer different questions. Tokens measure how much text there is in units the model reads, while gigabytes measure how much disk space the data occupies. Because the source gives CommonCrawl in both units, you can compare it with the GPT-3 figures on tokens. The source does not give a storage size for the GPT-3 dataset, so no storage comparison with GPT-3 can be made from the source.
On the token measure, the GPT-3 dataset total is the largest of the three figures, CommonCrawl is in the middle, and the GPT-3 training count is the smallest. The comparison also shows that a single public corpus can be very large on its own terms even though it is not the whole of a particular model's data.
Additional Sources in Later Models
The source notes that later iterations of models like GPT-3 have widened their training scope. Meta's LLaMA is named as an example. Rather than relying only on a web-derived corpus, these later models include additional data sources. Two are named in the source. Arxiv research papers add 92 GB to the dataset, and StackExchange code-related questions and answers add 78 GB.
What the source does establish is the direction of change. Newer models drew on specialized sources such as scientific papers and programming question-and-answer material, in addition to the kind of data that the earlier GPT-3 corpus was built from.
Mistakes When Reading Dataset Sizes
Common mistake Treating the 499 billion figure as the amount the model trained on
What it looks likeSaying GPT-3 was trained on 499 billion tokens.
Why it failsThe 499 billion figure is the size of the dataset as a whole. The training run used 300 billion tokens.
Do this insteadReport the pool as 499 billion tokens and the training count as 300 billion tokens.
Common mistake Reading the proportions column as token counts
What it looks likeConcluding that a subset with a 20 percent share contains 20 billion tokens.
Why it failsProportions describe shares of the sample. The token column gives the size of each subset.
Do this insteadUse the token column for sizes and the proportions column for shares.
Common mistake Comparing gigabytes with tokens as if they were the same unit
What it looks likeDeciding that 92 GB of Arxiv papers is a specific number of tokens.
Why it failsThe source gives the additional sources in gigabytes and does not convert them to tokens.
Do this insteadKeep the storage figures in GB and do not infer a token count from them.
Common mistake Assuming the source explains why training stopped at 300 billion tokens
Practice With the Figures
Using only the figures in this article, state whether CommonCrawl's token count is larger than the number of tokens the GPT-3 model was trained on. Then explain which column in the GPT-3 table each of your figures came from.
Hints
- Find the token count for CommonCrawl and the training count for GPT-3.
- Compare the two numbers directly, and remember that both are measured in tokens.
What do you think happens?
Is CommonCrawl larger than the GPT-3 training run, measured in tokens?
Reveal answer
Yes. CommonCrawl alone is 410 billion tokens, and the GPT-3 training run used 300 billion tokens.
Both figures are counts of tokens, so they can be compared directly. The storage size of CommonCrawl, about 570 GB, is a different measure and does not change this comparison.
Key Takeaways
- The GPT-3 dataset totals 499 billion tokens, but the model was trained on 300 billion tokens. The source gives no reason for the difference, and the dataset size and training size are separate figures.
- In the GPT-3 table, the token column gives the size of each subset and the proportions column gives each subset's share of the sample, which sums to 100 percent.
- CommonCrawl alone is 410 billion tokens and about 570 GB of storage. On the token measure it sits below the GPT-3 dataset total and above the GPT-3 training count.
- Later models such as Meta's LLaMA widened their training scope with Arxiv research papers at 92 GB and StackExchange code-related Q&As at 78 GB. These are given in gigabytes, not tokens.