How to use bobox/E5-base-unsupervised-TSDAE with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("bobox/E5-base-unsupervised-TSDAE") sentences = [ "One mole of a substance of substance such atoms or). The is known or Avogadro's constant", "how effective are birth control pills and pulling out?", "can pvc be phthalate free?", "One mole of a substance is equal to 6.022 × 10²³ units of that substance (such as atoms, molecules, or ions). The number 6.022 × 10²³ is known as Avogadro's number or Avogadro's constant." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]