What problem does it solve? Tokenizing large text corpora in pure Python is slow, and building custom vocabularies for domain-specific or multilingual models requires deep knowledge of subword algorithms. This Skill provides production-ready guidance for the HuggingFace Tokenizers library, which tokenizes 1GB of text in under 20 seconds using a Rust core. ## Core Features & Use Cases - Custom Tokenizer Training: Train BPE, WordPiece, or Unigram tokenizers from scratch on files or streaming dataset iterators, with configurable vocabulary size, special tokens, and normalization pipelines. - Alignment Tracking: Map every token back to its character offsets in the original text, essential for NER, question answering, and token classification tasks. - Transformers Integration: Wrap custom tokenizers with PreTrainedTokenizerFast so they work with AutoTokenizer, padding, truncation, and tensor outputs. - Use Case: You are building a medical language model and need a domain-specific vocabulary. Train a 50k BPE tokenizer on a PubMed corpus, verify the unknown-token rate is under 1%, then save it alongside your model for reproducible inference. ## 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.