SWEb: A Large Web Dataset for the Scandinavian Languages
Tobias Norlund, Tim Isbister, Amaru Cuba Gyllensten, Paul Dos Santos, Danila Petrelli, Ariel Ekgren, Magnus Sahlgren
TL;DR
SWEb addresses the scarcity of large-scale open pretraining data for Scandinavian languages by introducing a model-based HTML content extractor and assembling a 1.01 trillion-token dataset from 98 Common Crawl snapshots. The pipeline uses a Markdown-based text output with a line-level transformer extractor, trained on modest annotated data, and applies lightweight quality filters and per-snapshot deduplication. HP-MEK benchmarking shows models trained on SWEb achieve competitive performance relative to FineWeb while leveraging substantially more high-quality tokens. By open-sourcing the data, code, and extractor, the work lowers barriers to building Scandinavian language models and provides a data-efficient blueprint for similar low-resource languages.
Abstract
This paper presents the hitherto largest pretraining dataset for the Scandinavian languages: the Scandinavian WEb (SWEb), comprising over one trillion tokens. The paper details the collection and processing pipeline, and introduces a novel model-based text extractor that significantly reduces complexity in comparison with rule-based approaches. We also introduce a new cloze-style benchmark for evaluating language models in Swedish, and use this test to compare models trained on the SWEb data to models trained on FineWeb, with competitive results. All data, models and code are shared openly.
