BramVanroy's picture
Update README.md
8947c26 verified
|
raw
history blame
7.96 kB
metadata
language:
  - nl
size_categories:
  - 10B<n<100B
task_categories:
  - text-generation
  - text2text-generation
pretty_name: Filtered CulturaX + Wikipedia for Dutch

Filtered CulturaX + Wikipedia for Dutch

Warning: there's currently a mismatch between configs. the smallest ones (up to 100M) are counted as white-space tokens, the other ones are counted as tokenized by gemma. In the future, all configs will be based on white-space tokens.

This is a combined and filtered version of CulturaX and Wikipedia, only including Dutch. It is intended for the training of LLMs.

Different configs are available based on the number of tokens (see a section below with an overview). This can be useful if you want to know exactly how many tokens you have. Great for using as a streaming dataset, too. Tokenization is done with the big vocabulary of the google/gemma-2b tokenizer so depending on your tokenizer these exact numbers may differ.

Every config also has a test set (for validation) of 1% the total size of the dataset, minimally 1 max. 64k samples (~26M tokens).

Wikipedia and CulturaX were suffled before merging and the teset set creation was also shuffled. Priority is given to Wikipedia to prioritize knowledge-content, so the smaller configs will consist exclusively of Wikipedia and for the larger configs we augment with CulturaX. Every config builds further on the previous, so this means that every config contains the same data as the smaller ones and more HOWEVER their train/test splits are not the same, so test set of one config may overlap with samples for another training set. This is usually not a problem but just be aware that you do not train on one config's training set and test with another config's test set.

Filtering

While CultruaX already has done a lot of filtering, some more filtering can be done to improve the quality of the corpus. These filters are described below.

The baseline ratios (punctuation, uppercase, digits) were calculated on the SONAR-500 corpus (excluding WRPEA WRPED WRUEA WRUED WRUEB).

CulturaX:

  • removed documents that contain the text "rechten voorbehouden" or "rights reserved"
  • remove document's whose URL contained "wikipedia.org" (because we include a cleaned version of Wikipedia ourselves)
  • removed documents that contain a "bad word" (see the section below)
  • removed documents that contain any non-latin characters. The idea is that "knowledge"-based information (e.g. original writing of a name) are allowed when the data comes from Wikipedia, but not from any other webcrawl, to avoid unsollicited noise.

CulturaX + Wikipedia:

  • removed documents where ratio of punctuation marks vs. non-whitespace characters is higher than 0.2
  • removed documents where ratio of uppercase vs. non-whitespace characters is higher than 0.22
  • removed documents where ratio of digits vs. non-whitespace characters is higher than 0.16
  • removed documents where the average token length is < 2 or > 20

Bad words

BAD_PHRASES_DOC_LEVEL = {
    # https://en.wikipedia.org/wiki/Dutch_profanity
    "achterlijk",
    "debiel",
    "downie",
    "idioot",
    "kankerlijer",
    "klere",
    "kolere",
    "minkukel",
    "pestkop",
    "pleuris",
    "pleuritis",
    "teringlijer",
    "tyfuslijer",
    "gadver",
    "getver",
    "godver",
    "godskolere",
    "godverork",
    "graftak",
    "kopvod",
    "verdomme",
    "anaalgeneraal",
    "bitch",
    "dikzak",
    "flikker",
    "fok",
    "fuck",
    "hoer",
    "klootzak",
    "klote",
    "kreng",
    "kringspiermusketier",
    "kut",
    "lamzak",
    "lul",
    "manwijf",
    "matennaai",
    "neuken",
    "neuker",
    "ouwehoer",
    "reet",
    "reetkever",
    "reetridder",
    "rotzak",
    "schijt",
    "shit",
    "slet",
    "slijmbal",
    "slons",
    "sodemieter",
    "stoephoer",
    "swaffel",
    "teef",
    "trut",
    "tut",
    "zak",
    "uilskuiken",
    "zeik",
    "bamivreter",
    "bosneger",
    "neger",
    "fransoos",
    "geitenneuker",
    "kaaskop",
    "kakker",
    "koelie",
    "lijp",
    "medelander",
    "mocro",
    "mof",
    "nikker",
    "poepchinees",
    "roetmop",
    "spaghettivreter",
    "loempiavouwer",
    "spanjool",
    "spleetoog",
    "tatta",
    "tokkie",
    "zandneger",
    "zwartzak",
    "halvezool",
    "kenau",
    "klootviool",
    "knuppel",
    "koekert",
    "koekwaus",
    "oelewapper",
    "smeerlap",
    "sukkel",
    "sul",
    "wappie",
    "wijf",
    "zooi",
    # xxx (a.o. https://gitlab.com/yhavinga/c4nlpreproc/-/blob/master/clean/badwords_ennl.py?ref_type=heads)
    "xxx",
    "anal",
    "blowjob",
    "buttplug",
    "cock",
    "cunt",
    "geil",
    "sex",  # Standaardnederlands = seks, maybe we catch some porn or socialmedia sites with this misspelling
    "porn",
    # extra
    "nigger",
    "nigga",
    "hoerig",
    "klojo",
}

