Downloads · 30 days
0
dar5115/NLP_BPE
NLP_BPE is a machine learning model from dar5115. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
BPE tokenizer trained on Russian RIA.ru corpus with vocabulary size 32000
Downloads · 30 days
0
Access
Public
Updated Nov 8, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json540 KB · 58%
From the Hugging Face model README
BPE tokenizer trained on Russian RIA.ru corpus with vocabulary size 32000
[UNK], <NUM>, <URL>, <EMAIL>from tokenizers import Tokenizer
# Загрузка токенизатора напрямую
tokenizer = Tokenizer.from_file("vocab.json")
# Или через transformers
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bpe-tokenizer-ru-32000")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bpe-tokenizer-ru-32000")
text = "Пример текста для токенизации"
tokens = tokenizer.tokenize(text)
print(tokens)
# Или для получения IDs
input_ids = tokenizer.encode(text)
print(input_ids)
vocab.json - словарь токеновmerges.txt - правила слияния BPEtokenizer_config.json - конфигурация токенизатораОбучено на корпусе RIA.ru
MIT