Agent skill · Design & Presentation

tokenizer-design

BPE, WordPiece, SentencePiece, and Unigram tokenizer training, vocabulary optimization, domain extension, and multilingual design.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill tokenizer-design --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/ai-ml/tokenizer-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Tokenizer Design ## When to Use Design or modify tokenizers when training a model from scratch, adapting a model to a new domain/language with poor tokenization coverage, or optimizing inference efficiency via vocabulary tuning. ## Algorithm Selection ### Decision Table: Tokenizer Algorithm | Algorithm | Library | Strengths | Weaknesses | Best For | |-----------|---------|-----------|------------|----------| | BPE | tokenizers, tiktoken | Deterministic, widely adopted | Greedy merges can miss global optima | GPT-family, general LLMs | | WordPiece | tokenizers | Likelihood-driven merges | Slower training than BPE | BERT-family models | | Unigram | SentencePiece | Probabilistic, multiple segmentations | More complex implementation | Multilingual, T5/XLNet | | SentencePiece (BPE) | sentencepiece | Language-agnostic, raw text input | Less control over pre-tokenization | Multilingual, non-space languages | | Byte-level BPE | tokenizers | No UNK tokens, full coverage | Longer sequences for non-Latin scripts | GPT-2/3/4, Llama | ### Decision Table: Vocabulary Size | Vocab Size | Token Fertility | Training Cost | Best For | |------------|----------------|---------------|----------| | 8K-

What's inside
Steps it walks through
  1. When to Use
  2. Algorithm Selection
  3. Decision Table: Tokenizer Algorithm
  4. Decision Table: Vocabulary Size
  5. Training BPE from Scratch
  6. Using HuggingFace tokenizers Library
  7. SentencePiece Training
  8. Extending an Existing Tokenizer
  9. Adding Domain-Specific Tokens
  10. Fertility Analysis
  11. Measuring Tokenizer Efficiency
  12. Gotchas and Anti-Patterns
  13. Vocab Size vs. Performance Tradeoffs
  14. Special Token Handling
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the tokenizer-design skill do?

BPE, WordPiece, SentencePiece, and Unigram tokenizer training, vocabulary optimization, domain extension, and multilingual design.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill tokenizer-design --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going