Sentence Similarity
sentence-transformers
PyTorch
distilbert
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run OysterQAQ/ACGVoc2vec on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/OysterQAQ/ACGVoc2vec. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/OysterQAQ/ACGVoc2vec on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use OysterQAQ/ACGVoc2vec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use OysterQAQ/ACGVoc2vec with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("OysterQAQ/ACGVoc2vec") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files123456128341056127814910111213141516161718181920212021222223242425262728262728293031303132333233343536363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909137---pipeline_tag: sentence-similaritytags:- sentence-transformers- feature-extraction- sentence-similarity## acgvoc2vec
---结构为[sentence-transformers](https://github.com/UKPLab/sentence-transformers),使用其**distiluse-base-multilingual-cased-v2**预训练权重,以5e-5的学习率在动漫相关语句对数据集下进行微调,损失函数为MultipleNegativesRankingLoss。
# {MODEL_NAME}数据集主要包括:
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 512 dimensional dense vector space and can be used for tasks like clustering or semantic search.* Bangumi
<!--- Describe your model here --> * 动画日文名-动画中文名 * 动画日文名-简介 * 动画中文名-简介 * 动画中文名-标签 * 动画日文名-角色 * 动画中文名-角色 * 声优日文名-声优中文名
## Usage (Sentence-Transformers)* pixiv
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: * 标签日文名-标签中文名* AnimeList
```pip install -U sentence-transformers``` * 动画日文名-动画英文名
Then you can use the model like this:* 维基百科
```pythonfrom sentence_transformers import SentenceTransformersentences = ["This is an example sentence", "Each sentence is converted"] * 动画日文名-动画中文名 * 动画日文名-动画英文名 * 中英日详情页h2标题及其对应文本 * 简介多语言对照(中日英) * 动画名-简介(中日英)
model = SentenceTransformer('{MODEL_NAME}')embeddings = model.encode(sentences)print(embeddings)```* moegirl
* 动画中文名的简介-简介* 动画中文名+小标题-对应内容
## Evaluation Results
<!--- Describe how your model was evaluated -->
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
## TrainingThe model was trained with the parameters:
**DataLoader**:
`torch.utils.data.dataloader.DataLoader` of length 64769 with parameters:```{'batch_size': 80, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}```
**Loss**:
`sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters: ``` {'scale': 20.0, 'similarity_fct': 'cos_sim'} ```
Parameters of the fit()-Method:```{ "epochs": 20, "evaluation_steps": 0, "evaluator": "NoneType", "max_grad_norm": 1, "optimizer_class": "<class 'torch.optim.adamw.AdamW'>", "optimizer_params": { "lr": 2e-05 }, "scheduler": "WarmupLinear", "steps_per_epoch": null, "warmup_steps": 129538, "weight_decay": 0.01}```
## 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 -->在进行爬取,清洗,处理后得到510w对文本对(还在持续增加),batchzise=80训练了20个epoch,使st的权重能够适应该问题空间,生成融合了领域知识的文本特征向量(体现为有关的文本距离更加接近,例如作品与登场人物,或者来自同一作品的登场人物)。README.md+25-79