Rethinking KenLM: Good and Bad Model Ensembles for Efficient Text Quality Filtering in Large Web Corpora
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
With the increasing demand for substantial amounts of high-quality data to train large language models (LLMs), efficiently filtering large web corpora has become a critical challenge. For this purpose, KenLM, a lightweight n-gram-based language model that operates on CPUs, is widely used. However, the traditional method of training KenLM utilizes only high-quality data and, consequently, does not explicitly learn the linguistic patterns of low-quality data. To address this issue, we propose an ensemble approach that leverages two contrasting KenLMs: (i) Good KenLM, trained on high-quality data; and (ii) Bad KenLM, trained on low-quality data. Experimental results demonstrate that our approach significantly reduces noisy content while preserving high-quality content compared to the traditional KenLM training method. This indicates that our method can be a practical solution with minimal computational overhead for resource-constrained environments.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 15 of its 36 references that are in the map. First posted on arXiv 15 Sep 2024.
Builds on
15 of 36 references.
References · 15
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
- 2016Bag of Tricks for Efficient Text Classificationcited by 869
- 2023Textbooks Are All You Needcited by 561
- 2019CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Datacited by 544
- 2024DataComp-LM: In search of the next generation of training sets for language modelscited by 381
- 2020Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detectioncited by 217
- 2023CulturaX: A Cleaned, Enormous, and Multilingual Dataset for Large Language Models in 167 Languagescited by 172
- 2023OpenWebMath: An Open Dataset of High-Quality Mathematical Web Textcited by 151
Built on by
Citing papers per year: 2024: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Aleph-Alpha-GermanWeb: Improving German-language LLM pre-training with model-based data curation and synthetic data generation
- 2025Blu-WERP (Web Extraction and Refinement Pipeline): A Scalable Pipeline for Preprocessing Large Language Model Datasets
- 2025ReaderLM-v2: Small Language Model for HTML to Markdown and JSON
- 2023FELM: Benchmarking Factuality Evaluation of Large Language Models
- 2024Take the essence and discard the dross: A Rethinking on Data Selection for Fine-Tuning Large Language Models
- 2025Multilingual Language Model Pretraining using Machine-translated Data
- 2025Rethinking Data Mixture for Large Language Models: A Comprehensive Survey and New Perspectives
- 2025DaMoC: Efficiently Selecting the Optimal Large Language Model for Fine-tuning Domain Tasks Based on Data and Model Compression