End of training script.
Browse files- README.md +23 -129
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -5,59 +5,11 @@ tags:
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- dataset_size:
|
| 9 |
- loss:ContrastiveLoss
|
| 10 |
base_model: sentence-transformers/clip-ViT-B-32
|
| 11 |
-
widget:
|
| 12 |
-
- source_sentence: Ranger's Guile
|
| 13 |
-
sentences:
|
| 14 |
-
- >-
|
| 15 |
-
https://cards.scryfall.io/normal/front/0/1/01388e24-d66f-40a8-af41-0f84dd8ed3fe.jpg?1562781768
|
| 16 |
-
- >-
|
| 17 |
-
https://cards.scryfall.io/normal/front/2/0/20995638-e217-49f1-bccc-d1a344694fd8.jpg?1592711262
|
| 18 |
-
- >-
|
| 19 |
-
https://cards.scryfall.io/normal/front/1/3/13680953-cf05-4e38-a3cf-22900c02fab7.jpg?1706240764
|
| 20 |
-
- source_sentence: |-
|
| 21 |
-
{2}, {T}: Choose one that hasn't been chosen —
|
| 22 |
-
• This artifact deals 2 damage to target creature.
|
| 23 |
-
• Tap target creature.
|
| 24 |
-
• Sacrifice this artifact. You gain 3 life.
|
| 25 |
-
sentences:
|
| 26 |
-
- Haunted Ridge
|
| 27 |
-
- >-
|
| 28 |
-
https://cards.scryfall.io/normal/front/1/e/1ebb7ade-ebbb-49fb-b64f-fa247f9a9af6.jpg?1562544721
|
| 29 |
-
- Three Bowls of Porridge
|
| 30 |
-
- source_sentence: Soratami Mindsweeper
|
| 31 |
-
sentences:
|
| 32 |
-
- >-
|
| 33 |
-
https://cards.scryfall.io/normal/front/c/1/c13eacff-0fd1-4e2e-8213-5bf5fff973c8.jpg?1593095724
|
| 34 |
-
- >-
|
| 35 |
-
https://cards.scryfall.io/normal/front/6/7/67f55ef7-8479-4d56-9801-cb4fd5526e73.jpg?1675644776
|
| 36 |
-
- >-
|
| 37 |
-
https://cards.scryfall.io/normal/front/0/e/0ef3b83a-777c-45b6-97a1-25be237df79b.jpg?1561932561
|
| 38 |
-
- source_sentence: |-
|
| 39 |
-
Flying
|
| 40 |
-
Ward—Sacrifice a creature.
|
| 41 |
-
Whenever a creature dies, target opponent loses 2 life and you gain 2 life.
|
| 42 |
-
sentences:
|
| 43 |
-
- >-
|
| 44 |
-
https://cards.scryfall.io/normal/front/e/4/e4c7919a-de62-46df-a937-593647473ef5.jpg?1654567436
|
| 45 |
-
- >-
|
| 46 |
-
https://cards.scryfall.io/normal/front/9/7/9712ecaa-4059-44ba-98b7-07bfe7411b5b.jpg?1562447340
|
| 47 |
-
- >-
|
| 48 |
-
https://cards.scryfall.io/normal/front/0/7/078933b3-6d82-45f2-94e8-addf54cf1704.jpg?1706241798
|
| 49 |
-
- source_sentence: Glimpse of Freedom
|
| 50 |
-
sentences:
|
| 51 |
-
- >-
|
| 52 |
-
https://cards.scryfall.io/normal/front/c/1/c1e9c025-1cdb-4da8-8d28-14ad5efb512d.jpg?1581479361
|
| 53 |
-
- >-
|
| 54 |
-
https://cards.scryfall.io/normal/front/0/7/0770eb6a-4f01-4677-a401-14c1b30692c9.jpg?1673306796
|
| 55 |
-
- >-
|
| 56 |
-
https://cards.scryfall.io/normal/front/3/3/333039ef-b328-4082-85ae-162caed5612e.jpg?1738358111
|
| 57 |
pipeline_tag: sentence-similarity
|
| 58 |
library_name: sentence-transformers
|
| 59 |
-
datasets:
|
| 60 |
-
- philipp-zettl/mtg_cards-2025-04-04
|
| 61 |
---
|
| 62 |
|
| 63 |
# SentenceTransformer based on sentence-transformers/clip-ViT-B-32
|
|
@@ -108,9 +60,9 @@ from sentence_transformers import SentenceTransformer
|
|
| 108 |
model = SentenceTransformer("philipp-zettl/MTGEmb-small")
|
| 109 |
# Run inference
|
| 110 |
sentences = [
|
| 111 |
-
'
|
| 112 |
-
'
|
| 113 |
-
'
|
| 114 |
]
|
| 115 |
embeddings = model.encode(sentences)
|
| 116 |
print(embeddings.shape)
|
|
@@ -119,9 +71,9 @@ print(embeddings.shape)
|
|
| 119 |
# Get the similarity scores for the embeddings
|
| 120 |
similarities = model.similarity(embeddings, embeddings)
|
| 121 |
print(similarities)
|
| 122 |
-
# tensor([[1.0000, 0.
|
| 123 |
-
# [0.
|
| 124 |
-
# [0.
|
| 125 |
```
|
| 126 |
|
| 127 |
<!--
|
|
@@ -166,19 +118,19 @@ You can finetune this model on your own dataset.
|
|
| 166 |
|
| 167 |
#### Unnamed Dataset
|
| 168 |
|
| 169 |
-
* Size:
|
| 170 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 171 |
-
* Approximate statistics based on the first
|
| 172 |
-
| | sentence_0
|
| 173 |
-
|
| 174 |
-
| type | string
|
| 175 |
-
| details | <ul><li>min: 3 tokens</li><li>mean:
|
| 176 |
* Samples:
|
| 177 |
-
| sentence_0
|
| 178 |
-
|
| 179 |
-
| <code>
|
| 180 |
-
| <code>
|
| 181 |
-
| <code>
|
| 182 |
* Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
|
| 183 |
```json
|
| 184 |
{
|
|
@@ -191,9 +143,8 @@ You can finetune this model on your own dataset.
|
|
| 191 |
### Training Hyperparameters
|
| 192 |
#### Non-Default Hyperparameters
|
| 193 |
|
| 194 |
-
- `per_device_train_batch_size`:
|
| 195 |
-
- `per_device_eval_batch_size`:
|
| 196 |
-
- `num_train_epochs`: 5
|
| 197 |
- `multi_dataset_batch_sampler`: round_robin
|
| 198 |
|
| 199 |
#### All Hyperparameters
|
|
@@ -203,8 +154,8 @@ You can finetune this model on your own dataset.
|
|
| 203 |
- `do_predict`: False
|
| 204 |
- `eval_strategy`: no
|
| 205 |
- `prediction_loss_only`: True
|
| 206 |
-
- `per_device_train_batch_size`:
|
| 207 |
-
- `per_device_eval_batch_size`:
|
| 208 |
- `per_gpu_train_batch_size`: None
|
| 209 |
- `per_gpu_eval_batch_size`: None
|
| 210 |
- `gradient_accumulation_steps`: 1
|
|
@@ -216,7 +167,7 @@ You can finetune this model on your own dataset.
|
|
| 216 |
- `adam_beta2`: 0.999
|
| 217 |
- `adam_epsilon`: 1e-08
|
| 218 |
- `max_grad_norm`: 1
|
| 219 |
-
- `num_train_epochs`:
|
| 220 |
- `max_steps`: -1
|
| 221 |
- `lr_scheduler_type`: linear
|
| 222 |
- `lr_scheduler_kwargs`: {}
|
|
@@ -319,63 +270,6 @@ You can finetune this model on your own dataset.
|
|
| 319 |
|
| 320 |
</details>
|
| 321 |
|
| 322 |
-
### Training Logs
|
| 323 |
-
| Epoch | Step | Training Loss |
|
| 324 |
-
|:------:|:-----:|:-------------:|
|
| 325 |
-
| 0.0951 | 500 | 0.0269 |
|
| 326 |
-
| 0.1903 | 1000 | 0.0253 |
|
| 327 |
-
| 0.2854 | 1500 | 0.0253 |
|
| 328 |
-
| 0.3806 | 2000 | 0.0252 |
|
| 329 |
-
| 0.4757 | 2500 | 0.0252 |
|
| 330 |
-
| 0.5709 | 3000 | 0.0253 |
|
| 331 |
-
| 0.6660 | 3500 | 0.0252 |
|
| 332 |
-
| 0.7612 | 4000 | 0.0251 |
|
| 333 |
-
| 0.8563 | 4500 | 0.0251 |
|
| 334 |
-
| 0.9515 | 5000 | 0.0251 |
|
| 335 |
-
| 1.0466 | 5500 | 0.0251 |
|
| 336 |
-
| 1.1418 | 6000 | 0.0251 |
|
| 337 |
-
| 1.2369 | 6500 | 0.0252 |
|
| 338 |
-
| 1.3321 | 7000 | 0.0251 |
|
| 339 |
-
| 1.4272 | 7500 | 0.0252 |
|
| 340 |
-
| 1.5224 | 8000 | 0.0252 |
|
| 341 |
-
| 1.6175 | 8500 | 0.0251 |
|
| 342 |
-
| 1.7127 | 9000 | 0.0249 |
|
| 343 |
-
| 1.8078 | 9500 | 0.0252 |
|
| 344 |
-
| 1.9029 | 10000 | 0.025 |
|
| 345 |
-
| 1.9981 | 10500 | 0.0252 |
|
| 346 |
-
| 2.0932 | 11000 | 0.0251 |
|
| 347 |
-
| 2.1884 | 11500 | 0.0251 |
|
| 348 |
-
| 2.2835 | 12000 | 0.0252 |
|
| 349 |
-
| 2.3787 | 12500 | 0.0252 |
|
| 350 |
-
| 2.4738 | 13000 | 0.0251 |
|
| 351 |
-
| 2.5690 | 13500 | 0.025 |
|
| 352 |
-
| 2.6641 | 14000 | 0.025 |
|
| 353 |
-
| 2.7593 | 14500 | 0.0251 |
|
| 354 |
-
| 2.8544 | 15000 | 0.0251 |
|
| 355 |
-
| 2.9496 | 15500 | 0.0251 |
|
| 356 |
-
| 3.0447 | 16000 | 0.0251 |
|
| 357 |
-
| 3.1399 | 16500 | 0.0252 |
|
| 358 |
-
| 3.2350 | 17000 | 0.0251 |
|
| 359 |
-
| 3.3302 | 17500 | 0.025 |
|
| 360 |
-
| 3.4253 | 18000 | 0.0252 |
|
| 361 |
-
| 3.5205 | 18500 | 0.0251 |
|
| 362 |
-
| 3.6156 | 19000 | 0.025 |
|
| 363 |
-
| 3.7108 | 19500 | 0.0251 |
|
| 364 |
-
| 3.8059 | 20000 | 0.0252 |
|
| 365 |
-
| 3.9010 | 20500 | 0.025 |
|
| 366 |
-
| 3.9962 | 21000 | 0.025 |
|
| 367 |
-
| 4.0913 | 21500 | 0.0251 |
|
| 368 |
-
| 4.1865 | 22000 | 0.0251 |
|
| 369 |
-
| 4.2816 | 22500 | 0.025 |
|
| 370 |
-
| 4.3768 | 23000 | 0.025 |
|
| 371 |
-
| 4.4719 | 23500 | 0.025 |
|
| 372 |
-
| 4.5671 | 24000 | 0.0252 |
|
| 373 |
-
| 4.6622 | 24500 | 0.025 |
|
| 374 |
-
| 4.7574 | 25000 | 0.0252 |
|
| 375 |
-
| 4.8525 | 25500 | 0.025 |
|
| 376 |
-
| 4.9477 | 26000 | 0.025 |
|
| 377 |
-
|
| 378 |
-
|
| 379 |
### Framework Versions
|
| 380 |
- Python: 3.13.7
|
| 381 |
- Sentence Transformers: 5.1.2
|
|
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- dataset_size:5
|
| 9 |
- loss:ContrastiveLoss
|
| 10 |
base_model: sentence-transformers/clip-ViT-B-32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
pipeline_tag: sentence-similarity
|
| 12 |
library_name: sentence-transformers
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# SentenceTransformer based on sentence-transformers/clip-ViT-B-32
|
|
|
|
| 60 |
model = SentenceTransformer("philipp-zettl/MTGEmb-small")
|
| 61 |
# Run inference
|
| 62 |
sentences = [
|
| 63 |
+
'The weather is lovely today.',
|
| 64 |
+
"It's so sunny outside!",
|
| 65 |
+
'He drove to the stadium.',
|
| 66 |
]
|
| 67 |
embeddings = model.encode(sentences)
|
| 68 |
print(embeddings.shape)
|
|
|
|
| 71 |
# Get the similarity scores for the embeddings
|
| 72 |
similarities = model.similarity(embeddings, embeddings)
|
| 73 |
print(similarities)
|
| 74 |
+
# tensor([[1.0000, 0.9425, 0.8177],
|
| 75 |
+
# [0.9425, 1.0000, 0.8015],
|
| 76 |
+
# [0.8177, 0.8015, 1.0000]])
|
| 77 |
```
|
| 78 |
|
| 79 |
<!--
|
|
|
|
| 118 |
|
| 119 |
#### Unnamed Dataset
|
| 120 |
|
| 121 |
+
* Size: 5 training samples
|
| 122 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 123 |
+
* Approximate statistics based on the first 5 samples:
|
| 124 |
+
| | sentence_0 | sentence_1 | label |
|
| 125 |
+
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:------------------------------------------------|
|
| 126 |
+
| type | string | string | int |
|
| 127 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 16.8 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 53.6 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>0: ~60.00%</li><li>1: ~40.00%</li></ul> |
|
| 128 |
* Samples:
|
| 129 |
+
| sentence_0 | sentence_1 | label |
|
| 130 |
+
|:-----------------------------|:------------------------------------------------------------------------------------------------------------|:---------------|
|
| 131 |
+
| <code>Veteran Armorer</code> | <code>https://cards.scryfall.io/normal/front/0/0/0000419b-0bba-4488-8f7a-6194544ce91e.jpg?1721427487</code> | <code>0</code> |
|
| 132 |
+
| <code>Forest</code> | <code>https://cards.scryfall.io/normal/front/0/0/0000419b-0bba-4488-8f7a-6194544ce91e.jpg?1721427487</code> | <code>1</code> |
|
| 133 |
+
| <code>Forest</code> | <code>Veteran Armorer</code> | <code>0</code> |
|
| 134 |
* Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
|
| 135 |
```json
|
| 136 |
{
|
|
|
|
| 143 |
### Training Hyperparameters
|
| 144 |
#### Non-Default Hyperparameters
|
| 145 |
|
| 146 |
+
- `per_device_train_batch_size`: 64
|
| 147 |
+
- `per_device_eval_batch_size`: 64
|
|
|
|
| 148 |
- `multi_dataset_batch_sampler`: round_robin
|
| 149 |
|
| 150 |
#### All Hyperparameters
|
|
|
|
| 154 |
- `do_predict`: False
|
| 155 |
- `eval_strategy`: no
|
| 156 |
- `prediction_loss_only`: True
|
| 157 |
+
- `per_device_train_batch_size`: 64
|
| 158 |
+
- `per_device_eval_batch_size`: 64
|
| 159 |
- `per_gpu_train_batch_size`: None
|
| 160 |
- `per_gpu_eval_batch_size`: None
|
| 161 |
- `gradient_accumulation_steps`: 1
|
|
|
|
| 167 |
- `adam_beta2`: 0.999
|
| 168 |
- `adam_epsilon`: 1e-08
|
| 169 |
- `max_grad_norm`: 1
|
| 170 |
+
- `num_train_epochs`: 3
|
| 171 |
- `max_steps`: -1
|
| 172 |
- `lr_scheduler_type`: linear
|
| 173 |
- `lr_scheduler_kwargs`: {}
|
|
|
|
| 270 |
|
| 271 |
</details>
|
| 272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 273 |
### Framework Versions
|
| 274 |
- Python: 3.13.7
|
| 275 |
- Sentence Transformers: 5.1.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 605156676
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b41f0699e0483f5792e303ee4230710736646a005a402e19017010acb4607ad
|
| 3 |
size 605156676
|