---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:2839738
- loss:CoSENTLoss
base_model: Mihaiii/gte-micro-v4
widget:
- source_sentence: 314d5e89-55f7-42b4-af19-d4d0f499a265_c808a8ec-895c-4777-9e11-e83ce34eddef
sentences:
- https://cards.scryfall.io/normal/front/3/1/314d5e89-55f7-42b4-af19-d4d0f499a265.jpg?1710406384
- https://cards.scryfall.io/normal/front/c/8/c808a8ec-895c-4777-9e11-e83ce34eddef.jpg?1593272714
- 'Title: Killer Instinct
Cost: {4}{R}{G}
Colors: [''G'', ''R'']
Type: Enchantment
Desc: At the beginning of your upkeep, reveal the top card of your library. If
it''s a creature card, put it onto the battlefield. That creature gains haste
until end of turn. Sacrifice it at the beginning of the next end step.'
- 'Title: Ixidor, Reality Sculptor
Cost: {3}{U}{U}
Colors: [''U'']
Type: Legendary Creature — Human Wizard
Desc: Face-down creatures get +1/+1.
{2}{U}: Turn target face-down creature face up.'
- source_sentence: a252a1f5-bba5-4525-8141-57caea9624e9_5fd29cd7-9950-49c0-9e71-d6b0f944292c
sentences:
- https://cards.scryfall.io/normal/front/5/f/5fd29cd7-9950-49c0-9e71-d6b0f944292c.jpg?1637627823
- 'Title: Celestial Judgment
Cost: {4}{W}{W}
Colors: [''W'']
Type: Sorcery
Desc: For each different power among creatures on the battlefield, choose a creature
with that power. Destroy each creature not chosen this way.'
- 'Title: Gibbering Hyenas
Cost: {2}{G}
Colors: [''G'']
Type: Creature — Hyena
Desc: This creature can''t block black creatures.'
- https://cards.scryfall.io/normal/front/a/2/a252a1f5-bba5-4525-8141-57caea9624e9.jpg?1562720953
- source_sentence: 0d09c2c8-526b-4693-bbaa-109911ce5281_1a47da7c-80f3-4b98-aaac-778c34a35cb6
sentences:
- https://cards.scryfall.io/normal/front/1/a/1a47da7c-80f3-4b98-aaac-778c34a35cb6.jpg?1561817948
- 'Title: Corpse Harvester
Cost: {3}{B}{B}
Colors: [''B'']
Type: Creature — Zombie Wizard
Desc: {1}{B}, {T}, Sacrifice a creature: Search your library for a Zombie card
and a Swamp card, reveal them, put them into your hand, then shuffle.'
- https://cards.scryfall.io/normal/front/0/d/0d09c2c8-526b-4693-bbaa-109911ce5281.jpg?1562897662
- 'Title: Master Biomancer
Cost: {2}{G}{U}
Colors: [''G'', ''U'']
Type: Creature — Elf Wizard
Desc: Each other creature you control enters with a number of additional +1/+1
counters on it equal to this creature''s power and as a Mutant in addition to
its other types.'
- source_sentence: 938d5157-154c-4300-82d4-0e23d934d436_10be9a82-4008-45ae-a739-fdee95e39619
sentences:
- https://cards.scryfall.io/normal/front/9/3/938d5157-154c-4300-82d4-0e23d934d436.jpg?1562922364
- https://cards.scryfall.io/normal/front/1/0/10be9a82-4008-45ae-a739-fdee95e39619.jpg?1711892785
- 'Title: Shadow of Doubt
Cost: {U/B}{U/B}
Colors: [''B'', ''U'']
Type: Instant
Desc: ({U/B} can be paid with either {U} or {B}.)
Players can''t search libraries this turn.
Draw a card.'
- 'Title: Stone-Tongue Basilisk
Cost: {4}{G}{G}{G}
Colors: [''G'']
Type: Creature — Basilisk
Desc: Whenever this creature deals combat damage to a creature, destroy that creature
at end of combat.
Threshold — As long as seven or more cards are in your graveyard, all creatures
able to block this creature do so.'
- source_sentence: 141a031d-f899-497b-adf7-4af142078085_0367fac8-6990-4544-ac7d-ed363b55a9cf
sentences:
- 'Title: Quirion Explorer
Cost: {1}{G}
Colors: [''G'']
Type: Creature — Elf Druid Scout
Desc: {T}: Add one mana of any color that a land an opponent controls could produce.'
- https://cards.scryfall.io/normal/front/1/4/141a031d-f899-497b-adf7-4af142078085.jpg?1562899241
- 'Title: Savage Hunger
Cost: {2}{G}
Colors: [''G'']
Type: Enchantment — Aura
Desc: Enchant creature
Enchanted creature gets +1/+0 and has trample.
Cycling {2} ({2}, Discard this card: Draw a card.)'
- https://cards.scryfall.io/normal/front/0/3/0367fac8-6990-4544-ac7d-ed363b55a9cf.jpg?1562700664
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: SentenceTransformer based on Mihaiii/gte-micro-v4
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts dev
type: sts-dev
metrics:
- type: pearson_cosine
value: 0.3217344770453035
name: Pearson Cosine
- type: spearman_cosine
value: 0.33145577598581166
name: Spearman Cosine
- type: pearson_cosine
value: 0.43782959181274894
name: Pearson Cosine
- type: spearman_cosine
value: 0.4808140058026093
name: Spearman Cosine
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts test
type: sts-test
metrics:
- type: pearson_cosine
value: 0.5782060287197249
name: Pearson Cosine
- type: spearman_cosine
value: 0.6348407516031069
name: Spearman Cosine
---
# SentenceTransformer based on Mihaiii/gte-micro-v4
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Mihaiii/gte-micro-v4](https://huggingface.co/Mihaiii/gte-micro-v4) on the json dataset. It maps sentences & paragraphs to a 384-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:** [Mihaiii/gte-micro-v4](https://huggingface.co/Mihaiii/gte-micro-v4)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 384 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- json
### 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': 384, '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("philipp-zettl/gte-micro-v4-mtg")
# Run inference
sentences = [
'141a031d-f899-497b-adf7-4af142078085_0367fac8-6990-4544-ac7d-ed363b55a9cf',
"Title: Quirion Explorer\nCost: {1}{G}\nColors: ['G']\nType: Creature — Elf Druid Scout\nDesc: {T}: Add one mana of any color that a land an opponent controls could produce.",
"Title: Savage Hunger\nCost: {2}{G}\nColors: ['G']\nType: Enchantment — Aura\nDesc: Enchant creature\nEnchanted creature gets +1/+0 and has trample.\nCycling {2} ({2}, Discard this card: Draw a card.)",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Semantic Similarity
* Datasets: `sts-dev` and `sts-test`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | sts-dev | sts-test |
|:--------------------|:-----------|:-----------|
| pearson_cosine | 0.3217 | 0.5782 |
| **spearman_cosine** | **0.3315** | **0.6348** |
#### Semantic Similarity
* Dataset: `sts-dev`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| pearson_cosine | 0.4378 |
| **spearman_cosine** | **0.4808** |
## Training Details
### Training Dataset
#### json
* Dataset: json
* Size: 2,839,738 training samples
* Columns: uuid
, sentence_1
, sentence_2
, image_1
, image_2
, and score
* Approximate statistics based on the first 1000 samples:
| | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
| type | string | string | string | string | string | float |
| details |
08f9b863-10b7-46d6-badd-97381e6c7c5e_4330efa7-a11b-4776-9fb0-1cae8aed67b1
| Title: Blast Zone
Type: Land
Desc: This land enters with a charge counter on it.
{T}: Add {C}.
{X}{X}, {T}: Put X charge counters on this land.
{3}, {T}, Sacrifice this land: Destroy each nonland permanent with mana value equal to the number of charge counters on this land.
| Title: Tom van de Logt Bio (2000)
Type: Card
Desc: Quarterfinalist Tom van de Logt posted a perfect 6—0 record during the Standard portion of this year's World Championships. The 19-year-old Groesbeek, Holland native was playing a deck that had a big impact on the metagame this year, "Replenish." This deck used cards like Attunement and Frantic Search to put powerful enchantments, such as Parallax Wave and Opalescence, into the graveyard and then used Replenish to put them all back into play at once.
| https://cards.scryfall.io/normal/front/0/8/08f9b863-10b7-46d6-badd-97381e6c7c5e.jpg?1674423042
| https://cards.scryfall.io/normal/front/4/3/4330efa7-a11b-4776-9fb0-1cae8aed67b1.jpg?1562767017
| 0.25
|
| abe9cf1e-d398-41e0-8b11-afe1015e4fd9_40cb67f7-b4e1-423b-8f55-d44ed383e778
| Title: Coral Net
Cost: {U}
Colors: ['U']
Type: Enchantment — Aura
Desc: Enchant green or white creature
Enchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you discard a card."
| Title: Silumgar Butcher
Cost: {4}{B}
Colors: ['B']
Type: Creature — Zombie Djinn
Desc: Exploit (When this creature enters, you may sacrifice a creature.)
When this creature exploits a creature, target creature gets -3/-3 until end of turn.
| https://cards.scryfall.io/normal/front/a/b/abe9cf1e-d398-41e0-8b11-afe1015e4fd9.jpg?1562631469
| https://cards.scryfall.io/normal/front/4/0/40cb67f7-b4e1-423b-8f55-d44ed383e778.jpg?1562785294
| 0.0
|
| 3dd13408-b4db-42e7-bf3c-d46716538a7c_05a6dc90-3997-4911-8bd6-854c85eca35b
| Title: Rishadan Brigand
Cost: {4}{U}
Colors: ['U']
Type: Creature — Human Pirate
Desc: Flying
When this creature enters, each opponent sacrifices a permanent of their choice unless they pay {3}.
This creature can block only creatures with flying.
| Title: Banishing Stroke
Cost: {5}{W}
Colors: ['W']
Type: Instant
Desc: Put target artifact, creature, or enchantment on the bottom of its owner's library.
Miracle {W} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
| https://cards.scryfall.io/normal/front/3/d/3dd13408-b4db-42e7-bf3c-d46716538a7c.jpg?1632145390
| https://cards.scryfall.io/normal/front/0/5/05a6dc90-3997-4911-8bd6-854c85eca35b.jpg?1723433851
| 0.0
|
* 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
#### json
* Dataset: json
* Size: 74,730 evaluation samples
* Columns: uuid
, sentence_1
, sentence_2
, image_1
, image_2
, and score
* Approximate statistics based on the first 1000 samples:
| | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------|
| type | string | string | string | string | string | float |
| details | 6bdd8645-aee9-44cb-acaa-2674f55cdf2f_b34bb149-2e50-462e-8b83-5c8339bb3aff
| Title: Syr Cadian, Knight Owl
Cost: {3}{W}{W}
Colors: ['W']
Type: Legendary Creature — Bird Knight
Desc: Knightlifelink (Damage dealt by Knights you control also causes you to gain that much life.)
{W}: Syr Cadian gains vigilance until end of turn. Activate only from sunrise to sunset.
{B}: Syr Cadian gains flying until end of turn. Activate only from sunset to sunrise.
| Title: Non-Human Cannonball
Cost: {2}{R}
Colors: ['R']
Type: Artifact Creature — Clown Robot
Desc: When this creature dies, roll a six-sided die. If the result is 4 or less, this creature deals that much damage to you.
| https://cards.scryfall.io/normal/front/6/b/6bdd8645-aee9-44cb-acaa-2674f55cdf2f.jpg?1664317187
| https://cards.scryfall.io/normal/front/b/3/b34bb149-2e50-462e-8b83-5c8339bb3aff.jpg?1673917877
| 0.25
|
| 860f4304-38f1-4c2f-a122-2590619522fd_08d6db9b-b2da-4148-aa49-8c2fecac6e32
| Title: Hindering Light
Cost: {W}{U}
Colors: ['U', 'W']
Type: Instant
Desc: Counter target spell that targets you or a permanent you control.
Draw a card.
| Title: Gleam of Resistance
Cost: {4}{W}
Colors: ['W']
Type: Instant
Desc: Creatures you control get +1/+2 until end of turn. Untap those creatures.
Basic landcycling {1}{W} ({1}{W}, Discard this card: Search your library for a basic land card, reveal it, put it into your hand, then shuffle.)
| https://cards.scryfall.io/normal/front/8/6/860f4304-38f1-4c2f-a122-2590619522fd.jpg?1712353583
| https://cards.scryfall.io/normal/front/0/8/08d6db9b-b2da-4148-aa49-8c2fecac6e32.jpg?1573505575
| 0.25
|
| 91b448f4-aa0c-42c7-a771-e8dd20e0520c_46f810c2-310e-42f5-ab1f-d56396cf5124
| Title: Practiced Tactics
Cost: {W}
Colors: ['W']
Type: Instant
Desc: Choose target attacking or blocking creature. Practiced Tactics deals damage to that creature equal to twice the number of creatures in your party. (Your party consists of up to one each of Cleric, Rogue, Warrior, and Wizard.)
| Title: Anointer Priest
Cost: {1}{W}
Colors: ['W']
Type: Creature — Human Cleric
Desc: Whenever a creature token you control enters, you gain 1 life.
Embalm {3}{W} ({3}{W}, Exile this card from your graveyard: Create a token that's a copy of it, except it's a white Zombie Human Cleric with no mana cost. Embalm only as a sorcery.)
| https://cards.scryfall.io/normal/front/9/1/91b448f4-aa0c-42c7-a771-e8dd20e0520c.jpg?1604192922
| https://cards.scryfall.io/normal/front/4/6/46f810c2-310e-42f5-ab1f-d56396cf5124.jpg?1599769231
| 0.25
|
* 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`: 64
- `per_device_eval_batch_size`: 64
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `log_level_replica`: passive
- `log_on_each_node`: False
- `logging_nan_inf_filter`: False
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters