🚀 丘比特小模型 - 罗马尼亚语版
丘比特小模型 - 罗马尼亚语版(cupidon - small - ro)虽名字小巧,却能与大型模型一较高下。该句向量转换模型基于强大的 sentence - transformers/paraphrase - multilingual - MiniLM - L12 - v2 进行微调,能够以惊人的准确率捕捉罗马尼亚语句子的含义。
它体积小巧,运行高效,却蕴含着强大的语义理解能力。可以说,这个模型证明了“小身材”也有“大能量”,尤其在语义文本相似度、搜索或聚类任务中表现出色。 💔💬
🚀 快速开始
✨ 主要特性
- 基于强大的基础模型微调,能精准捕捉罗马尼亚语句子含义。
- 模型体积小巧,运行高效。
- 在语义文本相似度、搜索和聚类等任务中表现出色。
📦 安装指南
若要使用该模型,需先安装 sentence - transformers:
pip install -U sentence-transformers
💻 使用示例
基础用法
使用 sentence - transformers 库
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('BlackKakapo/cupidon-small-ro')
embeddings = model.encode(sentences)
print(embeddings)
使用 HuggingFace Transformers 库
若未安装 sentence - transformers,可以按以下方式使用模型:首先将输入传递给 Transformer 模型,然后对上下文词嵌入应用正确的池化操作。
from transformers import AutoTokenizer, AutoModel
import torch
def mean_pooling(model_output, attention_mask):
token_embeddings = model_output[0]
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
sentences = ['This is an example sentence', 'Each sentence is converted']
tokenizer = AutoTokenizer.from_pretrained('BlackKakapo/cupidon-small-ro')
model = AutoModel.from_pretrained('BlackKakapo/cupidon-small-ro')
📚 详细文档
属性 |
详情 |
模型类型 |
句向量转换模型 |
训练数据 |
ro_sts、BlackKakapo/RoSTSC |
基础模型 |
sentence - transformers/paraphrase - multilingual - MiniLM - L12 - v2 |
许可证 |
Apache 2.0 |
语言 |
罗马尼亚语 |
语言创建者 |
机器生成 |
📄 许可证
本数据集遵循 Apache 2.0 许可证。
🔗 引用
如果您在研究中使用了 BlackKakapo/cupidon - small - ro 模型,请按以下方式引用:
@misc{cupidon-small-ro,
title={BlackKakapo/cupidon-small-ro},
author={BlackKakapo},
year={2025},
}