Sentence Similarity
sentence-transformers
PyTorch
Transformers
English
bert
fill-mask
feature-extraction
domain-specific
text-embeddings-inference
Instructions to use jkswin/YGO_MiniLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jkswin/YGO_MiniLM with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jkswin/YGO_MiniLM") 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] - Transformers
How to use jkswin/YGO_MiniLM with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("jkswin/YGO_MiniLM") model = AutoModelForMaskedLM.from_pretrained("jkswin/YGO_MiniLM") - Notebooks
- Google Colab
- Kaggle
YGOMiniLM
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:
- A private collection of data collected from YouTube Comments:
| CREATOR | N_COMMENTS |
|---|---|
| thecalieffect | 20,592 |
| MBTYuGiOh | 5439 |
| MSTTV | 5340 |
| mkohl40 | 5224 |
- The Full Database of YuGiOh cards accessed via the YGOProDeck API as of 17/05/2023. The
name,type,raceanddescfields were concatenated and delimited by\tto 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)
- Downloads last month
- 10