Basics ยท text-ranking ยท 24L XLM-RoBERTa-large ยท 580.04 MB q8 WASM

Basics โ€” Joint Pair Scoring, Sigmoid Curve & 512-Token Budget

See what a cross-encoder fundamentally computes: it encodes [<s> query </s></s> passage </s>] together inside a 512-token SentencePiece window, emits a single unbounded relevance logit, and maps that logit onto a 0โ€“100% sigmoid probability. Test how cross-lingual paraphrases and 128โ†’512 truncation change real logits live.

1. Cross-Attention vs Truncation Budget Probe

Winner Logitโ€“
Runner-up Gapโ€“
128โ†’512 Recoveryโ€“
Passage #1 Tokensโ€“
Class Headโ€“
NaN Checkโ€“

Run the probe above to compare ranked cross-encoder scores.

2. Sigmoid Calibration & 128โ†’512 Truncation Drift

Logistic Sigmoid Curve ฯƒ(z) = 1 / (1 + eโปแถป)

SentencePiece max_length Budget (128 โ†’ 512)

128 to 512 SentencePiece budget audit results for Passage 1
Budget Kept / Full Tokens Dropped Raw Logit Sigmoid ฯƒ(z) Latency Tail Tokens Kept
Run the audit above to inspect token truncation effects.

3. Inspect SentencePiece Budget Audit Code

Show the code ยท worker.js โ€” budgetAudit()
Show the code ยท bge-reranker-large.js โ€” drawBudgetAuditCanvas()