use case · multi-model · RAG
One model rarely ships alone. Here two run side by side: all-MiniLM-L6 (Transformers.js) turns a pasted document into vectors and retrieves the passages closest to your question, then OLMo-2 1B (WebLLM) answers using only those passages. That's RAG: grounded, auditable, and running entirely in this tab with no server and no vector database.
Retriever · all-MiniLM-L6 (Transformers.js · WASM, no GPU needed)
Generator · OLMo-2 1B (WebLLM · WebGPU only)
A 1B model doesn't know your documents, and stuffing them all into the prompt gets expensive and unreliable. Instead, MiniLM (a 25 MB embedding model) indexes the text once; each question is embedded and matched by cosine similarity, and only the closest few chunks are handed to OLMo-2. The LLM's job shrinks to "read these passages and answer" — cheaper, faster, and grounded in source you control. Swap the corpus for a product manual, a policy doc, or your own notes. Because OLMo-2 is fully open, you could even continue-train it on that same corpus and skip retrieval for the parts it has memorised.