Downloads · 30 days
44
5% of all-time downloads
OysterQAQ/ACGVoc2vec
ACGVoc2vec is a sentence similarity model from OysterQAQ. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
结构为sentence-transformers,使用其distiluse-base-multilingual-cased-v2预训练权重,以5e-5的学习率在动漫相关语句对数据集下进行微调,损失函数为MultipleNegativesRankingLoss。
Downloads · 30 days
44
5% of all-time downloads
All-time downloads
929
Public
Repo size
2.7 GB
Likes
8
Public
Click a slice to open those files.
.bin541 MB · 99%
From the Hugging Face model README
结构为sentence-transformers,使用其distiluse-base-multilingual-cased-v2预训练权重,以5e-5的学习率在动漫相关语句对数据集下进行微调,损失函数为MultipleNegativesRankingLoss。
数据集主要包括:
Bangumi
pixiv
AnimeList
维基百科
moegirl
动画中文名+小标题-对应内容
在进行爬取,清洗,处理后得到8000w对文本对(还在持续增加),batchzise=80训练了20个epoch,使st的权重能够适应该问题空间,生成融合了领域知识的文本特征向量(体现为有关的文本距离更加接近,例如作品与登场人物,或者来自同一作品的登场人物)。
Using this model becomes easy when you have sentence-transformers installed:
pip install -U sentence-transformers
Then you can use the model like this:
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('OysterQAQ/ACGVoc2vec')
embeddings = model.encode(sentences)
print(embeddings)
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: DistilBertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
(2): Dense({'in_features': 768, 'out_features': 512, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
)