/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Архитектура
bert · dense
Базовая модель
bge-base-en-v1.5
Библиотека
sentence-transformers
Опубликована
31 мар 2025

BAAI_bge-base-en-v1.5_retrieval_finetuned_2025-03-31_20-43-41

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

Дообученная англоязычная BERT-модель создаёт векторы предложений для семантического поиска и сравнения текстов.

131скачиваний за 30 дней0лайковвеса обновлены31 мар 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Модель разработана CatkinChen и представляет собой дообученную версию BAAI/bge-base-en-v1.5 для работы с текстовыми предложениями и абзацами. Это Sentence Transformer на архитектуре BERT с 136,7 млн параметров, который преобразует текст в нормализованные плотные векторы размерностью 768 и сравнивает их по косинусному сходству.

Модель предназначена для семантического поиска, оценки сходства предложений и извлечения релевантных текстов. В README также перечислены кластеризация, поиск перефразирований и классификация текста. Максимальная длина последовательности — 512 токенов; модель рассчитана на английский язык и может использоваться в системах поиска и RAG.

В карточке приведены результаты оценки на InformationRetrievalEvaluator и сведения о дообучении на наборе из 309 примеров с TripletLoss. Эти данные не устанавливают качество на других наборах и сценариях. Модель распространяется с лицензией базовой модели, однако лицензия в доступных сведениях не указана.

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

  • семантический поиск по коллекции текстов
  • сравнение сходства двух предложений
  • поиск перефразирований
  • кластеризация предложений и абзацев
  • подготовка эмбеддингов для RAG

Ограничения

Максимальная длина входа составляет 512 токенов. Оценки приведены для конкретного набора данных; качество на других задачах и доменах не установлено.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

SentenceTransformer based on BAAI/bge-base-en-v1.5

