Glossary
Language routing
Language routing automatically sends each request to the model best suited to its language; Laya chooses between its English and multilingual models this way.
Swiss-hosted inference. Nothing you send is ever stored. Swiss data residency
Definition
What Language routing means
Language routing is dispatching each request to a model, prompt or pipeline chosen for the input's language. It is common wherever a strong specialised model coexists with a broader, weaker-per-language one.
Why Laya needs it
Laya ships an English checkpoint (ModernBERT-large) and a multilingual one (mmBERT-base, 100+ languages). Neither dominates. From the model card:
| benchmark | English ckpt | multilingual ckpt |
|---|---|---|
| MASSIVE intent, English | 0.783 | 0.657 |
| MASSIVE intent, 13 other languages | 0.306 | 0.451 |
| XNLI, English | 0.860 | 0.843 |
| XNLI, 14 other languages | 0.521 | 0.731 |
Routing takes the better column per row. With routing, 45 of 51 tested languages are usable (above 3x random), against 23 of 51 for the English checkpoint alone. Since the English checkpoint is confidently wrong on scripts it cannot read, routing must happen before inference; it cannot be replaced by a confidence threshold afterwards.
How the Router decides
Precedence, highest first:
- an explicit
model - an explicit
task(for example typed-decisions) - a detected typed-decisions workflow, only if auto task detection is on
- an explicit
langcode - a caller-supplied
lang_guess(a code, or a function that may abstain) - built-in detection: script detection, then a stopword/diacritic heuristic for Latin text
- the default checkpoint
Latin text whose language cannot be identified goes to the default. Version 0.3.7 improved accent-stripped Romance text: Italian utterances of six or more words routed correctly rose from 39% to 80% on MASSIVE.
The response's routing field records the checkpoint and the reason, so you can audit decisions. On Laya Studio, pass model in the request to pin a checkpoint. See language routing and multilingual intake.
Related terms
How Language routing connects to the rest of the vocabulary.
Go deeper
- ExplainerLanguage routing: picking the checkpoint that can read the inputWhat language routing is: detect the script and language of each input, then send it to a model that can read it. How Laya's router decides in under 1 ms.
- ExplainerMultilingual classification: one decision, many languagesHow to classify text in many languages: translation, per-language models, multilingual encoders or LLMs. Why English-only models fail confidently.
- Use caseMultilingual intake without a translation stepClassify tickets, emails and forms in 100+ languages without translating first. Script detection routes each request to the right Laya checkpoint for you.
Get started
Try it on your own text
Send any text with your own typed questions and get a calibrated probability for every answer. 6k free tokens, no card needed; then $0.0357 per 1M input tokens — 15% below Jev.
Swiss-hosted inference. Nothing you send is ever stored.