Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

SentencePiece

Unsupervised text tokenizer and detokenizer from Google for natural language processing.

Prompts, structured output and evalsPYPI

GitHubWebsite

1. License

License from PyPI license expression.

github.com/google/sentencepiece

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What SentencePiece does

Unsupervised text tokenizer and detokenizer from Google for natural language processing.

SentencePiece popularity

65 / 100
Gid Score, #663 overall
7.2M
downloads a week, pypi
12.2K
GitHub stars
5
agent projects use it
SentencePiece: downloads per weekPyPI, sentencepiece 7,080,025
SentencePiece: GitHub starsgoogle/sentencepiece 12,179

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How SentencePiece is used

  • SentencePiece is a dependency in 5 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 204 projects, and what it is used with below comes from all of them.
  • The most used alternative in our scan is tiktoken (Python) (58 projects).
  • Projects that use it most often also use NumPy (89.2%), Hugging Face Transformers (84.8%), pandas (83.3%).

Often used with

In 89.2% of its projects
In 84.8% of its projects
In 83.3% of its projects
In 82.4% of its projects
In 80.9% of its projects
In 77.0% of its projects
In 76.5% of its projects
In 74.5% of its projects

More about SentencePiece

Agent Skills for it
  • sentencepiece: Language-independent tokenizer treating text as raw Unicode. Supports BPE and Unigram algorithms. Fast (50k sentences/sec), lightweight (6MB

See all

More in Prompts, structured output and evals

Alternatives

SentencePiece This page

Apache-2.0Gid 657.2M/wk

tiktoken (Python)

Fast BPE tokenizer for OpenAI models enabling accurate token counting and text splitting.

MITGid 8156.1M/wk

tokenizers

Fast NLP tokenizer library by Hugging Face for text processing.

Apache-2.0Gid 7755.6M/wk

Compare SentencePiece with another tool

Get started

Install it.

pip install sentencepiece

No step-by-step start for SentencePiece yet: we have not written its hand-checked card.