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:

benchmarkEnglish ckptmultilingual ckpt
MASSIVE intent, English0.7830.657
MASSIVE intent, 13 other languages0.3060.451
XNLI, English0.8600.843
XNLI, 14 other languages0.5210.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:

  1. an explicit model
  2. an explicit task (for example typed-decisions)
  3. a detected typed-decisions workflow, only if auto task detection is on
  4. an explicit lang code
  5. a caller-supplied lang_guess (a code, or a function that may abstain)
  6. built-in detection: script detection, then a stopword/diacritic heuristic for Latin text
  7. 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.

How Language routing connects to the rest of the vocabulary.