npx skills add ...
npx skills add firecrawl/ai-research-skills --skill sentencepiece
Language-independent tokenizer treating text as raw Unicode. Supports BPE and Unigram algorithms. Fast (50k sentences/sec), lightweight (6MB memory), deterministic vocabulary. Used by T5, ALBERT, XLNet, mBART. Train on raw text without pre-tokenization. Use when you need multilingual support, CJK languages, or reproducible tokenization.
npx skills add firecrawl/ai-research-skills --skill sentencepiece
Unsupervised tokenizer that works on raw text without language-specific preprocessing.
Use SentencePiece when:
Performance:
Use alternatives instead:
Training time: ~1-2 minutes for 100MB corpus
Key principle: Treat text as raw Unicode, whitespace = ▁ (meta symbol)
Used by: mBART
Used by: T5, ALBERT, XLNet
| Language Type | Coverage | Rationale |
|---|---|---|
| English | 0.9995 | Most common chars |
| CJK (Chinese) | 1.0 | All characters needed |
| Multilingual | 0.9995 | Balance |
Use case: Data augmentation for robustness.
| Corpus | BPE (16k) | Unigram (8k) |
|---|---|---|
| 100 MB | 1-2 min | 3-4 min |
| 1 GB | 10-15 min | 30-40 min |
T5 family: t5-base, t5-large (32k vocab, Unigram)
ALBERT: albert-base-v2 (30k vocab, Unigram)
XLNet: xlnet-base-cased (32k vocab, Unigram)
mBART: facebook/mbart-large-50 (250k vocab, BPE)