← All models · STS-B similarity
use case · multi-model
Scoring every pair with a cross-encoder is O(n²) forward passes — fine for a handful, expensive for hundreds. The standard fix: a fast MiniLM bi-encoder embeds each sentence once and cheaply ranks all pairs by cosine; then the STS cross-encoder re-scores only the top shortlist for a precise, calibrated 0–5 number. Watch the cosine ranking and the cross-encoder ranking disagree — that's the precision the second stage buys. Both models run locally; nothing is uploaded.
Loads two models (~25 MB bi-encoder + ~58 MB cross-encoder). Both auto-initialise when cached.
Shortlister · MiniLM bi-encoder
Scorer · STS cross-encoder
Top pairs the bi-encoder shortlisted, re-scored by the cross-encoder (sorted by the precise STS score). The cos column is the bi-encoder's cheap estimate.
This is retrieve-then-rescore for similarity: the bi-encoder is cheap and parallel but approximate; the cross-encoder is precise but expensive, so you only run it on the shortlist. Exactly how production semantic-dedup and paraphrase-mining pipelines are built — here at ~83 MB, entirely on-device.