Sentencepiece
Language-independent tokenizer that trains on raw Unicode text using BPE or Unigram algorithms.
- CCM score
- 61 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 14.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers training, encoding, and decoding with Python and command-line workflows, including
spm_trainand subword regularization - Includes character coverage guidance for English, CJK, and multilingual corpora, plus T5-style special-symbol configuration
- Treats whitespace as a
▁meta symbol so decoding restores spacing exactly and vocabularies stay deterministic - Designed for multilingual models, CJK text, and reproducible tokenization, with integration into transformers via T5Tokenizer
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill sentencepiece -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
SentencePiece - Language-Independent Tokenization
Unsupervised tokenizer that works on raw text without language-specific preprocessing.
When to use SentencePiece
Use SentencePiece when:
- Building multilingual models (no language-specific rules)
- Working with CJK languages (Chinese, Japanese, Korean)
- Need reproducible tokenization (deterministic vocabulary)
- Want to train on raw text (no pre-tokenization needed)
- Require lightweight deployment (6MB memory, 50k sentences/sec)
Performance:
- Speed: 50,000 sentences/sec
- Memory: ~6MB for loaded model
- Languages: All (language-independent)
Use alternatives instead:
- HuggingFace Tokenizers: Faster training, more flexibility
- tiktoken: OpenAI models (GPT-3.5/4)
- BERT WordPiece: English-centric tasks
Quick start
Installation
# Python
pip install sentencepiece
# C++ (requires CMake)
git clone https://github.com/google/sentencepiece.git
cd sentencepiece
mkdir build && cd build
cmake .. && make -j $(nproc)
sudo make install
Train model
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- AI Agents & LLM Apps, Data Science & Analytics
- First seen
- Jun 3, 2026
Questions
What does the sentencepiece skill do?
The sentencepiece skill teaches an agent to train and use SentencePiece, a language-independent tokenizer that treats text as raw Unicode. It supports the BPE and Unigram algorithms and can train on raw text without pre-tokenization. Use it when you need multilingual support, CJK language handling, or reproducible tokenization.
How do I install the sentencepiece skill?
Run npx -y skills add orchestra-research/ai-research-skills --skill sentencepiece -y in a project to install the sentencepiece skill. Once installed, the agent can train, encode and decode text with SentencePiece models.
Which category does the sentencepiece skill belong to?
The sentencepiece skill is listed in the AI Agents & LLM Apps category on Claude Marketplaces. Its SKILL.md notes that T5, ALBERT, XLNet and mBART use SentencePiece tokenization.
What does the sentencepiece skill need to run?
The sentencepiece skill relies on the sentencepiece Python package and the transformers library, as listed in its dependencies. Training a model also needs a plain text corpus file as input.
More from orchestra-research/ai-research-skills
All 92- Evaluating Code Models1.1K
- Distributed Llm Pretraining Torchtitan1.1K
- Mamba Architecture1.1K
- Openrlhf Training1.1K
- Sparse Autoencoder Training1.1K
- Llamaindex1.1K
- Ml Training Recipes1.1K
- Outlines1.1K
- Simpo Training1.1K
- Slime Rl Training1.1K
- Training Llms Megatron1.1K
- Guidance1.1K
- Nnsight Remote Interpretability1.1K
- Rwkv Architecture1.1K
- Implementing Llms Litgpt1.1K
- Llamaguard1.1K
- Nemo Guardrails1.1K
- Llava1.1K
- Blip 2 Vision Language1.1K
- Miles Rl Training1.1K
- Nemo Evaluator Sdk1.1K
- Torchforge Rl Training1.1K
- Autogpt Agents1.1K
- Constitutional Ai1.1K
Similar to Sentencepiece
More AI Agents & LLM Appshuggingface-tokenizersSkillorchestra-research/ai-research-skills1.1K installsFast Rust-based tokenizers for BPE, WordPiece, and Unigram, covering pretrained loading and custom training.
tokenizationPluginOrchestra-Research/AI-Research-SKILLs14.8K starsText tokenization for LLMs including HuggingFace Tokenizers and SentencePiece. Use when training custom tokenizers or handling multilingual text.
nlp-natural-language-processingSkillmindrally/skills1K installsExpert NLP development guidance covering transformers, spaCy, NLTK, and modern embedding and generation techniques.
embedding-strategiesSkillwshobson/agents12.1K installsGuide for choosing and tuning embedding models and chunking strategies in semantic search and RAG pipelines.
humanizerSkilldaleseo/korean-skills4K installsKorean-text humanizer that detects 40 AI writing patterns and rewrites output to read like human writing, grounded in KatFishNet linguistics research.
train-sentence-transformersSkillhuggingface/skills1.8K installsGuided training for sentence-transformers bi-encoders, cross-encoders, sparse, and multi-vector models with production-ready templates.