What problem does it solve? Tokenizing large text corpora with pure Python implementations is slow, and building custom vocabularies for domain-specific or multilingual models requires deep knowledge of subword algorithms. This Skill provides guidance for using the Rust-based HuggingFace Tokenizers library to tokenize 1GB of text in under 20 seconds and train custom tokenizers from scratch. ## Core Features & Use Cases - High-Performance Tokenization: Encode text at roughly 4GB per minute using the Rust core, with batch encoding, padding, truncation, and multi-processing support. - Custom Tokenizer Training: Train BPE, WordPiece, or Unigram tokenizers on files, iterators, or streaming datasets with configurable vocabulary size, special tokens, and normalization pipelines. - Alignment Tracking & Transformers Integration: Map tokens back to original character offsets for NER and QA tasks, and wrap custom tokenizers with PreTrainedTokenizerFast for use with any transformers model. - Use Case: Train a 30k-vocabulary BPE tokenizer on a domain corpus, add BERT-style [CLS]/[SEP] post-processing, then load it via AutoTokenizer to feed a downstream classification model. ## Quick Start Ask the AI to train a BPE tokenizer with a 30,000-token vocabulary on your corpus file and show how to encode a sample sentence with padding enabled.