NaijaWeb: Building High-Quality Pretraining Corpora for Nigeria's Low-Resource Languages

NaijaWeb builds a 527.4M-token high-quality trilingual Nigerian corpus, validating native-speaker annotation plus classifier filtering.
NaijaWeb is a high-quality pretraining corpus for Hausa, Igbo, and Yoruba with 527.4M tokens across 856K documents from 2024–2026 Common Crawl snapshots. Its pipeline includes filtering, deduplication, removal of machine-translated sites, and native-speaker annotation to train a scalable classifier. In a 134.1M-parameter model evaluation, NaijaWeb achieved the lowest average held-out loss among six corpora, offering a reusable paradigm of small-scale annotation plus classifier amplification for low-resource languages.
Pretraining for low-resource languages has long faced the dual challenges of data scarcity and uneven quality. The recently released NaijaWeb corpus constructs a rigorously filtered and cleaned text collection for three major Nigerian languages—Hausa, Igbo, and Yoruba—containing 527.4 million tokens across 856,000 documents. This work not only demonstrates how to distill high-quality corpora from noisy web data but also validates the effectiveness of the filtering strategy through small-scale model pretraining.

From Common Crawl to High-Quality Corpus: A Refined Pipeline
NaijaWeb starts from Common Crawl snapshots spanning 2024 to 2026. The research team first performed basic filtering and deduplication, and specifically removed machine-translated localization sites—these sites tend to have repetitive content and stiff translations, offering limited value for language models learning authentic expressions. The removal process was not fully automated but combined manual screening to ensure accuracy.
Next, the team recruited native speakers to annotate documents as "keep" or "discard," and used these annotations to train a classifier. The classifier's role is to automatically identify high-quality documents, enabling scalable filtering across large-scale data. This "native speaker annotation + classifier learning" approach is especially important in low-resource settings, as it transforms limited human judgment into reusable filtering capability.
Common Crawl is a nonprofit organization that has regularly crawled global web pages since 2008 and publicly releases raw web archives (WARC) and extracted text (WET), making it one of the largest publicly available web corpus sources. Its crawl snapshots are organized by month (e.g., week 10 of 2024), covering hundreds of languages, but content quality varies widely, containing large amounts of navigation bars, ads, template text, and duplicate pages. Therefore, almost all corpus construction work based on Common Crawl requires pipelines involving language identification, main content extraction, deduplication, and quality filtering. For low-resource languages, Common Crawl is often the only available large-scale web text source, but its noise ratio in low-resource languages is typically higher, making filtering more difficult.
FineWeb-2 is a multilingual web corpus released by Hugging Face, covering over 1,000 languages, built on Common Crawl and filtered through language identification, deduplication, and quality classifiers—it is one of the important baselines for multilingual pretraining data today. MADLAD-400 is a large-scale multilingual corpus released by Google, covering approximately 400 languages, offering both a "noisy version" (raw extracted text) and a "clean version" (filtered), and is often used as a comparison benchmark for low-resource language corpora. HPLT 2.0 is a corpus released by the High Performance Language Technologies project, also derived from web crawls, emphasizing scale and multilingual coverage. WURA is a corpus specifically targeting African languages. Comparing these corpora with NaijaWeb under the same model and token budget allows for a relatively fair assessment of how different data construction strategies affect low-resource language pretraining.
Validating Filtering Effectiveness: Small Model Pretraining Comparison
To test whether the data filtered by the classifier is genuinely better, the researchers conducted a controlled experiment: pretraining a small language model separately on the filtered data and on an equal amount of randomly sampled data from the deduplicated pool, then comparing the held-out loss across the three languages. Results showed that the filtered data achieved lower loss after one epoch of training, with the two converging after ten epochs.
This result indicates that high-quality filtering can bring faster convergence in early training, although the gap may narrow with longer training. For low-resource language research with limited computational resources, this early efficiency gain has practical value.
Held-out loss refers to the cross-entropy loss computed on a held-out set not involved in training, a commonly used intrinsic evaluation metric in language model pretraining. Lower loss indicates more accurate prediction of held-out text, typically reflecting that the model has learned more generalizable language patterns. Compared to downstream task evaluation, held-out loss is computationally cheap and does not depend on task annotations, making it suitable for quickly comparing different data qualities during corpus construction. However, it has limitations: loss is sensitive to data distribution, and if the held-out set closely resembles the training data in style, it may overestimate corpus quality; moreover, lower loss does not necessarily translate into improved downstream task performance. Therefore, held-out loss is better suited as a preliminary validation signal for filtering strategies rather than a final conclusion.
Extended Corpus and Multi-Corpus Comparative Evaluation
Building on the initial filtering, the team further extended the corpus: adding re-crawled data from news and community sites, as well as documents in these three languages from FineWeb-2 crawled up to 2024 that had not yet been included in the existing pool. All of these additions passed through the same classifier.
The final evaluation used a 134.1 million parameter model, pretraining for ten epochs on each corpus under a fixed token budget. NaijaWeb achieved the lowest average held-out loss among six corpora, leading WURA, FineWeb-2, MADLAD-400 (both noisy and clean versions), and HPLT 2.0. In terms of token count, NaijaWeb is also the largest among the filtered corpora compared.
Implications for Low-Resource Language Pretraining
NaijaWeb's work provides a reusable paradigm: for low-resource languages, there is no need to wait for perfect large-scale human annotation—instead, high-quality subsets can be distilled from existing web data through "small-scale native speaker annotation + classifier amplification." At the same time, the research reminds us that machine-translated localization content can become a noise source in low-resource language corpora and requires targeted identification and removal.
Of course, the limitations of this work deserve attention: the classifier's effectiveness depends on the coverage of annotation data, and re-crawling of news and community sites may introduce temporal bias. Additionally, evaluation is based solely on held-out loss and has not yet addressed downstream task performance. Nevertheless, NaijaWeb represents a solid step forward in pretraining data construction for Nigerian languages and low-resource languages more broadly.
One-line Summary
NaijaWeb builds a 527.4M-token high-quality trilingual Nigerian corpus, validating the native-speaker annotation plus classifier filtering paradigm.
Paragraph Summary
NaijaWeb is a high-quality pretraining corpus for Hausa, Igbo, and Yoruba, containing 527.4 million tokens across 856,000 documents, sourced from Common Crawl snapshots spanning 2024 to 2026. The construction pipeline includes basic filtering and deduplication, manual and automated removal of machine-translated localization sites, and native speaker annotation of keep/drop labels to train a classifier for scalable filtering. Small model pretraining comparisons show that filtered data achieves lower loss after one epoch, converging with random sampling after ten epochs. In evaluations with a 134.1M parameter model under a fixed token budget, NaijaWeb achieved the lowest average held-out loss among six corpora, leading WURA, FineWeb-2, MADLAD-400, and HPLT 2.0. This work provides a reusable data construction paradigm of "small-scale annotation + classifier amplification" for low-resource language pretraining.
Related articles

Building Your First Voice App with GPT-Live: A Hands-On WebRTC Guide
Based on OpenAI's official tutorial, this guide explains how to build a real-time voice app with GPT-Live over WebRTC: WebSocket vs. WebRTC trade-offs, the SDP Offer/Answer handshake, audio tracks and data channels, plus the risks of long-conversation summarization and the sideband extension.

AWS Trainium4 Makes 4-bit AI Nearly Lossless
AWS Trainium4 uses hardware computed-permutation trellis coding for 4-bit AI inference, reaching 98% of the theoretical precision limit, giving developers high-quality tokens at lower cost with less quality loss from low-precision formats.

Hands-On Test: Deploying DeepSeek V4.1 Flash Locally on 4x RTX Pro 6000
Bilibili creator tests DeepSeek V4.1 Flash on 4x RTX Pro 6000 (384GB VRAM): 276 Token/s single-user, 96 Token/s at 8 concurrent streams, 14s time-to-first-token. Suited for 20-30 person studios with staggered use and peaks around 8 streams.