---
license: mit
language:
- jpn
tags:
- tokenizer
- bpe
- flexitok
- fineweb2
---
# Byte-Level BPE Tokenizer: ['jpn_Jpan'] (8K)
A **Byte-Level BPE** tokenizer trained on **['jpn_Jpan']** data from Fineweb-2-HQ.
## Training Details
| Parameter | Value |
|-----------|-------|
| Algorithm | Byte-Level BPE |
| Language | `['jpn_Jpan']` |
| Target Vocab Size | 8,000 |
| Final Vocab Size | 9,021 |
| Pre-tokenizer | custom:jpn_Jpan |
| Number handling | ltr_3digit |
| Contraction handling | False |
| Normalizer | NFC |
| Special Tokens | ``, ``, ``, `` |
| Training Shards | 2, ['fineweb_2_hq.jpn_Jpan.chunk.00.jsonl', 'fineweb_2_hq.jpn_Jpan.chunk.01.jsonl'] |
## Usage
```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("flexitok/bpe_ltr_jpn_Jpan_8000_v3")
tokens = tokenizer.encode("Hello, world!")
```
## Files
- `tokenizer.json` — Full HuggingFace tokenizer
- `vocab.json` — Vocabulary mapping
- `merges.txt` — BPE merge rules
## Sample Encoding
| Text | Tokens | Token IDs |
|------|--------|-----------|
| `Hello, world! 12345 This is a test. こんにちは` | `H, ell, o, ,, Ġw, or, ld, !, Ġ, 123, 45, ĠT, h, is, Ġis, Ġa, Ġt, est, ., Ġãģĵ` | `42, 4980, 81, 14, 2117, 953, 5795, 3, 223, 8006, 4690, 1611, 74, 1257, 4909, 2412, 1086, 3761, 16, 4547` |
Command used to create this tokenizer:
```bash
['/home/gsa/tokenizers2/flexitok/tokenizer_training/train_tokenizers.py', 'algorithm=bpe', 'vocab_size=8000', 'langs=[jpn_Jpan]', 'pretok_behavior=isolated', 'data_dir=/scratch/gsa/data/flexitok/', 'output_dir=/scratch/gsa/trained_tokenizers', 'pretokenizer=custom:jpn_Jpan', 'number_handling=ltr_3digit', 'add_numbers=true', 'handle_contractions=false', 'unicode_normalization=nfc', 'use_byte_level_regex=false', 'byte_fallback=false', 'strip_zero_width=false', 'cjk_char_split=false', 'cjk_char_coverage=0.999', 'add_cjk_chars=true', 'max_han_run=16', 'max_lines=1_000_000', 'hf.publish_to_hf=true', 'hf_repo_prefix=flexitok/', 'hf.hf_repo_id=flexitok/bpe_ltr_jpn_Jpan_8000_v3', 'hf.collections=[flexitok/fineweb2-hq-tokenizers-v3,flexitok/8000-vocab-v3]']