BM-K/KoSimCSE-roberta-multitask简介
发布时间:2026-05-17 01:17:25
文章来源:www.cxwl.com
访问次数:5
https://github.com/BM-K/Sentence-Embedding-is-all-you-need
Korean-Sentence-Embedding
? Korean sentence embedding repository. You can download the pre-trained models and inference right away, also it provides environments where individuals can train models.

Quick tour
import torch
from transformers import AutoModel, AutoTokenizer
def cal_score(a, b):
if len(a.shape) == 1: a = a.unsqueeze(0)
if len(b.shape) == 1: b = b.unsqueeze(0)
a_norm = a / a.norm(dim=1)[:, None]
b_norm = b / b.norm(dim=1)[:, None]
return torch.mm(a_norm, b_norm.transpose(0, 1)) * 100
model = AutoModel.from_pretrained('BM-K/KoSimCSE-roberta-multitask')
AutoTokenizer.from_pretrained('BM-K/KoSimCSE-roberta-multitask')
sentences = ['치타가 들판을 가로 질러 먹이를 쫓는다.',
'치타 한 마리가 먹이 뒤에서 달리고 있다.',
'원숭이 한 마리가 드럼을 연주한다.']
inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
embeddings, _ = model(**inputs, return_dict=False)
score01 = cal_score(embeddings[0][0], embeddings[1][0])
score02 = cal_score(embeddings[0][0], embeddings[2][0])
Performance
- Semantic Textual Similarity test set results
标签:漫画下载,pdf漫画下载,跨境电商,媒体,独立站,百度文库,站联,影音网站,PanDownload,其它网站
关于文章《BM-K/KoSimCSE-roberta-multitask简介》特别声明
《BM-K/KoSimCSE-roberta-multitask简介》更新日期为:2026-05-17 01:17:25;目前浏览的小伙伴达到5,初夏导航所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系

