GPT-NL says its own tokenizer needs fewer tokens for Dutch text

In short

128,000 words and word pieces in GPT-NL's vocabulary; ~40% share of that vocabulary that is Dutch; 92 vs 160 tokens for one example sentence, the team says; ~58% the energy GPT-NL says that saves down to

What does a tokenizer do?

A language model does not read words. It reads tokens: a token can be a whole word, part of a word or a single punctuation mark. Before training, a tokenizer is built that decides how text is cut up, and the model learns which pieces tend to follow each other.

The post explains why pieces beat whole words with a Dutch favourite, koffiezetapparaat (coffee maker). If the whole word were one token, a model would have to learn koffiezetapparaat and its plural koffiezetapparaten separately. Split into parts, it can learn that koffie, apparaat and apparaten connect. Pieces also help with misspellings: a model that knew only the whole word would not recognise koffiezetaparaat.

Why does Dutch need its own tokenizer?

The catch is where the cuts fall. A tokenizer built mostly from English text cuts Dutch words in odd places, and the pieces mean nothing on their own. The post gives two examples from a tokenizer "not aimed at Dutch":

Source: GPT-NL's post. The post does not say how many tokens its own tokenizer uses for the first word; the pieces are as it lists them.

We ran the public tokenizer of OLMo 2, the open model from the Allen Institute for AI that GPT-NL's demo compares against, on both words. It gives exactly the seven pieces in the middle column, for the lowercase word with a leading space; with a capital A, Auteursrechthebbenden becomes eight. That tokenizer has a vocabulary of about 100,000 entries.

GPT-NL's point is not only the count. Its pieces, Auteursrecht (copyright) and hebbenden (holders), or koffie, zet and apparaat, are themselves Dutch words, so the model can work out what the whole word is about.

Fewer tokens, less energy, the team says

For Dutch sentences, the post says, GPT-NL often uses fewer and more logical tokens than OLMo, with the same meaning. For English the gap is smaller: the two land at about the same number of tokens per sentence.

Each token a model generates costs a little energy, so fewer tokens per sentence means less work. The post's one example: "if you use 92 tokens instead of 160" in an example sentence, which it rounds to about 58% of the energy (92 divided by 160 is 57.5%, our arithmetic).

That figure is one example sentence, which the post does not show; it does not name the tokenizer behind the 160, and the figure it assumes energy rises in step with the number of tokens. GPT-NL gives no average across a set of Dutch texts and no measured energy use. The demo lets readers test their own sentences, but it is a comparison of how text is cut up, not of how well either model answers.

How it is built and how open it is

GPT-NL's tokenizer recipe is public. Its data-loading code, released on GitHub under the Apache 2.0 licence (free to use, change and sell, with credit), includes the step that trains the tokenizer. The settings file names a 128,000-entry vocabulary built with byte-pair encoding in Google's SentencePiece library, keeps digits as separate tokens, and falls back to raw bytes for characters it has never seen. We did not find the trained tokenizer files themselves on GPT-NL's GitHub or Hugging Face pages.

The model is less open than the code. GPT-NL's FAQ says it is not an open-weights model: researchers and regulators can get the weights for a nominal fee after registering, and every other use, commercial included, needs a paid professional licence. All source code and every dataset it is allowed to share are published openly.

Who is behind it

GPT-NL is funded through RVO, the Dutch enterprise agency, and the Ministry of Economic Affairs, with 13.5 million euros granted at the end of October 2023, its about page says; the site shows TNO, SURF and the Netherlands Forensic Institute (NFI) as the partners. The project only uses data it has obtained lawfully and passes part of its income back to copyright holders, the very auteursrechthebbenden of its tokenizer example.

Terms in plain English

Official channels of GPT-NL: Website · LinkedIn

Sources

Sources

Related stories

More from AI in Europe

All stories from AI in Europe