Loading…
Loading…
sentence-transformers/all-MiniLM-L6-v2, fine-tuned in-domain on
NFCorpus (BEIR benchmark,
medical/nutrition retrieval) with contrastive learning. Part of a two-part
study — fine-tuning gains vs. baselines, and a VecStream ANN benchmark on
real embeddings — documented in full at
torinriley/hf-research.
| Method | Recall@10 | Recall@100 | NDCG@10 | NDCG@100 |
|---|---|---|---|---|
| TF-IDF (lexical baseline) | 0.141 | 0.234 | 0.291 | 0.255 |
| Base model, zero-shot | 0.159 | 0.315 | 0.319 | 0.302 |
| This model | 0.164 | 0.350 | 0.332 | 0.327 |
A modest, real gain over the zero-shot base model (NDCG@10 +4.1% relative,
Recall@100 +11.2% relative) — small because the fine-tune itself is small
(see Training below). The zero-shot baseline's NDCG@10 (0.319) matches
published all-MiniLM-L6-v2 NFCorpus numbers in the MTEB/BEIR ecosystem
(~0.317) within normal run-to-run variance, which is a useful sanity check
on the eval pipeline.
sentence-transformers/all-MiniLM-L6-v2 (22.7M params).MultipleNegativesRankingLoss (in-batch-negative contrastive /
InfoNCE-style), via sentence-transformers.sentence-transformers optimizer
settings. 404s wall-clock on CPU. Final train loss: 2.576.from sentence_transformers import SentenceTransformer
model = SentenceTransformer("torinriley/nfcorpus-finetuned-minilm")
query_emb = model.encode("What foods help lower cholesterol?", normalize_embeddings=True)
doc_emb = model.encode("Oat bran and soluble fiber intake...", normalize_embeddings=True)
similarity = query_emb @ doc_emb
Full methodology, the VecStream ANN benchmark on this model's embeddings, and discussion of limitations: REPORT.md.
sentence-transformers/all-MiniLM-L6-v2