Sentence Similarity
sentence-transformers
Safetensors
baa-embedding-reranker
retrieval
embeddings
reranker
cross-encoder
rag
Instructions to use baa-ai/Merino-Large-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use baa-ai/Merino-Large-v2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("baa-ai/Merino-Large-v2") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Add certification & corpus-fit guidance (PB score, 4-bit distractor certificate, chunking prescription)
Browse files
README.md
CHANGED
|
@@ -59,3 +59,17 @@ ranked = m.rerank("how does a cross-encoder reranker work?",
|
|
| 59 |
- Incorporates the `xlm-roberta-large` backbone under the **MIT License** — see `LICENSE-xlm-roberta-large.txt`.
|
| 60 |
|
| 61 |
© 2026 BAA AI (Black Sheep AI) — baa.ai. Provided "as is" without warranty.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
- Incorporates the `xlm-roberta-large` backbone under the **MIT License** — see `LICENSE-xlm-roberta-large.txt`.
|
| 60 |
|
| 61 |
© 2026 BAA AI (Black Sheep AI) — baa.ai. Provided "as is" without warranty.
|
| 62 |
+
|
| 63 |
+
## Certification & corpus fit (2026-07)
|
| 64 |
+
|
| 65 |
+
**Position Balance (PB): 0.31** — PB measures how findable a chunk is through its *second* fact when two
|
| 66 |
+
facts share one embedding (second-fact / first-fact top-1 retrieval on an adversarial 1,300-chunk audit;
|
| 67 |
+
fleet range 0.16–0.69). Best-in-fleet single-fact quality (1.00). Strongest choice for topically-unified corpora (abstracts, product data); for heterogeneous multi-fact documents prefer [Merino-Large](https://huggingface.co/baa-ai/Merino-Large) or enforce strictly atomic chunking.
|
| 68 |
+
|
| 69 |
+
**4-bit quantization: certified lossless under distractor stress.** Paired contested-region robustness
|
| 70 |
+
(gold document injected into pools of up to 100 near-topical distractors, n=300 queries, bootstrap CIs)
|
| 71 |
+
is statistically indistinguishable from fp16 — an axis standard hit@k benchmarks do not measure.
|
| 72 |
+
|
| 73 |
+
**Chunking prescription:** embed one atomic claim per chunk and lead with its key entity; retrieve small,
|
| 74 |
+
return the parent section for context. Basis: single-vector embeddings preserve ~one independent fact per
|
| 75 |
+
chunk regardless of encoder family (measured across 12 encoders).
|