Byte-level BPE tokenizer (32k vocab, C4)
Byte-level BPE tokenizer with a 32,000-token vocabulary, trained on 1,000,000 English documents streamed from allenai/c4 (config en, split train).
Details
- Algorithm: byte-level BPE with GPT-2-style ByteLevel pre-tokenization (
add_prefix_space=True) and ByteLevel decoder - Vocabulary: 32,000 tokens (includes special tokens
<pad><unk><bos><eos>) - Training data: 1,000,000 documents,
allenai/c4en/train, streamed in order min_frequency: 2- Files:
tokenizer.json,vocab.json,merges.txt,tokenizer_config.json
Usage
from tokenizers import Tokenizer
tok = Tokenizer.from_pretrained("pngwn/ml-eval-c4-tokenizer-538578-r0")
enc = tok.encode("Byte-level BPE trained on C4!")
print(enc.ids, tok.decode(enc.ids))
Also loadable as a transformers tokenizer (PreTrainedTokenizerFast), since tokenizer_config.json is included.
Training
Trained with Hugging Face tokenizers==0.23.3 and datasets==5.1.0 in ~3 minutes on 8 vCPUs (134s to stream 1M docs at ~7.5k docs/s, 169s BPE training). Decode round-trip verified after training and after upload.
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support