/ Модель

Характеристики

Контекст
512 токенов
Параметры
18,8 млн
Архитектура
bert · dense
Базовая модель
bge-micro-v2
Библиотека
sentence-transformers
Опубликована
7 апр 2025

bge-micro-v2-mtg

ЭмбеддингиТекст → embedding3 профессии

Компактная англоязычная модель эмбеддингов, дообученная для сравнения текстов и семантического поиска по описаниям карт Magic: The Gathering.

117скачиваний за 30 дней0лайковвеса обновлены7 апр 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

philipp-zettl/bge-micro-v2-mtg — англоязычная модель Sentence Transformer, дообученная автором на наборе данных Magic: The Gathering (mtg_cards-2025-04-04) на базе TaylorAI/bge-micro-v2. Она кодирует предложения и абзацы в плотные векторы размерности 384 и оценивает семантическое сходство по косинусной мере. Модель подходит для семантического поиска и сравнения текстов, связанных с картами MTG, а также для поиска перефразирований и кластеризации.

Архитектура основана на BERT с усреднением токенных представлений; максимальная длина входа — 512 токенов. Карточка приводит результаты на наборах sts-dev и sts-test, но не сообщает их применимость к другим областям. Модель выпущена под лицензией базовой модели, сведения о которой в предоставленных данных отсутствуют.

Сценарии применения

  • семантический поиск по текстам карт Magic: The Gathering
  • сравнение сходства описаний и эффектов карт MTG
  • поиск перефразированных текстов о картах
  • кластеризация текстов, связанных с картами MTG

Ограничения

Максимальная длина входа — 512 токенов; качество для текстов вне тематики Magic: The Gathering отдельно не подтверждено. Результаты на sts-dev и sts-test не гарантируют качество для конкретной поисковой задачи.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

SentenceTransformer based on TaylorAI/bge-micro-v2

This is a sentence-transformers model finetuned from TaylorAI/bge-micro-v2 on the 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.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: TaylorAI/bge-micro-v2
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 384 dimensions
  • Similarity Function: Cosine Similarity
  • Training Dataset:
  • Language: en

