MillID tiny v1.5
an ultralight model for identifying 1,641 languages
2 min readupdated
The MillID tiny v1.5 model by Baobab Tech is designed to accurately identify the language and script of any text—from a single spreadsheet cell to a full paragraph. It recognizes 1,550 languages across 56 alphabets without using a traditional tokenizer (a program that splits text into parts): the model reads raw UTF-8 bytes (a text encoding standard). With a size of just 2.9 million parameters, it runs directly on a CPU, in a browser, or on a mobile device without needing a server with a graphics accelerator. It is well-suited for developers building localized apps, search filters, or automated multilingual document processing systems.
Key features
- Massive coverage: Supports 1,641 language labels including script variations (for example, separating Serbian in Cyrillic and Latin).
- Tokenizer-free: Direct analysis of UTF-8 bytes eliminates unknown token issues when working with rare languages.
- Edge-friendly: Weighs just 11 MB in ONNX (an open format for machine learning) format and delivers hundreds of classifications per second on standard CPU cores.
- Document analysis: The identify_document function can scan long texts and split them into language segments.
What you can do
- Web integration: Add language identification directly to browser interfaces using JavaScript without sending data to a server.
- Chatbot filtering: Build a fast filter for incoming messages in rare and popular languages to route them to the right support agents.
- Dataset analysis: Automatically tag and sort multilingual text corpora during data preparation.
- Mobile utilities: Embed offline language detection into local smartphone applications.
Example
An example of installing the package and running the model via the command line:
pip install "millid[cpu] @ git+[https://github.com/baobab-tech/millid.git](https://github.com/baobab-tech/millid.git)"Read more
DetailsMacro F1 metric on test: 0.9554 (Top-1 accuracy 0.9587).
Memory consumption: 11 MB in ONNX format, runs on CPU.
Trained on texts of varying lengths, including short phrases starting at 20 characters.
Architecture: 3 Transformer blocks, model dimension 192, SwiGLU activation.










Comments