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
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.