File size: 1,635 Bytes
b565131
 
 
ece4151
 
 
 
 
 
 
 
b565131
 
ece4151
b565131
 
 
2c8dc9b
b565131
2c8dc9b
b565131
ece4151
b565131
 
 
 
 
 
 
 
 
 
ece4151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
language:
- en
pipeline_tag: sentence-similarity
tags:
  - sentence-transformers
  - feature-extraction
  - sentence-similarity
  - transformers
  - domain-specific
library_name: sentence-transformers
---

# **YGOMiniLM**
![time_wiz](https://ms.yugipedia.com//thumb/7/76/TimeWizard-MRD-EN-UR-UE-25thAnniversaryEdition.png/300px-TimeWizard-MRD-EN-UR-UE-25thAnniversaryEdition.png)
[ImgSource](https://yugipedia.com/wiki/Time_Wizard)

This is a sentence-transformers/paraphrase-MiniLM-L3-v2 model that has undergone further domain specific pretraining via Masked Language Modelling. 

Its intended use is to create sentence embeddings for fast vector search in the domain of YuGiOh discourse.

## **Training Data**
The training data was split into two parts:
1) A private collection of data collected from YouTube Comments:

|CREATOR|N_COMMENTS|
|-----|-----|
|thecalieffect|20,592|
|MBTYuGiOh|5439|
|MSTTV |5340|
|mkohl40|5224|

2) The Full Database of YuGiOh cards accessed via the [YGOProDeck API](https://ygoprodeck.com/api-guide/) as of 17/05/2023. The `name`, `type`, `race` and `desc` fields were concatenated and delimited by `\t` to create the training examples.

## **Usage**
```
pip install sentence-transformers
```
Then to get embeddings you simply run the following:
```
from sentence_transformers import SentenceTransformer
sentences = ["FLIP: Target 1 monster on the field; destroy that target.",
              "Union Carrier needs to go.",
              "Scythe lock is healthy for the game"
              ]

model = SentenceTransformer("jkswin/YGO_MiniLM")
embeddings = model.encode(sentences)
print(embeddings)
```