You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

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

Vietnamese Tokenizer Training Corpus v1

This dataset is the training corpus used to build PaxiAI/Vietnamese-Tokenizer.

It was created by sampling and combining Vietnamese, English, and source-code datasets into an approximately 8 GiB corpus intended specifically for tokenizer training.

Its purpose is to provide a diverse and representative sample from which a Vietnamese-focused Byte-level BPE vocabulary can be learned.

Dataset Summary

The corpus contains approximately:

  • 85% Vietnamese
  • 12% English
  • 3% source code

The target serialized size was:

8 GiB

The generated corpus reached approximately that target.

Composition

Source group Approximate share
Vietnamese news 70%
Vietnamese Wikipedia 15%
English general text 12%
Source code 3%

Vietnamese News

Source:

truongpdd/vietnews-dataset

Statistics:

  • Seen rows: 1,687,301
  • Written rows: 1,687,254
  • Written bytes: 6,012,958,799
  • Skipped short rows: 47

Approximate share: 70%

Vietnamese Wikipedia

Source:

wikimedia/wikipedia
config: 20231101.vi

Statistics:

  • Seen rows: 1,035,380
  • Written rows: 1,035,370
  • Written bytes: 1,288,490,564
  • Skipped short rows: 10

Approximate share: 15%

English

Source:

HuggingFaceFW/fineweb
config: sample-10BT

Statistics:

  • Seen rows: 326,223
  • Written rows: 326,223
  • Written bytes: 1,030,792,625

Approximate share: 12%

Source Code

Code was sampled from:

openbmb/UltraData-Code
config: UltraData-Code-L3

Multiple programming-language splits were used.

Language Split Written rows Written bytes Approx. corpus share
Python py 28,414 77,309,703 0.90%
JavaScript js 30,282 51,539,834 0.60%
Java java 12,305 34,362,330 0.40%
C++ cpp 10,101 25,770,364 0.30%
Go go 10,109 21,476,238 0.25%
C# cs 4,304 12,888,110 0.15%
PHP php 3,242 12,886,646 0.15%
Rust rust 3,016 8,592,303 0.10%
Shell sh 4,027 8,591,052 0.10%
Ruby rb 1,541 2,577,622 0.03%
R r 522 1,719,273 0.02%

The code mixture intentionally assigns more weight to commonly used programming languages while retaining small samples from less frequently used languages.

Total Corpus Size

The configured target size was: 8,589,934,592 bytes

The final corpus was extremely close to this target, with small per-source overages caused by writing the last complete document rather than truncating it.

Data Format

The generated corpus uses JSON Lines.

Example:

{"text":"Việt Nam là một quốc gia ở Đông Nam Á.","source":"vi_news"}
{"text":"Artificial intelligence is changing software development.","source":"english"}
{"text":"def hello(name): return f'Hello {name}'","source":"code_py"}

Each row contains:

  • text: the text used for tokenizer training
  • source: the logical source category

Preprocessing

The corpus construction pipeline applies:

  • Unicode NFC normalization
  • CRLF/CR normalization to LF
  • removal of selected control characters
  • minimum-length filtering
  • preservation of case
  • preservation of Vietnamese diacritics

No lowercasing or accent stripping is applied.

For sources that may contain externally word-segmented Vietnamese text, underscore replacement can be enabled selectively. It is not applied globally because underscores are meaningful in source code, URLs, and identifiers.

Sampling Strategy

The source proportions were controlled by byte quotas.

For a target corpus size of 8 GiB, each source was assigned a quota proportional to its configured weight.

The process stopped reading each source when its byte quota was reached.

This approach was used to prevent very large datasets from dominating tokenizer vocabulary learning.

Resulting Tokenizer

This corpus was used to train:

PaxiAI/Vietnamese-Tokenizer

Tokenizer properties:

  • 48,000 tokens
  • Byte-level BPE
  • NFC normalization
  • no unknown token
  • Vietnamese-first vocabulary
  • English and code support

Limitations

  • Vietnamese news is the dominant source.
  • Formal written Vietnamese is more strongly represented than conversational Vietnamese.
  • The English portion is relatively small.
  • Source code represents only 3% of the corpus.
  • Dataset quality reflects the characteristics of the upstream datasets.
  • This corpus was optimized for tokenizer vocabulary learning, not for balanced knowledge pretraining.
Downloads last month
27