Models / all-MiniLM-L6-v2

all-MiniLM-L6-v2

The most downloaded model on the Hub: a 6-layer, width-384 BERT encoder distilled for sentence embeddings, mean-pooled and L2-normalized.

22.6M parametersbertApache-2.0sentence-similaritytext-encoderencoder-onlyfeature-extraction

Cosine similarity between 6 sentences. The card's own embed entry: mean-pooled, L2-normalized sentence embeddings.

  1. The cat curled up on the warm windowsill and fell asleep in the sun.
  2. Our new kitten refuses to eat anything except wet food.
  3. The central bank raised interest rates again to cool inflation.
  4. She rebalanced her portfolio after the market's sharp swings.
  5. The function threw an exception when the array index ran out of bounds.
  6. He refactored the module to remove three copies of the same logic.
123456
11.000.280.090.050.110.02
20.281.00-0.050.050.11-0.01
30.09-0.051.000.31-0.010.19
40.050.050.311.000.090.13
50.110.11-0.010.091.000.09
60.02-0.010.190.130.091.00

Shading runs from 0 to 0.31, the closest pair of different sentences. Largest difference from sentence-transformers (SentenceTransformer.encode)'s matrix: 0.0034.