вот код что тут? from sentence_transformers import SentenceTransformer, util model = SentenceTransformer("intfloat/multilingual-e5-large", device='cuda') text = """ """ text2 = """ """ sentences = [text, text2] #Compute embedding for both lists embedding_1= model.encode(sentences[0], convert_to_tensor=True) embedding_2 = model.encode(sentences[1], convert_to_tensor=True) print(util.pytorch_cos_sim(embedding_1, embedding_2))
Обсуждают сегодня