sentence-similarity · feature-extraction · 23.68 MB WASM q8 · Apache-2.0

paraphrase-MiniLM-L6-v2 — Browser Paraphrase Clustering

A 22.7M-parameter, 6-layer BertModel trained specifically on millions of paraphrase pairs to map equivalent English sentences to nearby 384-d mean-pooled unit vectors in 23.68 MB (q8 CPU WASM via shared ../../lib/webai.js on @huggingface/transformers@3.7.5).

Model Card & Runtime Contract

Tasks
sentence-similarity via feature-extraction
Backend & Quant
WASM · q8 (22.97 MB ONNX + 0.71 MB tok = 23.68 MB)
Architecture
6L · 12H · 384-d · 30,522 uncased WordPiece · pooling: "mean"
Seq Limit & License
128 SentenceTransformer (512 BERT max) · Apache-2.0
Symmetric Paraphrase Design: Unlike asymmetric query-passage models (like BGE or E5), paraphrase-MiniLM-L6-v2 uses no query/passage prefix and applies mean pooling + L2 normalization (1_Pooling/config.json). Its SentenceTransformer window defaults to 128 WordPiece tokens (sentence_bert_config.json), while the underlying MiniLM-L6 encoder supports up to 512 position embeddings.

Load & Cache Status

Live Paraphrase Scorer & Similarity Matrix

Drop, paste, or upload a .txt, .md, .csv, or .json list of candidate sentences.

Ranked Paraphrase Similarity

Load the model to embed and rank all sentences locally.

    2D PCA Semantic Constellation

    Diamond marks the reference sentence; dashed rays connect top-3 closest paraphrases.

    See Inside the Model (384-d Tensor & WordPiece Telemetry)

    384-d Embedding Sparkline & Distribution

    Run inference to inspect live 384-d coordinate min, max, mean, std, and L2 norm.

    Pairwise Cosine Heatmap (All Sentences)

    Live Uncased WordPiece Tokenization & 128-Token Limit Audit

    Inspects real uncased WordPiece IDs ([CLS] 101, [SEP] 102, [UNK] 100) before truncation.

    Per-sentence WordPiece token count, [UNK] count, L2 norm, and cosine score
    ID Tokens [UNK] 128-tok Norm Cosine
    Awaiting live inference…

    Show the Code (Exact Worker & Pooling Pipeline)

    Show the code: Off-main-thread feature-extraction + mean pooling (worker.js)
    Show the code: FIFO ParaphraseEngine lifecycle & dispose client (paraphrase.js)