multilingual_addition_tokenizers_minimal
Collection
3 items • Updated
A Byte-Level BPE tokenizer trained on ['arb_Arab', 'ces_Latn', 'cmn_Hani', 'dan_Latn', 'deu_Latn', 'ell_Grek', 'fra_Latn', 'eng_Latn', 'hun_Latn', 'ind_Latn', 'ita_Latn', 'jpn_Jpan', 'nld_Latn', 'pol_Latn', 'por_Latn', 'rus_Cyrl', 'spa_Latn', 'swe_Latn', 'tur_Latn', 'vie_Latn', 'digit'] data from Fineweb-2-HQ.
| Parameter | Value |
|---|---|
| Algorithm | Byte-Level BPE |
| Language | ['arb_Arab', 'ces_Latn', 'cmn_Hani', 'dan_Latn', 'deu_Latn', 'ell_Grek', 'fra_Latn', 'eng_Latn', 'hun_Latn', 'ind_Latn', 'ita_Latn', 'jpn_Jpan', 'nld_Latn', 'pol_Latn', 'por_Latn', 'rus_Cyrl', 'spa_Latn', 'swe_Latn', 'tur_Latn', 'vie_Latn', 'digit'] |
| Target Vocab Size | 2,000 |
| Final Vocab Size | 2,000 |
| Pre-tokenizer | custom:addition_split_on_hyphen |
| Number handling | ltr_3digit |
| Contraction handling | False |
| Normalizer | NFC |
| Special Tokens | <s>, </s>, <pad>, <unk> |
| Training Shards | 42, ['train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl', 'train.chunk.00.jsonl', 'val.chunk.00.jsonl'] |
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("flexitok/maddition_AllL_2000_minimal")
tokens = tokenizer.encode("Hello, world!")
tokenizer.json — Full HuggingFace tokenizervocab.json — Vocabulary mappingmerges.txt — BPE merge rules| Text | Tokens | Token IDs |
|---|---|---|
22+9=31\nyirmi iki+dokuz=otuz bir\ntwenty two+nine=thirty one |
22, +, 9, =, 3, 1, \, ny, ir, mi, Ä , iki, +, dokuz, =, otuz, Ä , bir, \, n |
1827, 13, 27, 31, 21, 19, 62, 533, 505, 667, 223, 723, 13, 718, 31, 1105, 223, 855, 62, 80 |
Command used to create this tokenizer:
['/home/gsa/tokenizers2/flexitok/tokenizer_training/train_tokenizers.py', 'algorithm=bpe', 'vocab_size=2000', 'langs=[arb_Arab,ces_Latn,cmn_Hani,dan_Latn,deu_Latn,ell_Grek,fra_Latn,eng_Latn,hun_Latn,ind_Latn,ita_Latn,jpn_Jpan,nld_Latn,pol_Latn,por_Latn,rus_Cyrl,spa_Latn,swe_Latn,tur_Latn,vie_Latn,digit]', 'data_dir=/scratch/gsa/data/multilingual-addition/', 'output_dir=/scratch/gsa/trained_tokenizers/multilingual_addition', 'pretokenizer=custom:addition_split_on_hyphen', 'number_handling=ltr_3digit', 'add_numbers=false', 'handle_contractions=false', 'unicode_normalization=nfc', 'use_byte_level_regex=false', 'byte_fallback=false', 'strip_zero_width=false', 'cjk_char_split=true', 'add_cjk_chars=false', 'max_lines=-1', 'test_string=22+9=31\\nyirmi iki+dokuz=otuz bir\\ntwenty two+nine=thirty one', 'hf.publish_to_hf=true', 'hf_repo_prefix=flexitok/', 'hf.hf_repo_id=flexitok/maddition_AllL_2000_minimal', 'hf.collections=[flexitok/multilingual_addition_tokenizers_minimal]']