---
language:
- en
license: apache-2.0
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:8959
- loss:CoSENTLoss
base_model: prajjwal1/bert-tiny
widget:
- source_sentence: 'You can target 1 face-up card you control; destroy it, and if
you do, Special Summon 1 "Zoodiac" monster from your Deck. You can only use this
effect of "Zoodiac Barrage" once per turn. If this card is destroyed by a card
effect and sent to the GY: You can target 1 "Zoodiac" Xyz Monster you control;
attach this card from your GY to that Xyz Monster as Xyz Material.'
sentences:
- Activate only while all monsters on the field are face-up. Both players send monsters
they control to the GY so that they each control only 1 Attribute.
- 'Equip only to a "Mikanko" monster. The equipped monster cannot be destroyed by
card effects. If a monster(s) is Special Summoned to your opponent''s field (except
during the Damage Step): You can target 1 monster you control and 1 monster your
opponent controls; return them to the hand. You can only use this effect of "Mikanko
Purification Dance" once per turn.'
- Destroy as many Normal Monsters on the field as possible, and if you do, Special
Summon Level 4 or lower Dinosaur-Type monsters from your Deck, up to the number
destroyed, but destroy them during the End Phase. You can banish this card from
your GY, then target 1 Dinosaur-Type monster you control and 1 card your opponent
controls; destroy them.
- source_sentence: "Target 1 monster on the field or in either GY, then activate 1\
\ of these appropriate effects;\r\n● Attach the targeted monster to 1 Rank 2 monster\
\ you control as material.\r\n● Place the targeted monster your opponent controls\
\ in your zone your Link-2 monster points to, and take control of it.\r\n● Special\
\ Summon the targeted monster from either GY to your zone your Link-2 monster\
\ points to.\r\nYou can only activate 1 \"Spright Double Cross\" per turn."
sentences:
- "(This card is always treated as an \"Infernoble Knight\" card.)\r\nYou can discard\
\ this card, then target 1 Warrior monster you control; equip it with 1 Equip\
\ Spell from your Deck that can equip to it. When this card, not equipped with\
\ an Equip Card, is destroyed by battle with an opponent's monster and sent to\
\ the GY: You can Special Summon this card, and if you do, equip that monster\
\ your opponent controls to this card. You can only use each effect of \"Courageous\
\ Crimson Chevalier Bradamante\" once per turn."
- Discard 1 card from your hand during your Main Phase 1. This monster can attack
twice during the Battle Phase of this turn.
- 'Elemental HERO Bubbleman" + "Elemental HERO Clayman"
Must be Fusion Summoned and cannot be Special Summoned by other ways'
- source_sentence: When this card is Normal Summoned, place 1 Spell counter on it
(max. 1). You can remove 1 Spell counter from this card to have 1 face-up monster
you control gain 500 ATK, until the End Phase.
sentences:
- 'At the end of the Battle Phase: You can discard this card, then target 1 monster
in your GY that was destroyed by battle and sent there this turn; Special Summon
it. When an opponent''s monster declares an attack: You can banish this card from
your GY, then target any number of "Kuriboh" monsters in your GY; Special Summon
them.'
- Target 1 face-up Spell your opponent controls; until the end of this turn, negate
the activated effects on the field of that card and of Spells with the same original
name, also if the targeted card would be sent to your opponent's GY, return it
to their hand instead. You can only activate 1 "Blizzard" per turn.
- Each time a monster is Normal Summoned or Set, place 1 Dragonic Counter on this
card. You can send this face-up card to the GY to Special Summon 1 Dragon-Type
monster from your Deck whose Level is less than or equal to the number of Dragonic
Counters on this card.
- source_sentence: 'When this card is sent to the GY: Special Summon 2 "Fluff Tokens"
(Plant-Type/WIND/Level 1/ATK 0/DEF 0) in Defense Position. These Tokens cannot
be Tributed for a Tribute Summon during the turn they are Special Summoned.'
sentences:
- 'You can send this card from your hand to the GY; Special Summon 1 WATER monster
from your hand. If a face-up WATER monster(s) you control is destroyed by battle
or card effect, while this card is in your GY: You can banish this card; Special
Summon 1 "Icejade" monster from your hand or GY, except "Icejade Tremora". You
can only use each effect of "Icejade Tremora" once per turn.'
- If you have no monsters in your GY, you can Special Summon this card (from your
hand). You can send 1 Equip Spell Card equipped to this card to the GY, then target
up to 3 monsters in your opponent's GY; banish those targets, and this card gains
500 ATK for each monster banished by this effect, until the End Phase.
- '1 Level 1 monster When an opponent''s monster declares an attack: You can Tribute
this card; change that opponent''s monster''s ATK to 0, until the end of this
turn. If this card is in your GY (Quick Effect): You can Tribute 1 Level 1 monster;
Special Summon this card. You can only use this effect of "Linkuriboh" once per
turn.'
- source_sentence: This card cannot be Normal Summoned or Set. This card cannot be
Special Summoned except by the effect of "The First Sarcophagus". When this card
is Special Summoned, you can Special Summon up to 4 Level 2 or lower Zombie-Type
Normal Monsters from your GY.
sentences:
- Target 1 Level 4 or lower "Magistus" monster in your GY; Special Summon it. If
a "Magistus" card(s) in your Spell & Trap Zone would be destroyed by your opponent's
card effect, you can banish this card from your GY instead. You can only use each
effect of "Magistus Vritra" once per turn.
- "Banish 1 \"Springans\", \"Therion\" or \"Spright\" card from your hand or GY,\
\ then activate 1 of these effects;\r\n● Special Summon 1 \"Springans\" monster\
\ from your Deck.\r\n● Special Summon 1 \"Therion\" monster from your GY.\r\n\
● Banish 1 Level/Rank/Link 2 monster you control and 1 card your opponent controls.\r\
\nYou can only activate 1 \"Spright Smashers\" per turn."
- When this card is Normal Summoned, you can remove from play 1 Psychic-Type monster
from your Deck. This card's Level becomes the Level of that monster.
datasets:
- Tien09/pair_similarity_new_1231
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# MPNet base trained on AllNLI triplets
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) on the [pair_similarity_new_1231](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231) dataset. It maps sentences & paragraphs to a 128-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 128 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [pair_similarity_new_1231](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231)
- **Language:** en
- **License:** apache-2.0
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 128, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("Tien09/tiny_bert_ft_sim_score_1231_1")
# Run inference
sentences = [
'This card cannot be Normal Summoned or Set. This card cannot be Special Summoned except by the effect of "The First Sarcophagus". When this card is Special Summoned, you can Special Summon up to 4 Level 2 or lower Zombie-Type Normal Monsters from your GY.',
'Target 1 Level 4 or lower "Magistus" monster in your GY; Special Summon it. If a "Magistus" card(s) in your Spell & Trap Zone would be destroyed by your opponent\'s card effect, you can banish this card from your GY instead. You can only use each effect of "Magistus Vritra" once per turn.',
"When this card is Normal Summoned, you can remove from play 1 Psychic-Type monster from your Deck. This card's Level becomes the Level of that monster.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 128]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Training Details
### Training Dataset
#### pair_similarity_new_1231
* Dataset: [pair_similarity_new_1231](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231) at [757b53a](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231/tree/757b53ac8f8e9d494b3767fc3b87a5277b8853a7)
* Size: 8,959 training samples
* Columns: effect_text
, score
, and effect_text2
* Approximate statistics based on the first 1000 samples:
| | effect_text | score | effect_text2 |
|:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | float | string |
| details |
When your opponent's monster attacks a face-up Level 4 or lower Toon Monster on your side of the field, you can make the attack a direct attack to your Life Points.
| 0.0
| Cannot be used as material for a Fusion, Synchro, or Xyz Summon. Cannot be Tributed while face-up in the Monster Zone. If this card is sent to the GY as material for a Link Summon: Special Summon this card in Defense Position, to the opponent's field of the player that Link Summoned. You can only use this effect of "Click & Echo" twice per turn. While this card, that was Summoned by its effect, is in the Monster Zone, you must keep your hand revealed.
|
| When your opponent Special Summons a monster, you can discard 1 card to Special Summon this card from your hand. Your opponent cannot remove cards from play.
| 0.0
| Once per turn you can place 2 Venom Counters on 1 monster your opponent controls. If you activate this effect, this card cannot attack during this turn.
|
| Mystical Elf" + "Curtain of the Dark Ones
| 0.0
| If you Normal or Special Summon a "U.A." monster(s) (except during the Damage Step): You can Special Summon this card from your hand. If this card is Special Summoned: You can activate 1 of these effects.
● Target 1 card on the field; destroy it.
● Negate the effects of all face-up monsters on the field until the end of this turn, except "U.A." monsters.
You can only use each effect of "U.A. Player Manager" once per turn.
|
* Loss: [CoSENTLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
```
### Evaluation Dataset
#### pair_similarity_new_1231
* Dataset: [pair_similarity_new_1231](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231) at [757b53a](https://huggingface.co/datasets/Tien09/pair_similarity_new_1231/tree/757b53ac8f8e9d494b3767fc3b87a5277b8853a7)
* Size: 1,920 evaluation samples
* Columns: effect_text
, score
, and effect_text2
* Approximate statistics based on the first 1000 samples:
| | effect_text | score | effect_text2 |
|:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | float | string |
| details | 2+ Level 4 monsters
This Xyz Summoned card gains 500 ATK x the total Link Rating of Link Monsters linked to this card. You can detach 2 materials from this card, then target 1 4 Cyberse Link Monster in your GY; Special Summon it to your field so it points to this card, also you cannot Special Summon other monsters or attack directly for the rest of this turn.
| 1.0
| 3 Level 4 monsters Once per turn, you can also Xyz Summon "Zoodiac Tigermortar" by using 1 "Zoodiac" monster you control with a different name as Xyz Material. (If you used an Xyz Monster, any Xyz Materials attached to it also become Xyz Materials on this card.) This card gains ATK and DEF equal to the ATK and DEF of all "Zoodiac" monsters attached to it as Materials. Once per turn: You can detach 1 Xyz Material from this card, then target 1 Xyz Monster you control and 1 "Zoodiac" monster in your GY; attach that "Zoodiac" monster to that Xyz Monster as Xyz Material.
|
| 1 Tuner + 1 or more non-Tuner Pendulum Monsters Once per turn: You can target 1 Pendulum Monster on the field or 1 card in the Pendulum Zone; destroy it, and if you do, shuffle 1 card on the field into the Deck. Once per turn: You can Special Summon 1 "Dracoslayer" monster from your Deck in Defense Position, but it cannot be used as a Synchro Material for a Summon.
| 0.5
| You can Ritual Summon this card with a "Recipe" card. If this card is Special Summoned: You can target 1 Spell/Trap on the field; destroy it. When a card or effect is activated that targets this card on the field, or when this card is targeted for an attack (Quick Effect): You can Tribute this card and 1 Attack Position monster on either field, and if you do, Special Summon 1 Level 3 or 4 "Nouvelles" Ritual Monster from your hand or Deck. You can only use each effect of "Confiras de Nouvelles" once per turn.
|
| If you control an Illusion or Spellcaster monster: Add 1 "White Forest" monster from your Deck to your hand. If this card is sent to the GY to activate a monster effect: You can Set this card. You can only use each effect of "Tales of the White Forest" once per turn.
| 0.0
| Once per turn, when your opponent activates a Trap Card, you can destroy the Trap Card and inflict 800 damage to your opponent.
|
* Loss: [CoSENTLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 15
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters