vt-llm Tokenizer

Hugging Face fast tokenizer for vt-llm. Its ByteLevel BPE vocabulary contains 49,152 entries, including eight special tokens. It preserves Unicode, case, indentation and line endings.

Directory contents

File Purpose
tokenizer.json ByteLevel BPE vocabulary, merge rules and encoding/decoding pipeline
tokenizer_config.json Transformers fast tokenizer settings
special_tokens_map.json Padding, EOS and chat marker definitions
chat_template.jinja Formatting for text messages with system, user, assistant and tool roles
LICENSE MIT license
README.md File reference and usage

Local usage

Install Transformers 4.57.6, Tokenizers 0.22.2 and Jinja2 3.1.6:

python -m pip install transformers==4.57.6 tokenizers==0.22.2 jinja2==3.1.6

Run from this directory:

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    ".", local_files_only=True, trust_remote_code=False
)
text = "Привет, мир!\n\tprint('Hello')"
ids = tokenizer.encode(text, add_special_tokens=False)
assert tokenizer.decode(ids, skip_special_tokens=False) == text

messages = [{"role": "user", "content": "Привет!"}]
prompt_ids = tokenizer.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True
)

Use the direct encode call for plain text and base model continuations. Use the chat template for a compatible instruct model. The exact chat and padding marker strings are reserved.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including vt244/vt-llm-1b-v1-tokenizer