Dripper:一种轻量级的HTML主内容提取框架
Dripper: Token-Efficient Main HTML Extraction with a Lightweight LM
AI总结:
Dripper通过轻量级框架实现高效HTML主内容提取,兼顾效率与准确性,开源模型促进高质量数据集构建。
摘要:
从网页中提取高质量的主内容是构建大规模训练语料库的关键前提。虽然传统启发式提取器效率高,但缺乏处理现代网页结构异质性的语义推理能力。相反,经过良好预训练的生成式大语言模型(LLMs)虽然具有优越的文档理解能力,但在应用于网络规模时受到计算成本高、上下文窗口有限和幻觉风险的限制。我们提出了Dripper,一种轻量级框架,通过四个贡献解决了这些瓶颈:(1)我们通过小型语言模型(SLMs)将提取重新公式化为一个约束序列标注任务。这种范式消除了生成幻觉,并实现了卓越的效率,单个A100 GPU可达到每秒3.08页的吞吐量。(2)我们构建了WebMainBench,一个包含7809个人工标注页面的严格基准,涵盖5434个唯一领域和多种语言。评估显示,我们的Dripper-0.6B模型在性能上优于启发式方法如Trafilatura,并与大规模模型如DeepSeek-V3.2(685B)、GPT-5和Gemini-2.5-Pro相抗衡,提供了最优的效率-准确性权衡。(3)我们通过预训练一个10亿参数模型在Dripper整理的语料库(6300亿个标记)上展示了基础设施价值。该模型在下游任务中显著优于基线模型,证明了提取质量的关键作用以及我们框架的有效性。(4)我们开源了Dripper-0.6B的权重和代码库,以促进高质量数据集的构建。
英文摘要:
High-quality main content extraction from web pages is a critical prerequisite for constructing large-scale training corpora. While traditional heuristic extractors are efficient, they lack the semantic reasoning required to handle the structural heterogeneity of the modern web. Conversely, well-pretrained generative Large Language Models (LLMs) offer superior document comprehension but are prohibited by excessive computational costs, limited context windows, and hallucination risks when applied at web scale. We present \textbf{Dripper}, a lightweight framework that resolves these bottlenecks through four contributions: (1) We reformulate extraction as a \textbf{constrained sequence labeling} task using SLMs (Small Language Models). This paradigm eliminates generative hallucinations and achieves exceptional efficiency, reaching a throughput of 3.08 pages per second on a single A100 GPU. (2) We construct \textbf{WebMainBench}, a rigorous benchmark of 7,809 human-annotated pages covering 5,434 unique domains and multiple languages. Evaluations show our Dripper-0.6B model \textbf{outperforms} heuristics like Trafilatura and rivals massive models like DeepSeek-V3.2(685B), GPT-5 and Gemini-2.5-Pro, offering an optimal efficiency-accuracy trade-off. (3) We demonstrate infrastructural value by \textbf{pre-training a 1B model} on a Dripper-curated corpus (63B tokens). This model significantly outperforms baselines in downstream tasks, proving the critical role of extraction quality and the effectiveness of our framework. (4) We \textbf{open-source} the Dripper-0.6B weights and codebase to facilitate the construction of high-quality datasets.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。