swan07/math-tiers
Math-Tiers: A Tiered Pretraining Corpus for Studying Numerical Reasoning A large-scale English pretraining corpus split into three tiers by mathematical content density. Designed for controlled experiments studying how data composition during pretraining affects numerical reasoning in language models. Tiers Tier Description Shards Size Est. Tokens Sources T0 Pure narrative: no digits, number words, or math 648 542 GB ~113B RedPajama-Book… See the full description on the dataset page: https://huggingface.co/datasets/swan07/math-tiers.
Math-Tiers: A Tiered Pretraining Corpus for Studying Numerical Reasoning
A large-scale English pretraining corpus split into three tiers by mathematical content density. Designed for controlled experiments studying how data composition during pretraining affects numerical reasoning in language models.
Tiers
Format
Each tier is stored as sharded JSONL files: T0/T0_0000.jsonl, T1/T1_0000.jsonl, T2/T2_0000.jsonl, etc.
Each line is a JSON object with:
{"text": "...", "source": "english-pd", "token_estimate": 1234}text: The filtered document textsource: Origin dataset identifiertoken_estimate: Approximate whitespace-split token count
Filtering
All tiers use sentence-level filtering: documents are split into sentences (NLTK punkt), individual sentences matching the blocklist are removed, and remaining sentences are rejoined. This preserves more text than paragraph-level filtering.
T0 Blocklist (aggressive: removes all numeric content)
- Digits: All characters 0-9
- Operators:
+ - * / = ^ % < >and Unicode math symbols - Fraction characters:
½ ¼ ¾etc. - Number words: zero through trillion, ordinals (first–twelfth), once/twice/thrice, half/quarter/double/triple/dozen
- Math terms: equation, variable, polynomial, derivative, integral, theorem, eigenvalue, topology, etc.
- Patterns: LaTeX math (
$...$,\frac{},\sum,\int, etc.)
T1 Blocklist (moderate: removes formal math only)
- No digit or operator blocking — everyday numbers pass through
- Math terms: equation, variable, polynomial, derivative, integral, theorem, eigenvalue, topology, etc.
- Patterns: LaTeX math expressions
T2 Blocklist
None. All content from finemath-3plus is included.
Intended Use
This corpus supports a pretraining experiment with the following design:
- Base model: Train from scratch on T0 (pure narrative) for 60B tokens
- Model 0: Continue base on T0 (held-out shards) for 20B tokens
- Model 1: Continue base on T1 (everyday numeric) for 20B tokens
- Model 2: Continue base on T2 (full math) for 20B tokens
Comparing Models 0/1/2 isolates the effect of mathematical content exposure during the second training phase, controlling for total compute and training procedure.
