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-Speed 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 and special tokens. - 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: You are building a domain-specific language model on medical literature. Train a 50k-vocabulary BPE tokenizer on your PubMed corpus, verify the unknown-token rate is under 1%, then save it in transformers format alongside your model. ## Quick Start Ask the agent to train a BPE tokenizer with a 30,000-token vocabulary on your corpus file and show the tokenized output for a sample sentence.