TL;DR
When building web-scale datasets for LLM pretraining, the standard practice of using a single HTML-to-text extractor inadvertently discards massive amounts of high-quality data. By simply taking the union of outputs from multiple distinct extractors, researchers can increase token yield by up to 71% while maintaining or improving downstream model performance. Furthermore, the choice of extractor drastically impacts how well models learn from structured content like tables and code blocks.
What Problem Does This Paper Address?
Before an LLM can learn from the web, raw HTML crawled from the internet must be converted into clean plaintext. This process requires stripping away boilerplate content like navigation bars, ads, and styling elements.
Currently, top-tier open-source datasets rely uniformly on a single rule-based extraction package applied across the entire web crawl (e.g., DCLM uses Resiliparse, FineWeb uses Trafilatura, and Nemotron-CC uses jusText). Because these extractors use different underlying heuristics, they implicitly act as distinct data filters. This paper investigates whether relying on a single extractor leads to suboptimal data coverage and uncovers how different extraction philosophies bias the resulting text—especially for structured data like tables and code.
Methods
The authors systematically evaluate three widely used rule-based extractors: Resiliparse (optimized for speed using C++), Trafilatura (focused on precision/recall balance), and jusText (heuristic-based, favoring full sentences).
Using the DCLM-Baseline curation pipeline, they re-extract text from raw Common Crawl web archives (WARCs) using all three tools. They then propose a Union strategy, combining the unique pages that successfully pass through the post-extraction filtering pipeline from each extractor. They test two deduplication strategies for overlapping pages: Random selection and Manual preference ordering (prioritizing the extractor with the highest token yield).
To study structured data, they build two specialized pipelines:
- CC-Tables: Filters Common Crawl for pages containing
<table>elements, using structural heuristics and a token-basedfastTextclassifier to isolate genuine data tables from layout tables. - CC-Code: Isolates pages with
<pre>tags and uses an ensembledfastTextclassifier to filter out non-code text (like lyrics or emails) to evaluate code block extraction.
Datasets
The models were trained and evaluated using several key datasets and benchmarks:
- Training Data: Sourced from raw Common Crawl WARC files matching the DCLM-Baseline pools (1B and 7B token scales), alongside Stack v2 for code baselines.
- General Evaluation: CORE_V2 (a suite of 22 base model evaluations) and MMLU for general language understanding.
- Tabular Evaluation: WikiTableQuestions (WikiTQ) evaluated via the ToRR benchmark across seven different table serialization formats (e.g., markdown, csv, json).
- Code Evaluation: HumanEval across 5 programming languages.
Key Insights and Ideas
- Extractors are Complementary, Not Interchangeable: Only 39% of web pages survive the DCLM filtering pipeline across more than one extractor. A staggering 61% of pages are uniquely preserved by just a single extractor package.
- Systematic Domain Bias: Extractors exhibit strong preferences based on web design patterns. For over a quarter of the analyzed web domains, at least 60% of the surviving pages came from a single extractor.
- Markdown Markers Can Harm Tabular Learning: Trafilatura attempts to convert HTML tables into clean Markdown. However, models trained on space-delimited tables (produced by Resiliparse) generalized significantly better across all test-time table formats, echoing prior findings that explicit markdown syntax can sometimes confuse web-trained models.
- Heuristics Can Blindly Erase Code and Tables: Because jusText relies heavily on stopword frequencies and full-sentence heuristics, it frequently deletes data tables and code blocks entirely, severely degrading downstream performance on specialized tasks.
Key Results
- Massive Token Yield Increase: Implementing the Union strategy boosts the token yield of DCLM-Baseline by 71% (and 58% after rigorous fuzzy rededuplication) without degrading general benchmark performance. This extra data provides substantial performance boosts in data-constrained environments.
- Dramatic Differences in Tabular Tasks: On the WikiTQ benchmark, a 7B model trained on Resiliparse extractions outperformed Trafilatura by 8.2 percentage points (p.p.) and jusText by 10.3 p.p. (a 3.2× relative improvement).
- Plugging the Tabular Gap: By mixing the newly curated
CC-Tables-Resiliparsedataset into the DCLM-7B-8k pipeline, the authors closed 73% of the performance gap between DCLM and Llama-3-8B on tabular understanding tasks. - Code Extraction Impact: For code generation, jusText's aggressive filtering caused a 3.6 p.p. degradation on HumanEval compared to Resiliparse and Trafilatura.
Limitations and Future Work
While this work proves that a multi-extractor approach is superior, it does not introduce a new "super-extractor" or a dynamic routing mechanism to choose the best extractor per page. The authors limit their scope to rule-based extractors, leaving neural-network-based web scrapers unexamined due to scaling costs. Additionally, because the underlying extraction libraries are under active development, specific formatting bugs highlighted in the paper may shift in future releases. Future work could explore training lightweight routing models to dynamically assign extractors based on a webpage's structural characteristics.
Summary updated