Multi-model · Opus-MT DE→EN (106.0 MB q8 · Apache-2.0) → DeBERTa-v3 Zero-Shot NLI (70 MB q8 · MIT)

Cross-Lingual Ticket Routing: Translate Locally, Then Zero-Shot Route

Stage 1 (Xenova/opus-mt-de-en, 106.0 MB WASM q8, Apache-2.0) translates incoming German customer tickets or news locally into English. Stage 2 (Xenova/nli-deberta-v3-xsmall, 70 MB WASM q8, MIT, reusing shared ../zero-shot-text/worker.js) routes the translated English through custom zero-shot NLI hypotheses — unlocking an English-only NLI classifier on German documents (~176 MB total, 100% on-device).

1. Two Independent On-Device Models (~176 MB Combined)

Cross-lingual bridge: Each stage runs in its own isolated Web Worker with independent Cache Storage auto-init and memory Release controls. Releasing Stage 1 frees MarianMT while keeping Stage 2 live (and vice versa).

Stage 1 · Opus-MT DE→EN (106.0 MB WASM q8 · Apache-2.0)

Stage 2 · DeBERTa-v3 Zero-Shot NLI (70 MB WASM q8 · MIT)

2. Cross-Lingual Handoff & Zero-Shot Intent Scores

Top routed queue–
Top NLI score–
Stage 1 / Stage 2 ms–
Stage 1 NaN check–
Stage 2 id2label order–

Stage 1 Input · German Document

Select a German ticket preset above.

Stage 1 → Stage 2 Handoff · Translated English

Stage 1 (Opus-MT DE→EN) translation will appear here and feed Stage 2.

Stage 2 · Dynamic 3-Way NLI Routing Scores (from res.classNames)

Zero-shot NLI routing scores with dynamically mapped entailment, neutral, and contradiction probabilities
Rank Routing Queue / Intent Score Confidence Entailment Neutral Contradiction
Run the full pipeline above to classify the translated English text.

3. Inspect Multi-Model Client & Dynamic NLI Mapping

Show the code · opus-de.js — ZeroShotRoutingClient (reusing ../zero-shot-text/worker.js)
Show the code · opus-de-core.mjs — mapNliClassProbabilities() (dynamic res.classNames lookup)