Downloads · 30 days
0
BreadLoveCarrot-v2/pocket-tts-tokenizer-4k
pocket-tts-tokenizer-4k is a machine learning model from BreadLoveCarrot-v2. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
A repackaging of the official [kyutai/pocket-tts-without-voice-cloning] (https://huggingface.co/kyutai/pocket-tts-without-voice-cloning) tokenizer.model (SentencePiece BPE, vocab=4000) as a complete HuggingFace tokeni…
Downloads · 30 days
0
Access
Public
Updated May 27, 2026
Repo size
59.3 KB
Likes
0
Public
Click a slice to open those files.
.json247 KB · 79%
From the Hugging Face model README
A repackaging of the official [kyutai/pocket-tts-without-voice-cloning]
(https://huggingface.co/kyutai/pocket-tts-without-voice-cloning) tokenizer.model (SentencePiece BPE,
vocab=4000) as a complete HuggingFace tokenizer directory so it can be loaded
directly by name with the default fast path:
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("BreadLoveCarrot-v2/pocket-tts-tokenizer-4k") # use_fast=True is fine
ids = tok.encode("Hello, world!", add_special_tokens=False)
text = tok.decode(ids)
The original kyutai release ships only the raw SentencePiece binary
(tokenizer.model), which is NOT directly loadable by
AutoTokenizer.from_pretrained(...) because it is missing:
tokenizer_config.json (declares which tokenizer class to instantiate)special_tokens_map.jsontokenizer.json (the fast HF JSON model spec)This repo wraps the original SP model as LlamaTokenizerFast — LLaMA's
tokenizer has the same shape (SP-BPE + byte_fallback + <unk>=0, <s>=1, </s>=2, <pad>=3 as the first four pieces).
transformers' built-in SP → fast-BPE converter has a known bug for
case-preserving SP models whose vocab contains leading-uppercase pieces
like ▁Hello, ▁STOP, ▁D, ▁S: it over-splits them into byte-fallback
pieces (e.g. "Hello" → ['H','el','lo'] instead of ['▁Hello']). The
original LLaMA tokenizer doesn't trip this because its training corpus
rarely produced such pieces. Pocket TTS does.
This repo sidesteps the converter entirely: the tokenizer.json is built
directly from the SP proto using the Unigram model (with per-piece SP
scores) + byte fallback. SP-BPE inference is greedy-by-score and Unigram
is Viterbi-by-score; for this model they produce identical segmentation,
byte-for-byte (verified on a battery of edge cases including mixed case,
Unicode, emoji, and contractions).
| Source | kyutai/pocket-tts-without-voice-cloning@d4fdd22ae8c8e1cb3634e150ebeff1dab2d16df3 |
| Algorithm | SentencePiece BPE (packaged as Unigram for byte-identical fast inference) |
| Vocab size | 4000 (4 specials + 256 byte-fallback slots + 3740 learned pieces) |
| Byte fallback | ✅ Yes — never emits <unk> for unseen characters (emoji, rare Unicode, etc.) |
| Special tokens | <unk>=0, <s>=1, </s>=2, <pad>=3 |
| Normalization | identity (no NFKC, no whitespace squashing); SP add_dummy_prefix=True is replicated as Prepend('▁') + Replace(' ', '▁') |
| Case-preserving | ✅ Yes ("FBI" ≠ "fbi") |
| HF wrapper | LlamaTokenizerFast |
| BOS/EOS | NOT auto-prepended (add_bos_token=False, add_eos_token=False) — the model handles those |
The underlying tokenizer.model is © kyutai and licensed under the terms of
the kyutai/pocket-tts-without-voice-cloning
repo. This repository only repackages it for convenience and does not modify
the tokenizer in any way.
You can verify the SP model is byte-identical to the upstream release by
comparing the SHA-256 of tokenizer.model to the original kyutai blob at
revision d4fdd22ae8c8e1cb3634e150ebeff1dab2d16df3.