Files
ACGVoc2vec/README.md
ModelHub XC 79beb64a6d 初始化项目,由ModelHub XC社区提供模型
Model: OysterQAQ/ACGVoc2vec
Source: Original Platform
2026-08-03 12:54:17 +08:00

87 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- feature-extraction
- sentence-similarity
widget:
source_sentence: "亚丝娜"
sentences:
- "火影忍者"
- "Sword Art Online"
- "结城明日奈"
- "アスナ"
---
# ACGVoc2vec
结构为[sentence-transformers](https://github.com/UKPLab/sentence-transformers),使用其**distiluse-base-multilingual-cased-v2**预训练权重以5e-5的学习率在动漫相关语句对数据集下进行微调损失函数为MultipleNegativesRankingLoss。
数据集主要包括:
* Bangumi
* 动画日文名-动画中文名
* 动画日文名-简介
* 动画中文名-简介
* 动画中文名-标签
* 动画日文名-角色
* 动画中文名-角色
* 声优日文名-声优中文名
* pixiv
* 标签日文名-标签中文名
* AnimeList
* 动画日文名-动画英文名
* 维基百科
* 动画日文名-动画中文名
* 动画日文名-动画英文名
* 中英日详情页h2标题及其对应文本
* 简介多语言对照(中日英)
* 动画名-简介(中日英)
* moegirl
* 动画中文名的简介-简介
* 动画中文名+小标题-对应内容
在进行爬取清洗处理后得到8000w对文本对还在持续增加batchzise=80训练了20个epoch使st的权重能够适应该问题空间生成融合了领域知识的文本特征向量体现为有关的文本距离更加接近例如作品与登场人物或者来自同一作品的登场人物
## Usage
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
```
pip install -U sentence-transformers
```
Then you can use the model like this:
```python
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)
```
## Full Model Architecture
```
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'})
)
```
## Citing & Authors
<!--- Describe where people can find more information -->