← All models · DistilBERT SQuAD

use case · multi-model

Multi-model: retrieve the paragraph, then read the answer

Extractive QA works on one passage at a time — but real documents are long. The fix is the classic retrieve-then-read pattern: MiniLM embeddings first find the paragraph most likely to hold the answer, then DistilBERT extracts the exact span from just that paragraph. Two small models compose into open-document QA — the backbone of on-device RAG. Both run locally; nothing is uploaded.

This page loads two models (~25 MB embeddings + ~65 MB QA). Both auto-initialise when cached. Once ready, the pipeline splits your document into paragraphs, retrieves the best one, then answers from it.

Retriever · MiniLM embeddings

Reader · DistilBERT SQuAD

This is RAG in miniature: retrieval narrows a big document to the relevant chunk, extraction pins the exact answer. Swap the reader for a generative LLM and you have the architecture behind most "chat with your docs" products — except here it's 90 MB and runs entirely on-device.

← Wild · DistilBERT SQuAD