Config details

10k

  • ratio_wikipedia: 100.00%
  • total_num_tokens: 10,078
  • train_num_tokens: 9,957
  • test_num_tokens: 121
  • total_num_samples: 38
  • train_num_samples: 37
  • test_num_samples: 1

100k

  • ratio_wikipedia: 100.00%
  • total_num_tokens: 100,099
  • train_num_tokens: 99,537
  • test_num_tokens: 562
  • total_num_samples: 303
  • train_num_samples: 300
  • test_num_samples: 3

1M

  • ratio_wikipedia: 100.00%
  • total_num_tokens: 1,000,104
  • train_num_tokens: 987,432
  • test_num_tokens: 12,672
  • total_num_samples: 2,722
  • train_num_samples: 2,695
  • test_num_samples: 27

10M

  • ratio_wikipedia: 100.00%
  • total_num_tokens: 10,000,692
  • train_num_tokens: 9,905,387
  • test_num_tokens: 95,305
  • total_num_samples: 25,641
  • train_num_samples: 25,385
  • test_num_samples: 256

100M

  • ratio_wikipedia: 100.00%
  • total_num_tokens: 100,000,049
  • train_num_tokens: 99,022,731
  • test_num_tokens: 977,318
  • total_num_samples: 237,578
  • train_num_samples: 235,203
  • test_num_samples: 2,375

1B

  • ratio_wikipedia: 82.38%
  • total_num_tokens: 1,000,000,003
  • train_num_tokens: 990,064,856
  • test_num_tokens: 9,935,147
  • total_num_samples: 2,869,233
  • train_num_samples: 2,840,541
  • test_num_samples: 28,692

5B

  • ratio_wikipedia: 35.62%
  • total_num_tokens: 5,000,000,224
  • train_num_tokens: 4,974,586,006
  • test_num_tokens: 25,414,218
  • total_num_samples: 12,603,939
  • train_num_samples: 12,539,939
  • test_num_samples: 64,000

10B

  • ratio_wikipedia: 26.86%
  • total_num_tokens: 10,000,000,658
  • train_num_tokens: 9,973,803,589
  • test_num_tokens: 26,197,069
  • total_num_samples: 24,628,921
  • train_num_samples: 24,564,921
  • test_num_samples: 64,000

15B

  • ratio_wikipedia: 23.85%
  • total_num_tokens: 15,000,001,092
  • train_num_tokens: 14,973,654,717
  • test_num_tokens: 26,346,375
  • total_num_samples: 36,653,903
  • train_num_samples: 36,589,903
  • test_num_samples: 64,000

20B

  • ratio_wikipedia: 22.32%
  • total_num_tokens: 20,000,000,303
  • train_num_tokens: 19,973,764,973
  • test_num_tokens: 26,235,330
  • total_num_samples: 48,678,883
  • train_num_samples: 48,614,883
  • test_num_samples: 64,000

25B

  • ratio_wikipedia: 21.40%
  • total_num_tokens: 25,000,000,737
  • train_num_tokens: 24,973,747,815
  • test_num_tokens: 26,252,922
  • total_num_samples: 60,703,865
  • train_num_samples: 60,639,865
  • test_num_samples: 64,000

30B

  • ratio_wikipedia: 20.79%
  • total_num_tokens: 30,000,000,034
  • train_num_tokens: 29,973,830,841
  • test_num_tokens: 26,169,193
  • total_num_samples: 72,728,846
  • train_num_samples: 72,664,846
  • test_num_samples: 64,000

35B

  • ratio_wikipedia: 20.35%
  • total_num_tokens: 35,000,000,468
  • train_num_tokens: 34,973,480,399
  • test_num_tokens: 26,520,069
  • total_num_samples: 84,753,828
  • train_num_samples: 84,689,828
  • test_num_samples: 64,000

License information

For CulturaX: https://huggingface.co/datasets/uonlp/CulturaX#license-information For Wikipedia: https://huggingface.co/datasets/wikimedia/wikipedia#licensing-information