multi-model · asymmetric IR + 12-layer SQuAD v2 open-book reader · 148.5 MB total · Apache-2.0 + CC-BY-4.0

Asymmetric IR + 12-Layer SQuAD v2 Open-Book Reader

True zero-server two-stage Open-Book QA chaining two complementary on-device architectures (148.43 MB combined): Stage 1 encodes your query with MongoDB/mdbr-leaf-ir (23.17 MB q8 WASM, Apache-2.0, reusing ../mdbr-leaf-ir/worker.js) using LEAF's asymmetric query instruction prefix to shortlist the top-K passages; Stage 2 reads each shortlisted passage with full 12-layer onnx-community/roberta-base-squad2-ONNX (125.26 MB q8 WASM, CC-BY-4.0) to extract the highest-confidence cited span — or abstain corpus-wide when no passage answers the query.

1 · Initialise both independent pipeline stages

Stage 1 · MongoDB LEAF IR Retriever (23.2 MB · Apache-2.0)

MongoDB/mdbr-leaf-ir · 384-d mean-pooled L2-normalized asymmetric IR embeddings.

Stage 2 · RoBERTa-Base SQuAD2 Reader (125.3 MB · CC-BY-4.0)

onnx-community/roberta-base-squad2-ONNX · 12-layer extractive QA + SQuAD v2 abstention.

2 · Choose a technical library & ask an open-book query

Add your own .txt or .md document to the live library (100% local).
Inspect document library (6 passages)

Initialise both Stage 1 (MongoDB LEAF IR) and Stage 2 (RoBERTa-Base SQuAD2) above to run Open-Book QA.

Waiting for both stages

—

Stage 1 will rank every passage using asymmetric 384-d LEAF embeddings, then Stage 2 will read the top-K passages with 12-layer RoBERTa-Base SQuAD2.

Stage 1 LEAF IR—
Stage 2 RoBERTa—
Combined Latency—
Top Doc Cosine—
Winning Span / Null—
Finite Check—

Shortlisted Passages & Per-Document RoBERTa-Base SQuAD2 Readings