Model Sources

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:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("philipp-zettl/bge-micro-v2-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

Metricsts-devsts-test
pearson_cosine0.60890.6049
spearman_cosine0.66310.6608

Training Details

Training Dataset

mtg_cards-2025-04-04

  • Dataset: mtg_cards-2025-04-04 at a35ccc4
  • 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:
    uuidsentence_1sentence_2image_1image_2score
    typestringstringstringstringstringfloat
    detailsmin: 49 tokensmean: 56.99 tokensmax: 65 tokensmin: 17 tokensmean: 69.4 tokensmax: 180 tokensmin: 15 tokensmean: 68.59 tokensmax: 166 tokensmin: 53 tokensmean: 58.17 tokensmax: 64 tokensmin: 52 tokensmean: 58.28 tokensmax: 64 tokensmin: -1.0mean: -0.43max: 0.5
  • Samples:
    uuidsentence_1sentence_2image_1image_2score
    08f9b863-10b7-46d6-badd-97381e6c7c5e_4330efa7-a11b-4776-9fb0-1cae8aed67b1Title: Blast ZoneType: LandDesc: 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: CardDesc: 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?1674423042https://cards.scryfall.io/normal/front/4/3/4330efa7-a11b-4776-9fb0-1cae8aed67b1.jpg?15627670170.25
    abe9cf1e-d398-41e0-8b11-afe1015e4fd9_40cb67f7-b4e1-423b-8f55-d44ed383e778Title: Coral NetCost: {U}Colors: ['U']Type: Enchantment — AuraDesc: Enchant green or white creatureEnchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you discard a card."Title: Silumgar ButcherCost: {4}{B}Colors: ['B']Type: Creature — Zombie DjinnDesc: 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?1562631469https://cards.scryfall.io/normal/front/4/0/40cb67f7-b4e1-423b-8f55-d44ed383e778.jpg?1562785294-1.0
    3dd13408-b4db-42e7-bf3c-d46716538a7c_05a6dc90-3997-4911-8bd6-854c85eca35bTitle: Rishadan BrigandCost: {4}{U}Colors: ['U']Type: Creature — Human PirateDesc: FlyingWhen 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 StrokeCost: {5}{W}Colors: ['W']Type: InstantDesc: 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?1632145390https://cards.scryfall.io/normal/front/0/5/05a6dc90-3997-4911-8bd6-854c85eca35b.jpg?1723433851-1.0
  • Loss: CosineSimilarityLoss with these parameters:
    {
        "loss_fct": "torch.nn.modules.loss.MSELoss"
    }
    

Evaluation Dataset

mtg_cards-2025-04-04

  • Dataset: mtg_cards-2025-04-04 at a35ccc4
  • 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:
    uuidsentence_1sentence_2image_1image_2score
    typestringstringstringstringstringfloat
    detailsmin: 50 tokensmean: 56.9 tokensmax: 65 tokensmin: 14 tokensmean: 68.44 tokensmax: 181 tokensmin: 15 tokensmean: 69.49 tokensmax: 179 tokensmin: 52 tokensmean: 58.22 tokensmax: 64 tokensmin: 52 tokensmean: 58.21 tokensmax: 64 tokensmin: -1.0mean: -0.44max: 0.75
  • Samples:
    uuidsentence_1sentence_2image_1image_2score
    6bdd8645-aee9-44cb-acaa-2674f55cdf2f_b34bb149-2e50-462e-8b83-5c8339bb3affTitle: Syr Cadian, Knight OwlCost: {3}{W}{W}Colors: ['W']Type: Legendary Creature — Bird KnightDesc: 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 CannonballCost: {2}{R}Colors: ['R']Type: Artifact Creature — Clown RobotDesc: 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?1664317187https://cards.scryfall.io/normal/front/b/3/b34bb149-2e50-462e-8b83-5c8339bb3aff.jpg?16739178770.25
    860f4304-38f1-4c2f-a122-2590619522fd_08d6db9b-b2da-4148-aa49-8c2fecac6e32Title: Hindering LightCost: {W}{U}Colors: ['U', 'W']Type: InstantDesc: Counter target spell that targets you or a permanent you control.Draw a card.Title: Gleam of ResistanceCost: {4}{W}Colors: ['W']Type: InstantDesc: 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?1712353583https://cards.scryfall.io/normal/front/0/8/08d6db9b-b2da-4148-aa49-8c2fecac6e32.jpg?15735055750.25
    91b448f4-aa0c-42c7-a771-e8dd20e0520c_46f810c2-310e-42f5-ab1f-d56396cf5124Title: Practiced TacticsCost: {W}Colors: ['W']Type: InstantDesc: 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 PriestCost: {1}{W}Colors: ['W']Type: Creature — Human ClericDesc: 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?1604192922https://cards.scryfall.io/normal/front/4/6/46f810c2-310e-42f5-ab1f-d56396cf5124.jpg?15997692310.25
  • Loss: CosineSimilarityLoss with these parameters:
    {
        "loss_fct": "torch.nn.modules.loss.MSELoss"
    }
    

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
  • push_to_hub: True
  • resume_from_checkpoint: ./models/bge-micro-v2-mtg/
  • hub_model_id: philipp-zettl/bge-micro-v2-mtg
  • hub_always_push: True
  • batch_sampler: no_duplicates

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 64
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 2e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 1
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.1
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: passive
  • log_on_each_node: False
  • logging_nan_inf_filter: False
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • use_ipex: False
  • bf16: False
  • fp16: False
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • tp_size: 0
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: True
  • resume_from_checkpoint: ./models/bge-micro-v2-mtg/
  • hub_model_id: philipp-zettl/bge-micro-v2-mtg
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: True
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • dispatch_batches: None
  • split_batches: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

EpochStepTraining LossValidation Losssts-dev_spearman_cosinests-test_spearman_cosine
-1-1--0.3031-
0.01135000.8624---
0.022510000.3681---
0.033815000.3505---
0.045120000.3485---
0.056325000.3467---
0.067630000.3475---
0.078935000.3469---
0.090140000.3465---
0.101445000.3477---
0.112750000.34650.34980.6792-
0.124055000.3491---
0.135260000.3461---
0.146565000.3454---
0.157870000.3448---
0.169075000.3432---
0.180380000.3424---
0.191685000.3442---
0.202890000.3439---
0.214195000.3465---
0.2254100000.34220.34470.6660-
0.2366105000.3422---
0.2479110000.3436---
0.2592115000.3453---
0.2704120000.3472---
0.2817125000.3459---
0.2930130000.3481---
0.3043135000.3438---
0.3155140000.3494---
0.3268145000.3444---
0.3381150000.34570.34380.6606-
0.3493155000.3438---
0.3606160000.3434---
0.3719165000.343---
0.3831170000.3441---
0.3944175000.345---
0.4057180000.3419---
0.4169185000.3415---
0.4282190000.3401---
0.4395195000.3407---
0.4507200000.34240.33970.6610-
0.4620205000.3402---
0.4733210000.3393---
0.4846215000.3439---
0.4958220000.3429---
0.5071225000.3428---
0.5184230000.3408---
0.5296235000.3402---
0.5409240000.3396---
0.5522245000.3405---
0.5634250000.33770.33650.6642-
0.5747255000.3378---
0.5860260000.341---
0.5972265000.3382---
0.6085270000.3399---
0.6198275000.3354---
0.6310280000.3407---
0.6423285000.3356---
0.6536290000.3375---
0.6648295000.3373---
0.6761300000.33480.33280.6661-
0.6874305000.3357---
0.6987310000.336---
0.7099315000.3378---
0.7212320000.3374---
0.7325325000.3389---
0.7437330000.3353---
0.7550335000.339---
0.7663340000.3334---
0.7775345000.3354---
0.7888350000.33480.32940.6604-
0.8001355000.3352---
0.8113360000.3325---
0.8226365000.3324---
0.8339370000.3345---
0.8451375000.3323---
0.8564380000.3321---
0.8677385000.3332---
0.8790390000.335---
0.8902395000.3341---
0.9015400000.33460.32730.6631-
0.9128405000.3352---
0.9240410000.336---
0.9353415000.3319---
0.9466420000.3323---
0.9578425000.3326---
0.9691430000.333---
0.9804435000.3316---
0.9916440000.3303---
-1-1---0.6608

Framework Versions

  • Python: 3.10.14
  • Sentence Transformers: 4.0.2
  • Transformers: 4.50.3
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.6.0
  • Datasets: 3.5.0
  • Tokenizers: 0.21.1

Citation

BibTeX

Sentence Transformers

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
BertModel
Ревизия весов
26ddd80

0 моделей