Why the vocabulary weighs so much
A multilingual model like paraphrase-multilingual-MiniLM has a vocabulary of about 250,000 tokens, to cover dozens of languages. Each token has an embedding of 384 numbers. That makes 96 million weights just for the vocabulary, out of about 118 million in total.
So the part that understands sentences, twelve small layers, weighs less than a fifth of the total. That's why a model for a single language, with a vocabulary of 30,000 tokens, can weigh three or four times less and stay almost as good in that language.
- 250,000tokens in the vocabulary, roughly
- 96 Mweights just for the vocabulary
- 118 Mweights in total