AICC: Parse HTML Finer, Make Models Better - A 7.3T AI-Ready Corpus Built by a Model-Based HTML Parser

Ren Ma, Jiantao Qiu, Chao Xu, Pei Chu, Kaiwen Liu, Pengli Ren, Yuan Qu, Jiahui Peng, Linfeng Hou, Mengjie Liu, Lindong Lu, Wenchang Ning, Jia Yu, Rui Min, Jin Shi, Haojiong Chen, Peng Zhang, Wenjian Zhang, Qian Jiang, Zengjie Hu, Guoqiang Yang, Zhenxiang Li, Fukai Shang, Runyuan Ma, Chenlin Su, Zhongying Tu, Wentao Zhang, Dahua Lin, Conghui HearXiv 2025 · DOI

Introduction

In the era of Large Language Models (LLMs), the "garbage in, garbage out" principle has driven researchers to focus heavily on data filtering and deduplication. However, a critical initial step has often been overlooked: the extraction of text from raw HTML. Researchers from the Shanghai AI Laboratory argue that traditional heuristic-based scrapers act as a hidden ceiling on model performance. To address this, they have released AICC, a massive 7.3-trillion token multilingual corpus built using a specialized model-based parser, MinerU-HTML.

The Extraction Bottleneck

Most large-scale datasets, such as FineWeb or RefinedWeb, rely on rule-based tools like Trafilatura or Resiliparse. These tools use simple heuristics, such as text density, to distinguish main content from boilerplate (ads, menus, sidebars). While efficient, these rules frequently mangle structured data. Code blocks lose indentation, mathematical formulas lose LaTeX delimiters, and tables are flattened into unreadable strings. These "extraction artifacts" degrade the quality of pretraining data, particularly for reasoning and technical domains.

MinerU-HTML: A Model-Based Parser

To overcome the limitations of heuristics, the authors developed MinerU-HTML, a 0.6B-parameter decoder-only language model (based on Qwen3). Unlike rule-based systems, MinerU-HTML treats content extraction as a sequence labeling problem.

The MinerU-HTML pipeline: from raw HTML to structured Main-HTML via a 0.6B parameter classification model.

The pipeline consists of three main stages:

  1. Pre-processing: Raw HTML is simplified by removing non-content tags and chunking blocks to create a compact input for the model.
  2. Classification: The 0.6B model classifies each block as "main content" or "other," leveraging its semantic understanding to preserve narrative flow.
  3. Post-processing: The system projects labels back to the original HTML structure, pruning "other" blocks and assembling a valid DOM subtree (Main-HTML) that preserves structural integrity.

Scaling and Iterative Refinement

Processing hundreds of billions of web pages with a GPU-heavy model is computationally expensive. The researchers employed template-aware optimization to scale. By clustering pages by subdomain, they ran the model on a single representative page to derive extraction rules (XPath/CSS), which were then applied to the rest of the cluster using fast CPU processing. This allowed them to process the entire web while only running the model on 0.4% of total pages.

Iterative model training loop using LLM-as-a-judge and human verification to refine the parser's accuracy.

To ensure high precision, the parser was refined through an iterative loop. An "LLM-as-a-judge" identified potential "badcases" in pair-wise document comparisons, which were then human-verified to create a high-quality training set for subsequent model iterations.

Results and Impact

The resulting AICC corpus contains 7.3 trillion tokens. Evaluation on the new WebMainBench—a benchmark of 7,887 human-annotated pages—showed that MinerU-HTML significantly outperforms traditional tools. It achieved a ROUGE-N F1 score of 81.82%, compared to Trafilatura’s 63.58%.

The impact on technical content is even more pronounced. MinerU-HTML achieved 90.93% edit similarity for code blocks (vs. 13.05% for Trafilatura) and 93.99% for formulas (vs. 61.07%). In controlled pretraining experiments, models trained on AICC outperformed those trained on FineWeb and RefinedWeb by an average of 1.08 percentage points across 13 benchmarks, with the most significant gains in reading comprehension and general knowledge.

Conclusion

The AICC project demonstrates that how we extract text is as important as what we filter. By moving from heuristic rules to model-based semantic extraction, researchers can preserve the structural and contextual nuances of the web, creating a "virtuous cycle" where better parsers lead to better models, which in turn can be used to build even better parsers.

Summary updated

BibTeX
@misc{ma2025aicc,
  author = {Ren Ma and Jiantao Qiu and Chao Xu and Pei Chu and Kaiwen Liu and Pengli Ren and Yuan Qu and Jiahui Peng and Linfeng Hou and Mengjie Liu and Lindong Lu and Wenchang Ning and Jia Yu and Rui Min and Jin Shi and Haojiong Chen and Peng Zhang and Wenjian Zhang and Qian Jiang and Zengjie Hu and Guoqiang Yang and Zhenxiang Li and Fukai Shang and Runyuan Ma and Chenlin Su and Zhongying Tu and Wentao Zhang and Dahua Lin and Conghui He},
  title = {{AICC: Parse HTML Finer, Make Models Better - A 7.3T AI-Ready Corpus Built by a Model-Based HTML Parser}},
  year = {2025},
  eprint = {2511.16397},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.16397},
}
Figure