This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-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: BAAI/bge-base-en-v1.5
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)

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("CatkinChen/BAAI_bge-base-en-v1.5_retrieval_finetuned_2025-03-31_20-43-41")
# Run inference
sentences = [
    'What is the name of the spell that creates a mark in the sky?',
    'Book: 4, Chapter: 9\nPassage: They waited, listening to the sounds of the uneven steps behind the dark trees. But the footsteps came to a sudden halt. "Hello?" called Harry. There was silence. Harry got to his feet and peered around the tree. It was too dark to see very far, but he could sense somebody standing just beyond the range of his vision. "Who\'s there?" he said. And then, without warning, the silence was rent by a voice unlike any they had heard in the wood; and it uttered, not a panicked shout, but what sounded like a spell. "MORSMORDRE!" And something vast, green, and glittering erupted from the patch of darkness Harry\'s eyes had been struggling to penetrate; it flew up over the treetops and into the sky. "What the - ?" gasped Ron as he sprang to his feet again, staring up at the thing that had appeared.',
    'Book: 4, Chapter: 9\nPassage: The Dark Mark\'s a wizard\'s sign. It requires a wand." "Yeah," said Mr. Diggory, "and she had a wand." "What?" said Mr. Weasley.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Evaluation

Metrics

Information Retrieval

MetricValue
cosine_accuracy@10.1235
cosine_accuracy@30.1852
cosine_accuracy@50.2099
cosine_accuracy@100.3086
cosine_precision@10.1235
cosine_precision@30.0658
cosine_precision@50.0444
cosine_precision@100.0321
cosine_recall@10.1111
cosine_recall@30.1564
cosine_recall@50.1749
cosine_recall@100.2613
cosine_ndcg@100.1786
cosine_mrr@100.1661
cosine_map@1000.1552

Training Details

Training Dataset

Unnamed Dataset

  • Size: 309 training samples
  • Columns: sentence_0, sentence_1, and sentence_2
  • Approximate statistics based on the first 309 samples:
    sentence_0sentence_1sentence_2
    typestringstringstring
    detailsmin: 9 tokensmean: 17.76 tokensmax: 51 tokensmin: 46 tokensmean: 215.37 tokensmax: 512 tokensmin: 40 tokensmean: 207.31 tokensmax: 512 tokens
  • Samples:
    sentence_0sentence_1sentence_2
    What specific detail about a mirror in the first book, when paired with a family revelation in the fifth book, suggests a hidden bloodline connection?Book: 1, Chapter: 12Passage: He had seen his parents and would be seeing them again tonight. He had almost forgotten about Flamel. It didn't seem very important anymore. Who cared what the three-headed dog was guarding? What did it matter if Snape stole it, really? "Are you all right?" said Ron. "You look odd." What Harry feared most was that he might not be able to find the mirror room again. With Ron covered in the cloak, too, they had to walk much more slowly the next night. They tried retracing Harry's route from the library, wandering around the dark passageways for nearly an hour. "I'm freezing," said Ron.Book: 2, Chapter: 17Passage: I wondered, you see. There are strange likenesses between us, after all. Even you must have noticed. Both half-bloods, orphans, raised by Muggles. Probably the only two Parselmouths to come to Hogwarts since the great Slytherin himself. We even look something alike ... but after all, it was merely a lucky chance that saved you from me.
    What is the name of the broomstick Harry receives in his third year?Book: 3, Chapter: 11Passage: As he moved all these things aside, he saw a long, thin package lying underneath. "What's that?" said Ron, looking over, a freshly unwrapped pair of maroon socks in his hand. "Dunno ..."Harry ripped the parcel open and gasped as a magnificent, gleaming broomstick rolled out onto his bedspread. Ron dropped his socks and jumped off his bed for a closer look.Book: 3, Chapter: 12Passage: I reckon it's time you ordered a new broom, Harry. There's an order form at the back of Which Broomstick ... you could get a Nimbus Two Thousand and One, like Malfoy's got." "I'm not buying anything Malfoy thinks is good," said Harry flatly. January faded imperceptibly into February, with no change in the bitterly cold weather. The match against Ravenclaw was drawing nearer and nearer, but Harry still hadn't ordered a new broom. He was now asking Professor McGonagall for news of the Firebolt after every Transfiguration lesson, Ron standing hopefully at his shoulder, Hermione rushing past with her face averted. "No, Potter, you can't have it back yet," Professor McGonagall told him the twelfth time this happened, before he'd even opened his mouth. "We've checked for most of the usual curses, but Professor Flitwick believes the broom might be carrying a Hurling Hex.
    What creature does Harry encounter in the Chamber of Secrets?Book: 2, Chapter: 17Passage: Harry backed away until he hit the dark Chamber wall, and as he shut his eyes tight he felt Fawkes' wing sweep his cheek as he took flight. Harry wanted to shout, "Don't leave me!" but what chance did a phoenix have against the king of serpents? Something huge hit the stone floor of the Chamber. Harry felt it shudder - he knew what was happening, he could sense it, could almost see the giant serpent uncoiling itself from Slytherin's mouth.Book: 2, Chapter: 15Passage: Ron fell onto his bed without bothering to get undressed. Harry, however, didn't feel very sleepy. He sat on the edge of his fourposter, thinking hard about everything Aragog had said. The creature that was lurking somewhere in the castle, he thought, sounded like a sort of monster Voldemort - even other monsters didn't want to name it. But he and Ron were no closer to finding out what it was, or how it Petrified its victims. Even Hagrid had never known what was in the Chamber of Secrets. Harry swung his legs up onto his bed and leaned back against his pillows, watching the moon glinting at him through the tower window. He couldn't see what else they could do. They had hit dead ends everywhere. Riddle had caught the wrong person, the Heir of Slytherin had got off, and no one could tell whether it was the same person, or a different one, who had opened the Chamber this time. There was nobody else to ask.
  • Loss: TripletLoss with these parameters:
    {
        "distance_metric": "TripletDistanceMetric.COSINE",
        "triplet_margin": 0.3
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • num_train_epochs: 1
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • 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: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 1
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • 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: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • 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: batch_sampler
  • multi_dataset_batch_sampler: round_robin

Training Logs

EpochStepcosine_ndcg@10
0.5100.1678
1.0200.1786
-1-10.1786

Framework Versions

  • Python: 3.12.2
  • Sentence Transformers: 3.4.1
  • Transformers: 4.50.0
  • PyTorch: 2.4.1
  • Accelerate: 1.4.0
  • Datasets: 2.19.2
  • Tokenizers: 0.21.0

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",
}

TripletLoss

@misc{hermans2017defense,
    title={In Defense of the Triplet Loss for Person Re-Identification},
    author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
    year={2017},
    eprint={1703.07737},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей