# What is SentencePiece? Definition and meaning

A library that trains subword tokenizers directly from raw text, without pre-splitting into words.

## Definition

**SentencePiece**: A library that trains subword tokenizers directly from raw text, without pre-splitting into words.

In short: Language-independent tokenizer library.

## When it is used

Tokenizers for multilingual and domain-specific models.

## Learn more

The full guide to **[SentencePiece](/tools/sentencepiece)** explains how it works, when to use it and how it compares with the alternatives, with examples. The [glossary](/glossary) lists every term on the site from A to Z.

Previous term: [Semi-supervised learning](/glossary/semi-supervised-learning) · Next term: [SFT](/glossary/sft)
