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 or streaming dataset iterators, 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: You are pretraining a domain-specific language model on medical literature. Use this Skill to train a 50k BPE tokenizer on your PubMed corpus, verify the unknown-token rate is under 1%, and export 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.