How to use cyberbabooshka/MNLP_M3_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("cyberbabooshka/MNLP_M3_document_encoder") sentences = [ "What is the relationship between the x- and y-coordinates in a linear relationship, and how can this relationship be represented visually on a graph?", "\"A linear relationship is a relationship between variables such that when plotted on a coordinate plane, the points lie on a line.\" Additionally, \"You can think of a line, then, as a collection of an infinite number of individual points that share the same mathematical relationship.\"", "\"A 'model' is a situation-specific description of a phenomenon based on a theory, that allows us to make a specific prediction.\" and \"In physics, it is particularly important to distinguish between these two terms. A model provides an immediate understanding of something based on a theory.\"", "\"Use capital letters to denote sets, $A,B, C, X, Y$ etc. [...] if you stick with these conventions people reading your work (including the person marking your exams) will know — 'Oh $A$ is that set they are talking about' and '$a$ is an element of that set.'\"" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]