# sentencepiece

Unsupervised text tokenizer for Neural Network-based text generation.

Canonical page: https://www.reposhelf.co.uk/projects/github/google/sentencepiece.html

- Project ID: google/sentencepiece
- Source: GitHub
- Original project: https://github.com/google/sentencepiece
- Description attribution: project author metadata
- Categories: AI &amp; machine learning
- Technologies: Not recorded
- Licence: Apache-2.0
- Repository availability checked: 2026-11-23T13:26:13.333Z
- Demo page loaded: 2026-11-23T16:27:42.484Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> SentencePiece is a fast, lightweight, and unsupervised text tokenizer and detokenizer designed for neural network-based text generation systems \(such as Large Language Models\) where the vocabulary size is fixed prior to training.

> It implements subword units—including Byte-Pair-Encoding \(BPE\) \[Sennrich et al.\] and the unigram language model \[Kudo.\]—with the ability to train directly from raw sentences. By treating input text as a raw sequence of Unicode characters, SentencePiece enables a purely end-to-end, language-independent pipeline that completely eliminates the need for language-specific pre- or post-processing.

> While the core tokenization \(C++ or Rust\) runs in parallel, the final step of converting the native results \(C++ vector of vectors or Rust vector of vectors\) into Python objects \(list\[list\[int\]\] or list\[Encoding\]\) is sequential and must be done on Python's main thread \(GIL-locked\). At high thread counts, this single-threaded serialization step becomes the dominant bottleneck, capping the scaling performance.



## Author-documented requirements and audience

> SentencePiece is a fast, lightweight, and unsupervised text tokenizer and detokenizer designed for neural network-based text generation systems \(such as Large Language Models\) where the vocabulary size is fixed prior to training.

> SentencePiece is a fast, lightweight, and unsupervised text tokenizer and detokenizer designed for neural network-based text generation systems \(such as Large Language Models\) where the vocabulary size is fixed prior to training.



Not recorded: Account, External API key, Paid service, Self-hosting. Missing information does not mean there are no requirements.

Source: https://github.com/google/sentencepiece/blob/master/README.md

Extraction checked: 2026-10-29T00:06:51.004Z

Last recorded source update: 2026-11-16T14:26:01.000Z

Saved release: v0.2.2 — 2026-07-12T07:12:52.000Z. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=google%2Fsentencepiece). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
