NZINGA TOKENIZER

Fewer tokens for African languages.

Gemma 3's tokenizer plus 32,000 African word pieces. Every existing token keeps its ID, and English barely changes.

TOKENS · SWAHILI · FLORES+ DEVTEST
TOKENIZER
TOKENS · PREMIUM
nzinga
36,583 · 1.35x
gpt-4o
39,922 · 1.49x
gemma-4
44,433 · 1.64x
gemma-3
44,433 · 1.64x
SAME 1,012 SENTENCES
8.4% FEWER TOKENS
294,145
tokens in one vocabulary
1.55x
average Tier 1 token premium
12 of 12
Tier 1 languages ahead

Four things the premium costs you.

The premium is paid on every query for a model's life. Cutting it at the tokenizer costs little.

Lower cost

At any per-token price, a message that needs fewer tokens costs less to run.

saving: 22% · Tier 1 average

Longer context

A model reads a fixed number of tokens, so more text fits.

swahili: 79,100 words · 128k window

Speed

Models write one token at a time, so replies arrive sooner.

latency: not measured · tokens only

Lifetime

A tokenizer is fixed into every model trained with it.

premium: paid every query

Load it in one line, keep every ID.

Load the JSON file with the Hugging Face tokenizers library. To use it with Gemma 3, resize the embeddings to 294,145 rows and train the new ones.

Input normalized to NFC first
Special tokens keep their original IDs
Decoding returns the original text, exactly
Python
TypeScript
cURL
count.py
from tokenizers import Tokenizer
tok = Tokenizer.from_file("gemma3-afx32k.json")
enc = tok.encode(
sequence="Hakuna kitu kama Brexit nzuri",
add_special_tokens=False,
is_pretokenized=False,
)
print(len(enc.ids), enc.tokens)

Measured, not promised.

FLORES+ devtest, 1,012 sentences per language, 3 November 2026. Method in the docs.

LANGUAGE
NZINGA
BEST OTHER
DIFFERENCE
Swahili, raw tokens
Nzinga
36,583
Best other
39,922
Difference
8.4% fewer
Hausa, raw token count
Nzinga
38,863
Best other
41,615
Difference
6.6% fewer
Yoruba, raw tokens
Nzinga
53,701
Best other
58,238
Difference
7.8% fewer
Tier 1 average token premium
Nzinga
1.55x
Best other
1.97x
Difference
21% lower
13
14
17
LANGUAGE RESULT · HAUSA

“Mawaƙin Rap yana canza sunan - zuwa Ye.”

Hausa example
NTREX-128, sentence 448
Read the Hausa result

Tokenizer, explained.

Still unsure? Paste your own sentence into the live comparison.

Which models fit it?

Gemma 3 models today. A Llama 3.1 pack exists, and Gemma 4 needs a rebuild.

Does it make a model better yet?

Not measured yet. A controlled experiment, the same Gemma 3 model trained with and without Nzinga, is built and waits for GPU time.

How was it tested?

On FLORES+ and NTREX-128, which were never used in training. Raw token counts for the same sentences, against twelve other tokenizers.

What happens to English and French text?

Almost nothing. Both stay within one to three tokens of Gemma 3, on tens of thousands, in both test sets.

Try it in your language.

Paste a sentence and see the tokens it needs.