cs.CLFeb 23, 2026

Beyond a Single Extractor: Re-thinking HTML-to-Text Extraction for LLM Pretraining

Authors: Jeffrey Li, Josh Gardner, Doug Kang, Fangping Shi, Karanjeet Singh, Chun-Liang Li, Herumb Shandilya, David Hall, 

Organizations: University of Washington · Apple · Stanford

Abstract

One of the first pre-processing steps for constructing web-scale LLM pretraining datasets involves extracting text from HTML. Despite the immense diversity of web content, existing open-source datasets predominantly apply a single fixed extractor to all webpages. In this work, we investigate whether this practice leads to suboptimal coverage and utilization of Internet data. We first show that while different extractors may lead to similar model performance on standard language understanding tasks, the pages surviving a fixed filtering pipeline can differ substantially. This suggests a simple intervention: by taking a Union over different extractors, we can increase the token yield of DCLM-Baseline by up to 71% while maintaining benchmark performance. We further show that for structured content such as tables and code blocks, extractor choice can significantly impact downstream task performance, with differences of up to 10 percentage points (p.p.) on WikiTQ and 3 p.p. on HumanEval.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretraining

    Sep 28, 2026Zichun Yu, Jiarui Yan, Shlok Sanghvi +2Language Model PretrainingDocument Information Extraction

  2. news-crawler-LM: A Small Long-Context Model For High-Quality News Crawling

    Jul 23, 2026Pascal Stolzenburg, Jonas Golde, Max Dallabetta +1LLM Fine-TuningDocument Information Extraction

  3. Size Matters: Foundation Model for Czech HTML documents

    Sep 16, 2026Martin Dvořák, Vít Tlustoš, Artyom Voronin +4Language Model PretrainingEfficient Language Model Training