Blog · Engineering
Why we report bits per byte
Perplexity cannot compare a 32,000-token Kiswahili vocabulary with a 256,000-token multilingual one. Bits per byte can, so it is the number the KW5 evaluation leads with.

The September evaluation of KW5 compares nine models on Kiswahili. Seven completed. Their vocabularies run from 32,000 tokens (KW5) to 256,008 (XGLM-564M), and that one fact decides which numbers can be put side by side.
What perplexity measures, and what it does not
#Perplexity is the exponentiated average loss per token. A model with a large vocabulary cuts the same sentence into fewer, longer tokens, so each prediction carries more of the text and the per-token loss is not the same quantity as a small-vocabulary model's. Comparing the two is comparing distances measured in different units.1
A byte is the same unit for every model. Sum the loss over a document in bits, divide by the document's length in UTF-8 bytes, and the result no longer depends on how the tokenizer cut it up:
where is the number of tokens the model's own tokenizer produced, is its mean loss per token, and is the byte count of the text, which is identical for every model.
The September numbers, worked
#For the 149M base model the run records a mean loss of 3.1705 nats over 64,937 tokens of held-out text, and the text is 320,701 bytes:
import math
mean_loss_nats = 3.1704845 # results.csv: lm_loss
tokens = 64_937 # results.csv: ppl_tokens
text_bytes = 320_701 # manifest.json: bpb_bytes
bits = mean_loss_nats * tokens / math.log(2)
print(round(bits / text_bytes, 4)) # 0.9262The same computation over the same 120 documents gives the column below. Vocabulary size is shown so the reader can see what perplexity would have been confounded with.
| Model | Vocabulary | Bits per byte |
|---|---|---|
| KW5-149M | 32,000 | 0.926 |
| KW5-149M-instruct | 32,000 | 0.933 |
| XGLM-564M | 256,008 | 1.122 |
| BLOOM-560M | 250,880 | 1.699 |
| GPT-2 124M | 50,257 | 2.126 |
| Pythia-410M | 50,304 | 2.285 |
| Qwen2.5-0.5B | 151,936 | 2.393 |

Where accuracy still belongs
#Compression is not the whole evaluation. The run also scores three multiple-choice tasks: reading comprehension on Belebele [1], news topic classification on MasakhaNEWS [2] and natural language inference on AfriXNLI [3]. The harness records both raw and PMI-normalised suffix likelihood, the latter to correct for answers that are likely simply because they are short or common [4]; the dossier reports raw accuracy, consistently.
Each score comes with a 95% interval and a one-sided test against that task's chance rate, because a small model near chance can look like a result when it is not one. On AfriXNLI no model in the run clears chance, and the dossier says so rather than ranking them.
Failures stay in the record
#Two of the nine models did not load: one on a tokenizer error, one because its repository is gated. They are listed as failures. Dropping them would make the table look complete, and scoring them zero would report something nobody measured.
Notes
-
The 149M release stores 173.6M parameters because its input embeddings and output head are untied. Parameter counts have the same problem in miniature: say which one you mean. ↩
References
- 1Lucas Bandarkar, Davis Liang, Benjamin Muller et al. (2023). The Belebele Benchmark: a Parallel Reading Comprehension Dataset in 122 Language Variants
- 2David Ifeoluwa Adelani, Marek Masiak, Israel Abebe Azime and Jesujoba Alabi (2023). MasakhaNEWS: News Topic Classification for African languages
- 3David Ifeoluwa Adelani, Jessica Ojo and Israel Abebe Azime (2024). IrokoBench: A New Benchmark for African Languages in the Age of Large Language Models
- 4Ari Holtzman, Peter West, Vered Shwartz, Yejin Choi and Luke Zettlemoyer (2021). Surface Form Competition: Why the Highest Probability Answer Isn't Always Right. EMNLP
- Blog · Engineering
The audit that started KW5 v3
Before training a third generation, we checked the second one's numbers. The grounded test always put the answer second, the arithmetic was 0 of 60, and a refusal template named the answer it refused. What we built instead, and the faults it caught on the way.30 Oct 2026 - Research · Technical report
KW5-230M: a Kiswahili assistant from the tokenizer up
The third KW5 generation. A 230M base pretrained on 7.90B tokens of Kiswahili and an assistant fine-tuned from it, scored against fourteen bars frozen before training. Seven are met; the seven missed are published with their numbers.30 Oct 2026 - Research · Model card
KW5: Kiswahili models trained from scratch
Two Kiswahili model sizes, base and instruct, trained from scratch and released under Apache 2.0 with their evaluation, artifacts and documented limitations.14 Sept 2026




