Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: tokenizers
|
| 3 |
+
tags:
|
| 4 |
+
- tokenizer
|
| 5 |
+
- multilingual
|
| 6 |
+
- byte-level-bpe
|
| 7 |
+
- indigenous-languages
|
| 8 |
+
- tachiwin
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Tachiwin multilingual tokenizer
|
| 12 |
+
|
| 13 |
+
A multilingual ByteLevel-BPE tokenizer trained with Hugging Face Tokenizers.
|
| 14 |
+
|
| 15 |
+
## Corpus weighting
|
| 16 |
+
|
| 17 |
+
| Component | Target |
|
| 18 |
+
|---|---:|
|
| 19 |
+
| Modern + old exotic-language data | 70% |
|
| 20 |
+
| English | 10% |
|
| 21 |
+
| Spanish | 10% |
|
| 22 |
+
| Code | 10% |
|
| 23 |
+
|
| 24 |
+
The complete available exotic-language corpus is used as the 70% anchor.
|
| 25 |
+
Its existing modern/old composition is preserved.
|
| 26 |
+
|
| 27 |
+
## Tokenizer
|
| 28 |
+
|
| 29 |
+
- Model: BPE, trained via `Tokenizer.train_from_iterator` over a streaming
|
| 30 |
+
line generator (constant memory regardless of corpus size)
|
| 31 |
+
- Vocabulary target: 256,000
|
| 32 |
+
- Initial alphabet: complete ByteLevel alphabet
|
| 33 |
+
- ByteLevel GPT-2 regex: disabled
|
| 34 |
+
- Unicode normalizer: none
|
| 35 |
+
- Special tokens: 274
|
| 36 |
+
- Human-language tags: 240
|
| 37 |
+
|
| 38 |
+
## Corpus size
|
| 39 |
+
|
| 40 |
+
Total materialized corpus: 360,820,186 bytes (0.336 GiB)
|
| 41 |
+
|
| 42 |
+
## Evaluation
|
| 43 |
+
|
| 44 |
+
The tokenizer was evaluated against the Tachiwin language catalogue.
|
| 45 |
+
Languages without text samples are skipped. For each language, all
|
| 46 |
+
available samples are concatenated ONLY within that language for aggregate
|
| 47 |
+
fertility statistics. Metrics: characters/token, tokens/character, UTF-8
|
| 48 |
+
bytes/token, tokens/UTF-8 byte, exact round-trip preservation.
|
| 49 |
+
|
| 50 |
+
## Important training note
|
| 51 |
+
|
| 52 |
+
The Hugging Face BPE trainer does not expose an internal resumable
|
| 53 |
+
merge-state checkpoint. The recipe therefore treats the completed
|
| 54 |
+
`tokenizer.json` as the training checkpoint:
|
| 55 |
+
|
| 56 |
+
- corpus preparation is resumable (both the exotic streaming pass and the
|
| 57 |
+
capped external-corpus downloads reuse existing shards);
|
| 58 |
+
- recipe/statistics/checksums are stored in `recipe/`;
|
| 59 |
+
- if `tokenizer.json` already exists, subsequent runs skip BPE training;
|
| 60 |
+
- an interrupted BPE computation itself must be restarted.
|
| 61 |
+
|
| 62 |
+
## Repository evaluation artifacts
|
| 63 |
+
|
| 64 |
+
- evaluation/catalogue.json
|
| 65 |
+
- evaluation/language_fertility.csv
|
| 66 |
+
- evaluation/language_fertility.json
|
| 67 |
+
- evaluation/evaluation_summary.json
|