LabscoMCP early access ↗
Orchestra-Research avatar✓ Official

sentencepiece

Local tool required★ 13k on GitHub
part of orchestra-research/ai-research-skillsby orchestra-research

Chopping text into pieces normally starts by splitting on spaces, which falls apart for Chinese, Japanese and Korean, where there are none; this works straight off the raw characters instead, so one method covers every language.

WHEN TO USE

SCOPE

USE FOR

  • Train a reproducible, deterministic vocabulary from raw text with no pre-tokenization step.
  • Tokenize Chinese, Japanese, or Korean text without word-segmentation rules.
  • Match the exact tokenizer used by T5, ALBERT, XLNet, or mBART.
  • Add data augmentation by sampling different valid tokenizations of the same sentence.

NOT FOR

  • Use HuggingFace Tokenizers instead for faster training and more flexibility.
  • Use tiktoken instead for OpenAI's GPT-3.5 or GPT-4 models.
  • Use BERT WordPiece instead for English-centric tasks.