|
|
|
|
|
by mcyc
31 days ago
|
|
You are right about most tokenizers being heavily biased towards English, but the situation is not so bad for Portuguese. Here are some results on the Goldfish corpus [1] with a few different tokenizers. This measures #characters in corpus / #subwords in tokenized corpus. ``` Llama3 english, 0.216 portuguese, 0.285 italian, 0.287 greek, 0.592 ``` ``` Gemma4 english, 0.219 portuguese, 0.246 italian, 0.249 greek, 0.537 ``` ``` Kimi2.6 english, 0.214 portuguese, 0.310 italian, 0.308 greek, 0.716 ``` Portuguese is worse than English certainly, but it is on par with Italian (which I think has more overlap with English) and much better than Greek (since it doesn't use the Latin script and is definitely not prioritized in the tokenizer construction). On your second point, tokenizer transfer allows for extending/modifying a tokenizer without retraining the model from scratch. The simplest version of this is tokenizer extension + continual pretraining, where you just add a bunch more tokens to the vocab for the language/domain that you want to improve and train a little more. It's been done for Japanese [2] and Indic languages, but afaik not Portuguese. So I think that continual pretraining for a large base model would have probably been fine for this case with huge cost savings. But it is good to have the ability to train your own base models, so I don't think this is such a bad idea. ----------------------- [1]: https://huggingface.co/datasets/goldfish-models/fish-food [2]: https://arxiv.org/abs/2404.17790 |
|
This is very interesting, I didn't know that! Thanks for the links!