← All models · STS-B similarity

use case · multi-model

Multi-model: shortlist with a bi-encoder, score with the cross-encoder

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

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.

← Wild · STS-B similarity