Salesforce/wikitext
Viewer • Updated • 3.71M • 2.18M • 859
Byte-level BPE tokenizer for English + Russian, trained from scratch on wikitext-103, multi_news and the Russian news corpus gazeta. Vocabulary size: 250,000 tokens.
<s>, <pad>, </s>, <unk>, <mask>from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("MadSensiro/MadTokenizer-250K")
for s in ("Привет, мир! Как дела сегодня?",
"Hello, world! How are you today?"):
ids = tok(s).input_ids
print(tok.convert_ids_to_tokens(ids))
The tokenizer is byte-level, so it handles arbitrary text (unicode, spaces,
emojis) without producing <unk>, because every byte sequence is decodable.
config.json # model config + metadata
tokenizer.json # serialized fast tokenizer (loaded by HF)
tokenizer_config.json # tokenizer options
special_tokens_map.json # special token mapping
vocab.json # token -> id
merges.txt # BPE merge rules
Trained with the Hugging Face tokenizers
library (BpeTrainer, ByteLevel pre-tokenizer, min_frequency=2).
BPE uses a leading whitespace marker (Ġ) for beginning-of-word tokens, so
decode of a standalone string may prepend a space — this is standard GPT-2
behavior and expected.