# Korpusy domenowe dla modeli językowych

EN: **Domain-specific pretraining corpora for LLMs** · id `domaincorpora` · aliases: domain corpora, domain-specific data curation, specialised pretraining data

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Dane dla AI](https://aiatlasgraph.com/t/data.md) › Korpusy domenowe dla modeli językowych

## Description

- PL: Kuracja korpusów pretrainingowych pod konkretną domenę lub język: dedykowana ekstrakcja, identyfikacja domeny i języka, filtry jakości i udział w mieszance.
- EN: Curating pretraining corpora for a specific domain or language: dedicated extraction, domain and language identification, quality filters and mixture share.

## In one sentence

- PL: Przygotowanie osobnych zbiorów tekstów z wybranych dziedzin, jak kod, matematyka czy rzadkie języki, żeby model dobrze je opanował.
- EN: Building separate text collections for specific fields, such as code, maths or rarer languages, so a model learns them well.

## Problem it solves

- PL: Ogólne zbiory tekstów z internetu gubią wzory, psują kod i mają mało treści w mniejszych językach, więc model słabo sobie z nimi radzi.
- EN: General web text loses formulas, mangles code and holds little in smaller languages, so models handle these poorly.

## What it does

- PL: Każda dziedzina dostaje własne sito: inne reguły wydobywania treści, inne progi jakości i osobne sprawdzenie, czy tekst w ogóle do niej należy.
- EN: Each field gets its own sieve: different rules for pulling out content, different quality bars and a separate check that the text belongs there.

## Everyday example

- PL: Asystent, który poprawnie zapisuje wzory matematyczne i rozumie pytanie zadane po polsku, a nie tylko po angielsku.
- EN: An assistant that writes maths formulas correctly and understands a question asked in Polish, not only in English.

## This concerns you if you…

- PL: budujesz model dla konkretnej dziedziny lub języka
- PL: model myli się w kodzie albo we wzorach
- PL: wybierasz model do pracy w mniej popularnym języku
- EN: are building a model for a specific field or language
- EN: see a model get code or formulas wrong
- EN: are choosing a model to work in a less common language

## Keywords

FineWeb2 · The Stack v2 · OpenWebMath · Dolma · GlotLID · MinHash deduplication · domain classifier · LaTeX extraction · length upsampling · data mixture · Common Crawl

## How it works

- PL: Ogólny pipeline (crawl, ekstrakcja, deduplikacja, filtry) dostosowuje się do domeny: ekstraktory zachowują LaTeX lub strukturę repozytoriów, klasyfikatory wykrywają język albo treść matematyczną, a progi filtrów ustala się z rozkładów statystyk danej domeny. Gotowe podkorpusy trafiają do mieszanki z wagami.
- EN: The general pipeline (crawl, extraction, deduplication, filters) is adapted per domain: extractors preserve LaTeX or repository structure, classifiers detect language or maths content, and filter thresholds come from the domain's own statistics. Finished sub-corpora enter the mixture with weights.

## Limits

- PL: Każda domena i język wymagają osobnej ewaluacji. Agresywne filtry wycinają rzadkie, ale cenne treści, a zbyt duży udział jednej domeny może osłabić ogólne umiejętności. Licencje i zgody różnią się między domenami.
- EN: Each domain and language needs its own evaluation. Aggressive filters cut rare but valuable content, and too large a domain share can weaken general skills. Licences and consent differ across domains.

## Key terms

- PL: **podkorpus**: Wydzielona część danych treningowych z jednej dziedziny lub języka.
- PL: **upsampling**: Celowe częstsze pokazywanie modelowi rzadszych, cennych danych.
- PL: **ekstraktor**: Program wyciągający właściwą treść ze strony lub pliku.
- EN: **sub-corpus**: A slice of training data from one field or language.
- EN: **upsampling**: Deliberately showing rarer, valuable data to the model more often.
- EN: **extractor**: A program that pulls the actual content out of a page or file.

## Know first

- [Trening od zera / pretraining (Training from scratch and pretraining)](https://aiatlasgraph.com/t/pretraining.md)
- [Filtrowanie jakości (heurystyki i klasyfikatory) (Quality filtering with heuristics and classifiers)](https://aiatlasgraph.com/t/qualityfiltering.md)

## Subtopics (4 direct, 4 in total)

- [Dane do treningu długiego kontekstu (Long-context training data)](https://aiatlasgraph.com/t/longcontextdata.md): Data mixtures for context-extending continual pretraining: balanced domains with a raised share of long documents.
- [Kuracja danych kodu źródłowego (Source code data curation)](https://aiatlasgraph.com/t/codedatacuration.md): Building code corpora: licence filtering, opt-outs, deduplication, secret and PII removal, decontamination and repository-level layout.
- [Rozpoznawanie języka i równoważenie danych wielojęzycznych (Language identification and multilingual data balancing)](https://aiatlasgraph.com/t/languageid.md): Classifying each document's language and script, then setting thresholds, filters and proportions separately for every language.
- [Wydobywanie danych matematycznych z sieci (Mathematical web data extraction)](https://aiatlasgraph.com/t/mathwebdata.md): Selecting maths pages from web crawls and extracting text while preserving LaTeX notation, followed by quality filtering and deduplication.

## Related topics

Untyped, symmetric "see also" links.

- [Dobór mieszanki danych (DoReMi, RegMix) (Data mixture optimisation)](https://aiatlasgraph.com/t/datamixing.md)

## Sources

- [FineWeb2: One Pipeline to Scale Them All — Adapting Pre-Training Data Processing to Every Language](<https://arxiv.org/abs/2506.20920>) `penedo-fineweb2-2025` · by Guilherme Penedo i in. (Hugging Face)
- [StarCoder 2 and The Stack v2: The Next Generation](<https://arxiv.org/abs/2402.19173>) `lozhkov-stackv2-2024` · by Anton Lozhkov, Raymond Li, Loubna Ben Allal i in. (BigCode)
- [OpenWebMath: An Open Dataset of High-Quality Mathematical Web Text](<https://arxiv.org/abs/2310.06786>) `paster-openwebmath-2023` · by Keiran Paster, Marco Dos Santos, Zhangir Azerbayev, Jimmy Ba

---

AI Atlas revision 127 (2026-11-03) · HTML: https://aiatlasgraph.com/t/domaincorpora · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-03
