philipp-zettl commited on
Commit
26ddd80
·
verified ·
1 Parent(s): ffb7119

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:2839738
10
+ - loss:CosineSimilarityLoss
11
+ base_model: TaylorAI/bge-micro-v2
12
+ widget:
13
+ - source_sentence: 314d5e89-55f7-42b4-af19-d4d0f499a265_c808a8ec-895c-4777-9e11-e83ce34eddef
14
+ sentences:
15
+ - https://cards.scryfall.io/normal/front/3/1/314d5e89-55f7-42b4-af19-d4d0f499a265.jpg?1710406384
16
+ - https://cards.scryfall.io/normal/front/c/8/c808a8ec-895c-4777-9e11-e83ce34eddef.jpg?1593272714
17
+ - 'Title: Killer Instinct
18
+
19
+ Cost: {4}{R}{G}
20
+
21
+ Colors: [''G'', ''R'']
22
+
23
+ Type: Enchantment
24
+
25
+ Desc: At the beginning of your upkeep, reveal the top card of your library. If
26
+ it''s a creature card, put it onto the battlefield. That creature gains haste
27
+ until end of turn. Sacrifice it at the beginning of the next end step.'
28
+ - 'Title: Ixidor, Reality Sculptor
29
+
30
+ Cost: {3}{U}{U}
31
+
32
+ Colors: [''U'']
33
+
34
+ Type: Legendary Creature — Human Wizard
35
+
36
+ Desc: Face-down creatures get +1/+1.
37
+
38
+ {2}{U}: Turn target face-down creature face up.'
39
+ - source_sentence: a252a1f5-bba5-4525-8141-57caea9624e9_5fd29cd7-9950-49c0-9e71-d6b0f944292c
40
+ sentences:
41
+ - https://cards.scryfall.io/normal/front/5/f/5fd29cd7-9950-49c0-9e71-d6b0f944292c.jpg?1637627823
42
+ - 'Title: Celestial Judgment
43
+
44
+ Cost: {4}{W}{W}
45
+
46
+ Colors: [''W'']
47
+
48
+ Type: Sorcery
49
+
50
+ Desc: For each different power among creatures on the battlefield, choose a creature
51
+ with that power. Destroy each creature not chosen this way.'
52
+ - 'Title: Gibbering Hyenas
53
+
54
+ Cost: {2}{G}
55
+
56
+ Colors: [''G'']
57
+
58
+ Type: Creature — Hyena
59
+
60
+ Desc: This creature can''t block black creatures.'
61
+ - https://cards.scryfall.io/normal/front/a/2/a252a1f5-bba5-4525-8141-57caea9624e9.jpg?1562720953
62
+ - source_sentence: 0d09c2c8-526b-4693-bbaa-109911ce5281_1a47da7c-80f3-4b98-aaac-778c34a35cb6
63
+ sentences:
64
+ - https://cards.scryfall.io/normal/front/1/a/1a47da7c-80f3-4b98-aaac-778c34a35cb6.jpg?1561817948
65
+ - 'Title: Corpse Harvester
66
+
67
+ Cost: {3}{B}{B}
68
+
69
+ Colors: [''B'']
70
+
71
+ Type: Creature — Zombie Wizard
72
+
73
+ Desc: {1}{B}, {T}, Sacrifice a creature: Search your library for a Zombie card
74
+ and a Swamp card, reveal them, put them into your hand, then shuffle.'
75
+ - https://cards.scryfall.io/normal/front/0/d/0d09c2c8-526b-4693-bbaa-109911ce5281.jpg?1562897662
76
+ - 'Title: Master Biomancer
77
+
78
+ Cost: {2}{G}{U}
79
+
80
+ Colors: [''G'', ''U'']
81
+
82
+ Type: Creature — Elf Wizard
83
+
84
+ Desc: Each other creature you control enters with a number of additional +1/+1
85
+ counters on it equal to this creature''s power and as a Mutant in addition to
86
+ its other types.'
87
+ - source_sentence: 938d5157-154c-4300-82d4-0e23d934d436_10be9a82-4008-45ae-a739-fdee95e39619
88
+ sentences:
89
+ - https://cards.scryfall.io/normal/front/9/3/938d5157-154c-4300-82d4-0e23d934d436.jpg?1562922364
90
+ - https://cards.scryfall.io/normal/front/1/0/10be9a82-4008-45ae-a739-fdee95e39619.jpg?1711892785
91
+ - 'Title: Shadow of Doubt
92
+
93
+ Cost: {U/B}{U/B}
94
+
95
+ Colors: [''B'', ''U'']
96
+
97
+ Type: Instant
98
+
99
+ Desc: ({U/B} can be paid with either {U} or {B}.)
100
+
101
+ Players can''t search libraries this turn.
102
+
103
+ Draw a card.'
104
+ - 'Title: Stone-Tongue Basilisk
105
+
106
+ Cost: {4}{G}{G}{G}
107
+
108
+ Colors: [''G'']
109
+
110
+ Type: Creature — Basilisk
111
+
112
+ Desc: Whenever this creature deals combat damage to a creature, destroy that creature
113
+ at end of combat.
114
+
115
+ Threshold — As long as seven or more cards are in your graveyard, all creatures
116
+ able to block this creature do so.'
117
+ - source_sentence: 141a031d-f899-497b-adf7-4af142078085_0367fac8-6990-4544-ac7d-ed363b55a9cf
118
+ sentences:
119
+ - 'Title: Quirion Explorer
120
+
121
+ Cost: {1}{G}
122
+
123
+ Colors: [''G'']
124
+
125
+ Type: Creature — Elf Druid Scout
126
+
127
+ Desc: {T}: Add one mana of any color that a land an opponent controls could produce.'
128
+ - https://cards.scryfall.io/normal/front/1/4/141a031d-f899-497b-adf7-4af142078085.jpg?1562899241
129
+ - 'Title: Savage Hunger
130
+
131
+ Cost: {2}{G}
132
+
133
+ Colors: [''G'']
134
+
135
+ Type: Enchantment — Aura
136
+
137
+ Desc: Enchant creature
138
+
139
+ Enchanted creature gets +1/+0 and has trample.
140
+
141
+ Cycling {2} ({2}, Discard this card: Draw a card.)'
142
+ - https://cards.scryfall.io/normal/front/0/3/0367fac8-6990-4544-ac7d-ed363b55a9cf.jpg?1562700664
143
+ datasets:
144
+ - philipp-zettl/mtg_cards-2025-04-04
145
+ pipeline_tag: sentence-similarity
146
+ library_name: sentence-transformers
147
+ metrics:
148
+ - pearson_cosine
149
+ - spearman_cosine
150
+ model-index:
151
+ - name: SentenceTransformer based on TaylorAI/bge-micro-v2
152
+ results:
153
+ - task:
154
+ type: semantic-similarity
155
+ name: Semantic Similarity
156
+ dataset:
157
+ name: sts dev
158
+ type: sts-dev
159
+ metrics:
160
+ - type: pearson_cosine
161
+ value: 0.6088841930069427
162
+ name: Pearson Cosine
163
+ - type: spearman_cosine
164
+ value: 0.6631234959726412
165
+ name: Spearman Cosine
166
+ - task:
167
+ type: semantic-similarity
168
+ name: Semantic Similarity
169
+ dataset:
170
+ name: sts test
171
+ type: sts-test
172
+ metrics:
173
+ - type: pearson_cosine
174
+ value: 0.6049296249687236
175
+ name: Pearson Cosine
176
+ - type: spearman_cosine
177
+ value: 0.6607758630525871
178
+ name: Spearman Cosine
179
+ ---
180
+
181
+ # SentenceTransformer based on TaylorAI/bge-micro-v2
182
+
183
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [TaylorAI/bge-micro-v2](https://huggingface.co/TaylorAI/bge-micro-v2) on the [mtg_cards-2025-04-04](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04) 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.
184
+
185
+ ## Model Details
186
+
187
+ ### Model Description
188
+ - **Model Type:** Sentence Transformer
189
+ - **Base model:** [TaylorAI/bge-micro-v2](https://huggingface.co/TaylorAI/bge-micro-v2) <!-- at revision 3edf6d7de0faa426b09780416fe61009f26ae589 -->
190
+ - **Maximum Sequence Length:** 512 tokens
191
+ - **Output Dimensionality:** 384 dimensions
192
+ - **Similarity Function:** Cosine Similarity
193
+ - **Training Dataset:**
194
+ - [mtg_cards-2025-04-04](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04)
195
+ - **Language:** en
196
+ <!-- - **License:** Unknown -->
197
+
198
+ ### Model Sources
199
+
200
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
201
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
202
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
203
+
204
+ ### Full Model Architecture
205
+
206
+ ```
207
+ SentenceTransformer(
208
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
209
+ (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})
210
+ )
211
+ ```
212
+
213
+ ## Usage
214
+
215
+ ### Direct Usage (Sentence Transformers)
216
+
217
+ First install the Sentence Transformers library:
218
+
219
+ ```bash
220
+ pip install -U sentence-transformers
221
+ ```
222
+
223
+ Then you can load this model and run inference.
224
+ ```python
225
+ from sentence_transformers import SentenceTransformer
226
+
227
+ # Download from the 🤗 Hub
228
+ model = SentenceTransformer("philipp-zettl/bge-micro-v2-mtg")
229
+ # Run inference
230
+ sentences = [
231
+ '141a031d-f899-497b-adf7-4af142078085_0367fac8-6990-4544-ac7d-ed363b55a9cf',
232
+ "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.",
233
+ "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.)",
234
+ ]
235
+ embeddings = model.encode(sentences)
236
+ print(embeddings.shape)
237
+ # [3, 384]
238
+
239
+ # Get the similarity scores for the embeddings
240
+ similarities = model.similarity(embeddings, embeddings)
241
+ print(similarities.shape)
242
+ # [3, 3]
243
+ ```
244
+
245
+ <!--
246
+ ### Direct Usage (Transformers)
247
+
248
+ <details><summary>Click to see the direct usage in Transformers</summary>
249
+
250
+ </details>
251
+ -->
252
+
253
+ <!--
254
+ ### Downstream Usage (Sentence Transformers)
255
+
256
+ You can finetune this model on your own dataset.
257
+
258
+ <details><summary>Click to expand</summary>
259
+
260
+ </details>
261
+ -->
262
+
263
+ <!--
264
+ ### Out-of-Scope Use
265
+
266
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
267
+ -->
268
+
269
+ ## Evaluation
270
+
271
+ ### Metrics
272
+
273
+ #### Semantic Similarity
274
+
275
+ * Datasets: `sts-dev` and `sts-test`
276
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
277
+
278
+ | Metric | sts-dev | sts-test |
279
+ |:--------------------|:-----------|:-----------|
280
+ | pearson_cosine | 0.6089 | 0.6049 |
281
+ | **spearman_cosine** | **0.6631** | **0.6608** |
282
+
283
+ <!--
284
+ ## Bias, Risks and Limitations
285
+
286
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
287
+ -->
288
+
289
+ <!--
290
+ ### Recommendations
291
+
292
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
293
+ -->
294
+
295
+ ## Training Details
296
+
297
+ ### Training Dataset
298
+
299
+ #### mtg_cards-2025-04-04
300
+
301
+ * Dataset: [mtg_cards-2025-04-04](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04) at [a35ccc4](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04/tree/a35ccc4221eea5c0e29bba1c65d52b53c8f9d3ee)
302
+ * Size: 2,839,738 training samples
303
+ * Columns: <code>uuid</code>, <code>sentence_1</code>, <code>sentence_2</code>, <code>image_1</code>, <code>image_2</code>, and <code>score</code>
304
+ * Approximate statistics based on the first 1000 samples:
305
+ | | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
306
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------|
307
+ | type | string | string | string | string | string | float |
308
+ | details | <ul><li>min: 49 tokens</li><li>mean: 56.99 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 69.4 tokens</li><li>max: 180 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 68.59 tokens</li><li>max: 166 tokens</li></ul> | <ul><li>min: 53 tokens</li><li>mean: 58.17 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: 52 tokens</li><li>mean: 58.28 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: -1.0</li><li>mean: -0.43</li><li>max: 0.5</li></ul> |
309
+ * Samples:
310
+ | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
311
+ |:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:------------------|
312
+ | <code>08f9b863-10b7-46d6-badd-97381e6c7c5e_4330efa7-a11b-4776-9fb0-1cae8aed67b1</code> | <code>Title: Blast Zone<br>Type: Land<br>Desc: This land enters with a charge counter on it.<br>{T}: Add {C}.<br>{X}{X}, {T}: Put X charge counters on this land.<br>{3}, {T}, Sacrifice this land: Destroy each nonland permanent with mana value equal to the number of charge counters on this land.</code> | <code>Title: Tom van de Logt Bio (2000)<br>Type: Card<br>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.</code> | <code>https://cards.scryfall.io/normal/front/0/8/08f9b863-10b7-46d6-badd-97381e6c7c5e.jpg?1674423042</code> | <code>https://cards.scryfall.io/normal/front/4/3/4330efa7-a11b-4776-9fb0-1cae8aed67b1.jpg?1562767017</code> | <code>0.25</code> |
313
+ | <code>abe9cf1e-d398-41e0-8b11-afe1015e4fd9_40cb67f7-b4e1-423b-8f55-d44ed383e778</code> | <code>Title: Coral Net<br>Cost: {U}<br>Colors: ['U']<br>Type: Enchantment — Aura<br>Desc: Enchant green or white creature<br>Enchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you discard a card."</code> | <code>Title: Silumgar Butcher<br>Cost: {4}{B}<br>Colors: ['B']<br>Type: Creature — Zombie Djinn<br>Desc: Exploit (When this creature enters, you may sacrifice a creature.)<br>When this creature exploits a creature, target creature gets -3/-3 until end of turn.</code> | <code>https://cards.scryfall.io/normal/front/a/b/abe9cf1e-d398-41e0-8b11-afe1015e4fd9.jpg?1562631469</code> | <code>https://cards.scryfall.io/normal/front/4/0/40cb67f7-b4e1-423b-8f55-d44ed383e778.jpg?1562785294</code> | <code>-1.0</code> |
314
+ | <code>3dd13408-b4db-42e7-bf3c-d46716538a7c_05a6dc90-3997-4911-8bd6-854c85eca35b</code> | <code>Title: Rishadan Brigand<br>Cost: {4}{U}<br>Colors: ['U']<br>Type: Creature — Human Pirate<br>Desc: Flying<br>When this creature enters, each opponent sacrifices a permanent of their choice unless they pay {3}.<br>This creature can block only creatures with flying.</code> | <code>Title: Banishing Stroke<br>Cost: {5}{W}<br>Colors: ['W']<br>Type: Instant<br>Desc: Put target artifact, creature, or enchantment on the bottom of its owner's library.<br>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.)</code> | <code>https://cards.scryfall.io/normal/front/3/d/3dd13408-b4db-42e7-bf3c-d46716538a7c.jpg?1632145390</code> | <code>https://cards.scryfall.io/normal/front/0/5/05a6dc90-3997-4911-8bd6-854c85eca35b.jpg?1723433851</code> | <code>-1.0</code> |
315
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
316
+ ```json
317
+ {
318
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
319
+ }
320
+ ```
321
+
322
+ ### Evaluation Dataset
323
+
324
+ #### mtg_cards-2025-04-04
325
+
326
+ * Dataset: [mtg_cards-2025-04-04](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04) at [a35ccc4](https://huggingface.co/datasets/philipp-zettl/mtg_cards-2025-04-04/tree/a35ccc4221eea5c0e29bba1c65d52b53c8f9d3ee)
327
+ * Size: 74,730 evaluation samples
328
+ * Columns: <code>uuid</code>, <code>sentence_1</code>, <code>sentence_2</code>, <code>image_1</code>, <code>image_2</code>, and <code>score</code>
329
+ * Approximate statistics based on the first 1000 samples:
330
+ | | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
331
+ |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------|
332
+ | type | string | string | string | string | string | float |
333
+ | details | <ul><li>min: 50 tokens</li><li>mean: 56.9 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 68.44 tokens</li><li>max: 181 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 69.49 tokens</li><li>max: 179 tokens</li></ul> | <ul><li>min: 52 tokens</li><li>mean: 58.22 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: 52 tokens</li><li>mean: 58.21 tokens</li><li>max: 64 tokens</li></ul> | <ul><li>min: -1.0</li><li>mean: -0.44</li><li>max: 0.75</li></ul> |
334
+ * Samples:
335
+ | uuid | sentence_1 | sentence_2 | image_1 | image_2 | score |
336
+ |:---------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:------------------|
337
+ | <code>6bdd8645-aee9-44cb-acaa-2674f55cdf2f_b34bb149-2e50-462e-8b83-5c8339bb3aff</code> | <code>Title: Syr Cadian, Knight Owl<br>Cost: {3}{W}{W}<br>Colors: ['W']<br>Type: Legendary Creature — Bird Knight<br>Desc: Knightlifelink (Damage dealt by Knights you control also causes you to gain that much life.)<br>{W}: Syr Cadian gains vigilance until end of turn. Activate only from sunrise to sunset.<br>{B}: Syr Cadian gains flying until end of turn. Activate only from sunset to sunrise.</code> | <code>Title: Non-Human Cannonball<br>Cost: {2}{R}<br>Colors: ['R']<br>Type: Artifact Creature — Clown Robot<br>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.</code> | <code>https://cards.scryfall.io/normal/front/6/b/6bdd8645-aee9-44cb-acaa-2674f55cdf2f.jpg?1664317187</code> | <code>https://cards.scryfall.io/normal/front/b/3/b34bb149-2e50-462e-8b83-5c8339bb3aff.jpg?1673917877</code> | <code>0.25</code> |
338
+ | <code>860f4304-38f1-4c2f-a122-2590619522fd_08d6db9b-b2da-4148-aa49-8c2fecac6e32</code> | <code>Title: Hindering Light<br>Cost: {W}{U}<br>Colors: ['U', 'W']<br>Type: Instant<br>Desc: Counter target spell that targets you or a permanent you control.<br>Draw a card.</code> | <code>Title: Gleam of Resistance<br>Cost: {4}{W}<br>Colors: ['W']<br>Type: Instant<br>Desc: Creatures you control get +1/+2 until end of turn. Untap those creatures.<br>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.)</code> | <code>https://cards.scryfall.io/normal/front/8/6/860f4304-38f1-4c2f-a122-2590619522fd.jpg?1712353583</code> | <code>https://cards.scryfall.io/normal/front/0/8/08d6db9b-b2da-4148-aa49-8c2fecac6e32.jpg?1573505575</code> | <code>0.25</code> |
339
+ | <code>91b448f4-aa0c-42c7-a771-e8dd20e0520c_46f810c2-310e-42f5-ab1f-d56396cf5124</code> | <code>Title: Practiced Tactics<br>Cost: {W}<br>Colors: ['W']<br>Type: Instant<br>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.)</code> | <code>Title: Anointer Priest<br>Cost: {1}{W}<br>Colors: ['W']<br>Type: Creature — Human Cleric<br>Desc: Whenever a creature token you control enters, you gain 1 life.<br>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.)</code> | <code>https://cards.scryfall.io/normal/front/9/1/91b448f4-aa0c-42c7-a771-e8dd20e0520c.jpg?1604192922</code> | <code>https://cards.scryfall.io/normal/front/4/6/46f810c2-310e-42f5-ab1f-d56396cf5124.jpg?1599769231</code> | <code>0.25</code> |
340
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
341
+ ```json
342
+ {
343
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
344
+ }
345
+ ```
346
+
347
+ ### Training Hyperparameters
348
+ #### Non-Default Hyperparameters
349
+
350
+ - `eval_strategy`: steps
351
+ - `per_device_train_batch_size`: 64
352
+ - `per_device_eval_batch_size`: 64
353
+ - `learning_rate`: 2e-05
354
+ - `num_train_epochs`: 1
355
+ - `warmup_ratio`: 0.1
356
+ - `log_level_replica`: passive
357
+ - `log_on_each_node`: False
358
+ - `logging_nan_inf_filter`: False
359
+ - `push_to_hub`: True
360
+ - `resume_from_checkpoint`: ./models/bge-micro-v2-mtg/
361
+ - `hub_model_id`: philipp-zettl/bge-micro-v2-mtg
362
+ - `hub_always_push`: True
363
+ - `batch_sampler`: no_duplicates
364
+
365
+ #### All Hyperparameters
366
+ <details><summary>Click to expand</summary>
367
+
368
+ - `overwrite_output_dir`: False
369
+ - `do_predict`: False
370
+ - `eval_strategy`: steps
371
+ - `prediction_loss_only`: True
372
+ - `per_device_train_batch_size`: 64
373
+ - `per_device_eval_batch_size`: 64
374
+ - `per_gpu_train_batch_size`: None
375
+ - `per_gpu_eval_batch_size`: None
376
+ - `gradient_accumulation_steps`: 1
377
+ - `eval_accumulation_steps`: None
378
+ - `torch_empty_cache_steps`: None
379
+ - `learning_rate`: 2e-05
380
+ - `weight_decay`: 0.0
381
+ - `adam_beta1`: 0.9
382
+ - `adam_beta2`: 0.999
383
+ - `adam_epsilon`: 1e-08
384
+ - `max_grad_norm`: 1.0
385
+ - `num_train_epochs`: 1
386
+ - `max_steps`: -1
387
+ - `lr_scheduler_type`: linear
388
+ - `lr_scheduler_kwargs`: {}
389
+ - `warmup_ratio`: 0.1
390
+ - `warmup_steps`: 0
391
+ - `log_level`: passive
392
+ - `log_level_replica`: passive
393
+ - `log_on_each_node`: False
394
+ - `logging_nan_inf_filter`: False
395
+ - `save_safetensors`: True
396
+ - `save_on_each_node`: False
397
+ - `save_only_model`: False
398
+ - `restore_callback_states_from_checkpoint`: False
399
+ - `no_cuda`: False
400
+ - `use_cpu`: False
401
+ - `use_mps_device`: False
402
+ - `seed`: 42
403
+ - `data_seed`: None
404
+ - `jit_mode_eval`: False
405
+ - `use_ipex`: False
406
+ - `bf16`: False
407
+ - `fp16`: False
408
+ - `fp16_opt_level`: O1
409
+ - `half_precision_backend`: auto
410
+ - `bf16_full_eval`: False
411
+ - `fp16_full_eval`: False
412
+ - `tf32`: None
413
+ - `local_rank`: 0
414
+ - `ddp_backend`: None
415
+ - `tpu_num_cores`: None
416
+ - `tpu_metrics_debug`: False
417
+ - `debug`: []
418
+ - `dataloader_drop_last`: False
419
+ - `dataloader_num_workers`: 0
420
+ - `dataloader_prefetch_factor`: None
421
+ - `past_index`: -1
422
+ - `disable_tqdm`: False
423
+ - `remove_unused_columns`: True
424
+ - `label_names`: None
425
+ - `load_best_model_at_end`: False
426
+ - `ignore_data_skip`: False
427
+ - `fsdp`: []
428
+ - `fsdp_min_num_params`: 0
429
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
430
+ - `tp_size`: 0
431
+ - `fsdp_transformer_layer_cls_to_wrap`: None
432
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
433
+ - `deepspeed`: None
434
+ - `label_smoothing_factor`: 0.0
435
+ - `optim`: adamw_torch
436
+ - `optim_args`: None
437
+ - `adafactor`: False
438
+ - `group_by_length`: False
439
+ - `length_column_name`: length
440
+ - `ddp_find_unused_parameters`: None
441
+ - `ddp_bucket_cap_mb`: None
442
+ - `ddp_broadcast_buffers`: False
443
+ - `dataloader_pin_memory`: True
444
+ - `dataloader_persistent_workers`: False
445
+ - `skip_memory_metrics`: True
446
+ - `use_legacy_prediction_loop`: False
447
+ - `push_to_hub`: True
448
+ - `resume_from_checkpoint`: ./models/bge-micro-v2-mtg/
449
+ - `hub_model_id`: philipp-zettl/bge-micro-v2-mtg
450
+ - `hub_strategy`: every_save
451
+ - `hub_private_repo`: None
452
+ - `hub_always_push`: True
453
+ - `gradient_checkpointing`: False
454
+ - `gradient_checkpointing_kwargs`: None
455
+ - `include_inputs_for_metrics`: False
456
+ - `include_for_metrics`: []
457
+ - `eval_do_concat_batches`: True
458
+ - `fp16_backend`: auto
459
+ - `push_to_hub_model_id`: None
460
+ - `push_to_hub_organization`: None
461
+ - `mp_parameters`:
462
+ - `auto_find_batch_size`: False
463
+ - `full_determinism`: False
464
+ - `torchdynamo`: None
465
+ - `ray_scope`: last
466
+ - `ddp_timeout`: 1800
467
+ - `torch_compile`: False
468
+ - `torch_compile_backend`: None
469
+ - `torch_compile_mode`: None
470
+ - `dispatch_batches`: None
471
+ - `split_batches`: None
472
+ - `include_tokens_per_second`: False
473
+ - `include_num_input_tokens_seen`: False
474
+ - `neftune_noise_alpha`: None
475
+ - `optim_target_modules`: None
476
+ - `batch_eval_metrics`: False
477
+ - `eval_on_start`: False
478
+ - `use_liger_kernel`: False
479
+ - `eval_use_gather_object`: False
480
+ - `average_tokens_across_devices`: False
481
+ - `prompts`: None
482
+ - `batch_sampler`: no_duplicates
483
+ - `multi_dataset_batch_sampler`: proportional
484
+
485
+ </details>
486
+
487
+ ### Training Logs
488
+ | Epoch | Step | Training Loss | Validation Loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
489
+ |:------:|:-----:|:-------------:|:---------------:|:-----------------------:|:------------------------:|
490
+ | -1 | -1 | - | - | 0.3031 | - |
491
+ | 0.0113 | 500 | 0.8624 | - | - | - |
492
+ | 0.0225 | 1000 | 0.3681 | - | - | - |
493
+ | 0.0338 | 1500 | 0.3505 | - | - | - |
494
+ | 0.0451 | 2000 | 0.3485 | - | - | - |
495
+ | 0.0563 | 2500 | 0.3467 | - | - | - |
496
+ | 0.0676 | 3000 | 0.3475 | - | - | - |
497
+ | 0.0789 | 3500 | 0.3469 | - | - | - |
498
+ | 0.0901 | 4000 | 0.3465 | - | - | - |
499
+ | 0.1014 | 4500 | 0.3477 | - | - | - |
500
+ | 0.1127 | 5000 | 0.3465 | 0.3498 | 0.6792 | - |
501
+ | 0.1240 | 5500 | 0.3491 | - | - | - |
502
+ | 0.1352 | 6000 | 0.3461 | - | - | - |
503
+ | 0.1465 | 6500 | 0.3454 | - | - | - |
504
+ | 0.1578 | 7000 | 0.3448 | - | - | - |
505
+ | 0.1690 | 7500 | 0.3432 | - | - | - |
506
+ | 0.1803 | 8000 | 0.3424 | - | - | - |
507
+ | 0.1916 | 8500 | 0.3442 | - | - | - |
508
+ | 0.2028 | 9000 | 0.3439 | - | - | - |
509
+ | 0.2141 | 9500 | 0.3465 | - | - | - |
510
+ | 0.2254 | 10000 | 0.3422 | 0.3447 | 0.6660 | - |
511
+ | 0.2366 | 10500 | 0.3422 | - | - | - |
512
+ | 0.2479 | 11000 | 0.3436 | - | - | - |
513
+ | 0.2592 | 11500 | 0.3453 | - | - | - |
514
+ | 0.2704 | 12000 | 0.3472 | - | - | - |
515
+ | 0.2817 | 12500 | 0.3459 | - | - | - |
516
+ | 0.2930 | 13000 | 0.3481 | - | - | - |
517
+ | 0.3043 | 13500 | 0.3438 | - | - | - |
518
+ | 0.3155 | 14000 | 0.3494 | - | - | - |
519
+ | 0.3268 | 14500 | 0.3444 | - | - | - |
520
+ | 0.3381 | 15000 | 0.3457 | 0.3438 | 0.6606 | - |
521
+ | 0.3493 | 15500 | 0.3438 | - | - | - |
522
+ | 0.3606 | 16000 | 0.3434 | - | - | - |
523
+ | 0.3719 | 16500 | 0.343 | - | - | - |
524
+ | 0.3831 | 17000 | 0.3441 | - | - | - |
525
+ | 0.3944 | 17500 | 0.345 | - | - | - |
526
+ | 0.4057 | 18000 | 0.3419 | - | - | - |
527
+ | 0.4169 | 18500 | 0.3415 | - | - | - |
528
+ | 0.4282 | 19000 | 0.3401 | - | - | - |
529
+ | 0.4395 | 19500 | 0.3407 | - | - | - |
530
+ | 0.4507 | 20000 | 0.3424 | 0.3397 | 0.6610 | - |
531
+ | 0.4620 | 20500 | 0.3402 | - | - | - |
532
+ | 0.4733 | 21000 | 0.3393 | - | - | - |
533
+ | 0.4846 | 21500 | 0.3439 | - | - | - |
534
+ | 0.4958 | 22000 | 0.3429 | - | - | - |
535
+ | 0.5071 | 22500 | 0.3428 | - | - | - |
536
+ | 0.5184 | 23000 | 0.3408 | - | - | - |
537
+ | 0.5296 | 23500 | 0.3402 | - | - | - |
538
+ | 0.5409 | 24000 | 0.3396 | - | - | - |
539
+ | 0.5522 | 24500 | 0.3405 | - | - | - |
540
+ | 0.5634 | 25000 | 0.3377 | 0.3365 | 0.6642 | - |
541
+ | 0.5747 | 25500 | 0.3378 | - | - | - |
542
+ | 0.5860 | 26000 | 0.341 | - | - | - |
543
+ | 0.5972 | 26500 | 0.3382 | - | - | - |
544
+ | 0.6085 | 27000 | 0.3399 | - | - | - |
545
+ | 0.6198 | 27500 | 0.3354 | - | - | - |
546
+ | 0.6310 | 28000 | 0.3407 | - | - | - |
547
+ | 0.6423 | 28500 | 0.3356 | - | - | - |
548
+ | 0.6536 | 29000 | 0.3375 | - | - | - |
549
+ | 0.6648 | 29500 | 0.3373 | - | - | - |
550
+ | 0.6761 | 30000 | 0.3348 | 0.3328 | 0.6661 | - |
551
+ | 0.6874 | 30500 | 0.3357 | - | - | - |
552
+ | 0.6987 | 31000 | 0.336 | - | - | - |
553
+ | 0.7099 | 31500 | 0.3378 | - | - | - |
554
+ | 0.7212 | 32000 | 0.3374 | - | - | - |
555
+ | 0.7325 | 32500 | 0.3389 | - | - | - |
556
+ | 0.7437 | 33000 | 0.3353 | - | - | - |
557
+ | 0.7550 | 33500 | 0.339 | - | - | - |
558
+ | 0.7663 | 34000 | 0.3334 | - | - | - |
559
+ | 0.7775 | 34500 | 0.3354 | - | - | - |
560
+ | 0.7888 | 35000 | 0.3348 | 0.3294 | 0.6604 | - |
561
+ | 0.8001 | 35500 | 0.3352 | - | - | - |
562
+ | 0.8113 | 36000 | 0.3325 | - | - | - |
563
+ | 0.8226 | 36500 | 0.3324 | - | - | - |
564
+ | 0.8339 | 37000 | 0.3345 | - | - | - |
565
+ | 0.8451 | 37500 | 0.3323 | - | - | - |
566
+ | 0.8564 | 38000 | 0.3321 | - | - | - |
567
+ | 0.8677 | 38500 | 0.3332 | - | - | - |
568
+ | 0.8790 | 39000 | 0.335 | - | - | - |
569
+ | 0.8902 | 39500 | 0.3341 | - | - | - |
570
+ | 0.9015 | 40000 | 0.3346 | 0.3273 | 0.6631 | - |
571
+ | 0.9128 | 40500 | 0.3352 | - | - | - |
572
+ | 0.9240 | 41000 | 0.336 | - | - | - |
573
+ | 0.9353 | 41500 | 0.3319 | - | - | - |
574
+ | 0.9466 | 42000 | 0.3323 | - | - | - |
575
+ | 0.9578 | 42500 | 0.3326 | - | - | - |
576
+ | 0.9691 | 43000 | 0.333 | - | - | - |
577
+ | 0.9804 | 43500 | 0.3316 | - | - | - |
578
+ | 0.9916 | 44000 | 0.3303 | - | - | - |
579
+ | -1 | -1 | - | - | - | 0.6608 |
580
+
581
+
582
+ ### Framework Versions
583
+ - Python: 3.10.14
584
+ - Sentence Transformers: 4.0.2
585
+ - Transformers: 4.50.3
586
+ - PyTorch: 2.6.0+cu124
587
+ - Accelerate: 1.6.0
588
+ - Datasets: 3.5.0
589
+ - Tokenizers: 0.21.1
590
+
591
+ ## Citation
592
+
593
+ ### BibTeX
594
+
595
+ #### Sentence Transformers
596
+ ```bibtex
597
+ @inproceedings{reimers-2019-sentence-bert,
598
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
599
+ author = "Reimers, Nils and Gurevych, Iryna",
600
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
601
+ month = "11",
602
+ year = "2019",
603
+ publisher = "Association for Computational Linguistics",
604
+ url = "https://arxiv.org/abs/1908.10084",
605
+ }
606
+ ```
607
+
608
+ <!--
609
+ ## Glossary
610
+
611
+ *Clearly define terms in order to be accessible across audiences.*
612
+ -->
613
+
614
+ <!--
615
+ ## Model Card Authors
616
+
617
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
618
+ -->
619
+
620
+ <!--
621
+ ## Model Card Contact
622
+
623
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
624
+ -->
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
4
+ "transformers": "4.50.3",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }