--- license: other license_name: per-source language: - pl task_categories: - text-generation pretty_name: GoLLeM Corpus v4 PL (16B tokens) size_categories: - 10M15% removal — not met) | | license-aware dedup | duplicate survivor chosen by permissiveness (CC0 > CC-BY > CC-BY-SA) | implemented; effect small here (cross-license dups pre-excluded), method contributed for general corpora | | PII residual (post-gate) | independent full scan, `check ⊋ scrub` | 0.0018% (≤351 / 19,319,152 docs; sha-tie 8/8 verified) | | trainability smoke | 300 docs/register schema+content audit | schema OK, 0 empty docs, scrub markers present, registers consistent | ## ⚠️ Known benchmark contamination (post-hoc finding — LLMzSzŁ) **Discovered after training, reported transparently (per our honesty norm).** The build-time eval-decontamination above (exact + word-8gram vs `llmzszl` et al., 2,632 docs removed) was **not sufficient** to fully remove Polish state-exam content. A deeper post-hoc re-scan (12-word fragment match, Aho-Corasick, full 31 GB corpus) found that **~8.83% of LLMzSzŁ questions (1,662 / 18,820) still have variants/paraphrases in the corpus** — almost entirely in `web` (1,653) vs curated (9). The build-time 8-gram filter missed reworded/partial variants that the longer fragment match catches. **Recomputable fingerprint (verify by recompute, not re-read):** - `idx_sha` = `a2e4299364f999133e03989230d8730388d804e433f6a190d60d6b1208e079ce` - recipe: `sha256(json.dumps(sorted(contaminated_item_idx), separators=(",",":")).encode("utf-8"))` — the canonical sha of the sorted index list, **not** a file hash (robust to metadata/wrapper edits; the sha points at the thing, not its packaging). - number: `len(idx) = 1662`; `1662 / 18820 = 8.83%`; clean `18820 − 1662 = 17158`. Anyone can re-derive every figure here from `idx_sha` — no metadata re-read. - method: 12-word contiguous fragment match (Aho-Corasick) vs the full 31 GB corpus. `params: not-preserved (pre-norm)` — the scan script/params were not retained, so the method is **documentational, not re-runnable**; the *number* stays recomputable from `idx_sha`, but re-deriving the index from scratch would need a fresh scan. **Implication:** any benchmark built on **LLMzSzŁ** — and likely other publicly-published Polish state exams (matura, egzamin ósmoklasisty, egzaminy zawodowe) — will be **inflated** for models trained on this corpus, because the model saw ~8.83% of the items. This is inherent to web-crawl corpora: HPLT inherits public exams from the web. **Recommendation for downstream users:** - De-contaminate your PL-exam benchmark against this corpus **before** evaluating — use a long-fragment or semantic match, not just exact/8-gram. - For LLMzSzŁ specifically, a `contaminated_idx` (1,662 item indices) is available from the build repo; exclude those items and evaluate on the ~17,158 clean. - Report results with an explicit note: *"de-contaminated subset, ~X% train-seen items excluded, fragment-based (paraphrases not eliminated 100%)."* **General lesson:** exact + 8-gram decontamination at build time under-catches benchmark leakage from web crawls; a longer-fragment or semantic re-scan **per target benchmark** is needed. Curated registers (encyclopedia/science) were clean — the leak is concentrated in web. ## Reference downstream results (predecessor models) The v4 model trained on this corpus will publish its own benchmarks. For calibration, models trained on this pipeline's predecessor corpus (gollem-corpus-2b-pl, same source family and cleaning approach): - **GoLLeM-110M-PL-v3** (2 epochs / ~2B V32k): PL sentiment polemo2 56.5 acc / 8tags 37.2 (bench_pl harness; +9.3/+5.7 over an independently built 45M PL model on the same harness). Cross-lingual control (lm-eval 0.4.12 zero-shot): BLiMP .546, SciQ .620, LAMBADA-EN ppl 10508 — i.e. a genuinely Polish model, near-random on English, as expected. - Honest framing: at 110M/2B tokens these are fluency/completion models, ~random on zero-shot classification (8tags .11 vs random .125). v4 (250M / 24B seen tokens, DataDecide-style 100:1 overtraining) is the scale-up this corpus exists for. ## PII Statement ### Personal Data / PII Processing All text passed a two-stage PII pipeline before inclusion: 1. **Scrubbing** (`scrub_pii.py`, Paweł, PR#28 + international-format extension): emails → `[PII]`, phone numbers (Polish and international formats, label-anchored and self-labelling `+CC`) → `[Telefon]`, PESEL/NIP/REGON/KRS and identity-document numbers (checksum-validated, label-anchored) → `[PII]`, bank accounts / IBAN (MOD-97 validated) → `[PII]`. Placeholders are semantic tags, not fake values, so no synthetic high-frequency numbers poison the corpus. 2. **Independent gate** (second reviewer, lens strictly wider than the scrubber — `check ⊋ scrub`): full-corpus residual scan on the exact artifact being published (sha-tied, `verify == publish`). Residual after independent gate on the published artifacts: ≤351 documents with unredacted contact data out of 19,319,152 (**0.0018%**), all triaged as institutional/business contacts (university department listings, ministry switchboards, travel-guide venues) in edge formats (+0-trunk, legacy 8-digit); no private-person data found in any triaged sample. Verified sha-tied: all 8 manifest checksums independently recomputed and matched. Out of scope by explicit decision (ADR): public-institution donation account numbers, court registry numbers (KRS as bare references), emergency numbers (112/997/998/999), timestamps, coordinates, ISBNs. Names of public officials in official/government documents are left intact by design (public-interest information, consistent with the source datasets' practice). ### Known limitations - Numbers damaged at the source (truncated 8-digit forms) may survive scrubbing; measured share is included in the residual figure above. - The scrubber is regex-based; free-form descriptions of persons are not redacted. The corpus is web/official text — downstream users training generative models should apply their own output filters. ## License This dataset is a compilation of sources with **per-record license tracking** (`license` and `is_share_alike` columns). It is NOT distributed under a single blanket license. | Partition | Sources | License basis | |---|---|---| | `default` | Wikisource, Wikinews, Wikivoyage (PD/CC0 parts), gov.pl documents, Dziennik Ustaw, Wolne Lektury (PD), NKJP-1M, PoQuAD, ELTeC-pol, Global Voices, news (per-source) | CC0 / public domain / permissive per-source — see per-record `license` column | | `cc-by-sa` | Wikipedia (994M tok), Wikibooks, Wikiquote, Biblioteka Nauki (SA parts) | CC-BY-SA-4.0 — share-alike applies to derivatives of the TEXT | | `web` | HPLT v3 PL (cleaned web crawl) | see below | **HPLT web partition — legal basis statement (important):** the HPLT project releases its *compilation* under CC0, but explicitly does not own the underlying texts ("we do not own any of the text"). We therefore do NOT claim CC0 on the web texts themselves. Our redistribution relies on the text-and-data-mining framework (Directive (EU) 2019/790, art. 4 — lawful access, opt-out respected at crawl level by HPLT); training use falls under the same TDM basis. Users redistributing or re-publishing the raw texts are responsible for their own legal review. This mirrors the approach of the Danish Dynaword project. Attribution for curated sources is provided per-source in the table above and per-record in the `provenance` column. ## How to use ```python from datasets import load_dataset # permissive partition only ds = load_dataset("SlayerLab/gollem-corpus-16b-pl", "default", split="train") # full corpus (all partitions; mind per-partition licenses) for cfg in ("default", "cc-by-sa", "web"): part = load_dataset("SlayerLab/gollem-corpus-16b-pl", cfg, split="train") ``` Columns (curated partitions `default`, `cc-by-sa`): `document_id`, `source_id`, `text`, `register`, `license`, `is_share_alike`, `provenance`, `n_tokens_v32k`. The `web` partition carries the same fields **except `n_tokens_v32k`** (its per-record V32k count is not materialized — web tokens were counted at corpus level; see `_manifest.json` for the web token total and per-shard sha). Load each partition via its own config (`load_dataset("SlayerLab/gollem-corpus-16b-pl", "")`), so the schema difference never surfaces in a single load. ## Provenance & reproducibility - Build pipeline (scrub → uniform web subsample → license-aware dedup → decontam → assembly) is documented step-by-step with parameters in the build experiment log; every shard ships a sha256 in the manifest. Published bytes ARE the verified bytes (`verify == publish`, checked post-upload by independent re-download). - Curated layer provenance per-source: [`SlayerLab/polish-dynaword`](https://huggingface.co/datasets/SlayerLab/polish-dynaword). - Predecessor corpus (v2/v3, 2B): [`SlayerLab/gollem-corpus-2b-pl`](https://huggingface.co/datasets/SlayerLab/gollem-corpus-2b-pl). - Design predecessor / scaffold: [`SlayerLab/slayer-pl-8x3b`](https://huggingface.co/datasets/SlayerLab/slayer-pl-8x3b) — same design and source selection (8-pack, ~24B-token plan); this corpus is the **materialized + cleaned** realization of that plan (adds full-scan near-dedup and the PII gate the scaffold did not have). - Model line: [`SlayerLab/GoLLeM-110M-PL-v3`](https://huggingface.co/SlayerLab/GoLLeM-110M-PL-v3) → GoLLeM v4 (250M, this corpus). ## Acknowledgements - PII scrubbing: Paweł Puzio ([ppuzio](https://huggingface.co/ppuzio), PR#28 in polish-dynaword) - Independent PII gate + international-format fix: Wartownik (N-04, Slayer Kolektyw) - License-aware dedup + per-license partitions: Monter (N-03, Slayer Kolektyw) - Card integration & training: Hart (N-02, Slayer Kolektyw) **Author:** Arkadiusz Słota / SlayerLab. ## Podsumowanie (PL) Dokładny korpus pretreningowy polskiego modelu bazowego **GoLLeM v4 (250M, od zera)** — publikowany PRZED treningiem, bajt-w-bajt ten sam zbiór (sha-tied), na którym model będzie uczony. 16.58B unikatowych tokenów V32k: ~1.96B kuratorowanych (encyklopedia, nauka, news, legal z capem 15%, literatura) + 14.62B oczyszczonego polskiego weba (HPLT v3). Licencje per-rekord w trzech partycjach (permissive / CC-BY-SA / web-TDM), PII po dwustopniowym scrubie z niezależną bramką (residual 0.0018%), dedup license-aware z pełnego skanu (retencja 95.18%), dekontaminacja względem naszych zbiorów ewaluacyjnych.