← All models · Multilingual MiniLM

Multi-model · feature-extraction → translation · WASM

Retrieve cross-lingually, then translate the winner

The classic multilingual RAG front-half, made of two on-device models. First the multilingual embedder finds the passage that best answers your query whatever language it's in. Then, if the winner isn't in your language, M2M100 translates it so you can actually read it. Retrieval that ignores language, followed by translation only where it's needed.

1 · Retrieve across languages

A mixed-language knowledge base. Ask in English; the embedder ranks every passage by meaning regardless of language.

2 · Translate the winning passage

The top hit is passed to M2M100 for translation into English. First use downloads the translation model (~500 MB, cached afterwards) — a heavier model than the embedder, so it loads on demand.

Why compose them?

Translating the whole corpus up front is wasteful — most documents will never match a given query. Embedding is cheap and language-agnostic, so you retrieve first across the entire multilingual corpus, then spend the expensive translation pass only on the handful of passages a user actually lands on. It's the same shape as production multilingual search: a fast, shared-space retriever followed by a precise, heavier step — here, both running privately on-device.

← Back to Multilingual MiniLM · Compare: cross-lingual reranking →