How to use DoDucAnh/MNLP_M3_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DoDucAnh/MNLP_M3_document_encoder") sentences = [ "While driving her company vehicle near a pedestrian mall, a woman came upon the scene of a three-car accident. She was so busy gawking at the damaged vehicles that she failed to see one of the victims lying on the road in front of her car. She hit and ran over the victim, who survived and sued the woman's company. The victim offers the testimony of a witness to the incident. Referring to the woman, the witness stated, \"The driver of that car ran over the victim as he was lying on the ground awaiting an ambulance, and said It is all my fault, I should have been paying more attention to my driving. \" Assume for this question that the woman is available to testify. The trial judge should rule that the testimony is\nA. admissible as a declaration against interest.\nB. admissible as a present sense impression.\nC. admissible as an admission.\nD. inadmissible as hearsay not within any recognized exception.", "A present sense impression is a statement describing or explaining an event or condition made while the declarant was perceiving the event or condition, or immediately thereafter. This is an exception to the hearsay rule.", "Corporate managers are professionals within a business environment who handle various aspects of management, including planning, organizing, leading, and controlling resources. Their roles often draw from established management theories, such as those by Henri Fayol, which emphasize functions like forecasting, commanding, and coordinating to support organizational success.", "Ο ποιοτικός έλεγχος είναι μια διαδικασία που εφαρμόζεται στη βιομηχανία και σε άλλους τομείς για να διασφαλιστεί ότι τα προϊόντα ή οι υπηρεσίες πληρούν συγκεκριμένες προδιαγραφές και πρότυπα ποιότητας." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
The community tab is the place to discuss and collaborate with the HF community!