Request access to the Yak Corpus

Every request is reviewed by hand. Please fill in all fields.

By requesting access you agree to the Terms of Use on this page: you will follow the license of every part of the corpus, including attribution and share-alike; you will not use it to identify, profile or harm people; you will not redistribute it as a whole or in parts without these terms; you will delete documents we remove in later versions; and you accept that the corpus is provided as is, without warranty, and that access may be revoked if these terms are broken.

Log in or Sign Up to review the conditions and access this dataset content.

Yak Corpus

A cleaned, deduplicated, Nepali-first text corpus: about 10 million documents and 36 GB of UTF-8 text in Nepali, Romanized Nepali, other languages of Nepal and the region, Hindi, English, code and math. It is the corpus behind the Yak tokenizer, released for research on Nepali and related languages.

Access is gated: you must log in, agree to the Terms of Use and wait for manual approval.

Contents

Config What it holds Documents Text (MB)
npi_web Nepali web text 5,858,607 28,991
npi_formal Nepali news, reference and literary text 2,246,328 1,620
npi_everyday Short informal Nepali 4,070 17
npi_latn Romanized Nepali 472,547 209
nepal_public Nepal place names and public-service phrasing 23,608 29
nepal_langs Awadhi, Bhojpuri, Doteli, Limbu, Maithili, Newar, Sanskrit, Santali, Sherpa, Tharu, Tibetan, plus Athpariya, Dhimal, Gurung, Kulung, Kayort, Lohorung, Magar, Sampang, Sunuwar, Tamang 163,129 614
hin Hindi 560,770 967
eng English 410,383 1,998
code Source code under permissive licenses 193,777 1,147
math Mathematical text 154,832 833
all 10,088,051 36,425

Text size is UTF-8 bytes before compression; the files on the Hub take about 8 GB.

Languages

  • Nepali: Devanagari and Romanized
  • Other languages of Nepal and the region: Athpariya, Awadhi, Bhojpuri, Dhimal, Doteli, Gurung, Kayort, Kulung, Limbu, Lohorung, Magar, Maithili, Newar, Sampang, Sanskrit, Santali, Sherpa, Sunuwar, Tamang, Tharu, Tibetan
  • Also: Hindi, English, code and math

Some of the community-language sets (mtp_*, mt_text_dhimal) are small: a few hundred to a few thousand documents each, mostly translated religious text. Their licenses restrict use to your own research; do not pass them on.

Format

data/<config>/<source>/part-NNNNN.jsonl.zst

Each line is one document: {"text": "...", "id": "..."}. Text is UTF-8 and NFC-normalized.

Load

After your request is approved, log in (hf auth login) and run:

from datasets import load_dataset

nepali = load_dataset("freaktopus/yak-corpus", "npi_formal", split="train")
everything = load_dataset("freaktopus/yak-corpus", "all", split="train", streaming=True)

Or download the files: hf download freaktopus/yak-corpus --repo-type dataset --local-dir yak-corpus.

How it was cleaned

  • Unicode NFC; control characters, stray zero-width and bidi marks removed.
  • Nepali typed in legacy fonts (Preeti family) converted to Unicode.
  • Boilerplate lines (share buttons, footers, cookie notices) removed.
  • Quality filters for length, script ratio, symbols, digits, broken encoding and repetition.
  • Exact-document and long-paragraph deduplication across sources.
  • Documents overlapping the evaluation sets of the Yak benchmark removed.

The mtp_* and mt_text_dhimal sets and previllage_gov were added without the full cleaning pipeline above; check them before using them for anything beyond research.

Reproducing the Yak tokenizers

Everything needed to rebuild the tokenizers from this corpus, with the code in Ampixa/yak-token:

  • data/ is the cleaned corpus (all of it, v1 and v2.0 inputs).
  • repro/counts.tar: the pretoken counts built from data/ (what training reads).
  • repro/clean_v20.tar: the scrubbed minority-language text used for v2.0.
  • repro/eval_nepal_langs.tar: the held-out Nepal-language evaluation sets.

Unpack the three archives into the data/ folder of the code repository, then follow its docs.

Terms of Use

  1. Every part of the corpus keeps the license of its source (see below). You must follow it, including attribution and share-alike where they apply.
  2. Do not use the corpus to identify, profile, track or harm individuals, or for any unlawful purpose.
  3. Do not redistribute the corpus, in whole or in large parts, without these terms and the source licenses.
  4. If we remove documents in a later version (for example after a removal request), delete them from your copies too. To request a removal, open a discussion on this page.
  5. The corpus is provided as is, without warranty of any kind. Web text can contain errors, offensive content and personal information.
  6. Access may be revoked if these terms are broken.

Sources and licenses

Source License Configs
FineWeb-2 ODC-By 1.0 (Common Crawl terms) npi_web, npi_latn, nepal_langs
Sangraha CC BY 4.0 npi_web
HPLT 2.0 CC0 1.0 npi_web
IndicCorp v2 CC0 1.0 npi_formal, hin
Wikipedia CC BY-SA (3.0/4.0), GFDL npi_formal, hin, nepal_langs
Wikisource, Wiktionary CC BY-SA, GFDL, public domain npi_formal, nepal_langs
Sentiment-Analysis-Nepali MIT npi_everyday
Nepali-Flow-Roman CC BY 4.0 npi_latn
Nepali-Roman-Transliteration MIT npi_latn
nepglish-banking-dataset Apache 2.0 npi_latn
local-states-nepal MIT nepal_public
Community-language text (mtp_*, mt_text_dhimal) Various; some terms do not permit redistribution. Research use only, do not pass on nepal_langs
Government public-service pages (previllage_gov) CC BY 4.0 for the compilation; page text keeps the terms of each site nepal_public
Synthetic text and romanization by Ampixa Labs Apache 2.0 (romanized text keeps the license of its source) nepal_public, npi_latn
FineWeb-Edu ODC-By 1.0 eng
DCLM baseline CC BY 4.0 eng
FineMath ODC-By 1.0 math
OpenWebMath ODC-By 1.0 math
github-code-clean MIT, Apache 2.0, BSD, ISC, CC0, Unlicense (per file) code
The Stack smol-XL, the-stack-yaml-k8s The Stack terms of use (permissive licenses only) code
Downloads last month
17,116