/ Модель

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

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

Vignesh-finetuned-bge2

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

Англоязычная модель эмбеддингов на базе BGE для семантического поиска и сравнения текстов.

130скачиваний за 30 дней0лайковвеса обновлены21 фев 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Vignesh-finetuned-bge2 — англоязычная модель Sentence Transformer, дообученная автором Vignesh с BAAI/bge-base-en-v1.5 на парных текстах из набора json. Она кодирует предложения и абзацы в плотные эмбеддинги размерности 768 и сравнивает их по косинусному сходству. Архитектура включает BERT, пулинг по CLS-токену и нормализацию; максимальная длина последовательности — 512 токенов.

Модель подходит для семантического поиска, сопоставления запросов с фрагментами документов, поиска перефразировок, кластеризации, классификации текстов и оценки семантического сходства. В README приведены результаты оценки поиска при уменьшении размерности эмбеддингов до 64–512, однако состав и предметная область наборов оценки подробно не описаны. Модель ориентирована на английский язык и распространяется по лицензии Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Vignesh finetuned bge2

This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5 on the json dataset. 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 tokens
  • Similarity Function: Cosine Similarity
  • Training Dataset:
    • json
  • Language: en
  • License: apache-2.0

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("viggypoker1/Vignesh-finetuned-bge2")
# Run inference
sentences = [
    "What does the term 'Acquired brands' refer to and how does it affect the reported volumes?",
    "'Acquired brands' refers to brands acquired during the past 12 months. Typically, the Company has not reported unit case volume or recognized concentrate sales volume related to acquired brands in periods prior to the closing of a transaction. Therefore, the unit case volume and concentrate sales volume related to an acquired brand are incremental to prior year volume.",
    'The Company made matching contributions to employee accounts in connection with the 401(k) plan of $37.3 million in fiscal 2023, $37.9 million in fiscal 2022 and $34.1 million in fiscal 2021.',
]
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.7
cosine_accuracy@30.8414
cosine_accuracy@50.8786
cosine_accuracy@100.92
cosine_precision@10.7
cosine_precision@30.2805
cosine_precision@50.1757
cosine_precision@100.092
cosine_recall@10.7
cosine_recall@30.8414
cosine_recall@50.8786
cosine_recall@100.92
cosine_ndcg@100.813
cosine_mrr@100.7784
cosine_map@1000.7817

Information Retrieval

MetricValue
cosine_accuracy@10.6914
cosine_accuracy@30.84
cosine_accuracy@50.8857
cosine_accuracy@100.9243
cosine_precision@10.6914
cosine_precision@30.28
cosine_precision@50.1771
cosine_precision@100.0924
cosine_recall@10.6914
cosine_recall@30.84
cosine_recall@50.8857
cosine_recall@100.9243
cosine_ndcg@100.8121
cosine_mrr@100.7758
cosine_map@1000.7787

Information Retrieval

MetricValue
cosine_accuracy@10.69
cosine_accuracy@30.8286
cosine_accuracy@50.8729
cosine_accuracy@100.9143
cosine_precision@10.69
cosine_precision@30.2762
cosine_precision@50.1746
cosine_precision@100.0914
cosine_recall@10.69
cosine_recall@30.8286
cosine_recall@50.8729
cosine_recall@100.9143
cosine_ndcg@100.8041
cosine_mrr@100.7685
cosine_map@1000.772

Information Retrieval

MetricValue
cosine_accuracy@10.67
cosine_accuracy@30.8171
cosine_accuracy@50.8657
cosine_accuracy@100.9071
cosine_precision@10.67
cosine_precision@30.2724
cosine_precision@50.1731
cosine_precision@100.0907
cosine_recall@10.67
cosine_recall@30.8171
cosine_recall@50.8657
cosine_recall@100.9071
cosine_ndcg@100.7905
cosine_mrr@100.7529
cosine_map@1000.7567

Information Retrieval

MetricValue
cosine_accuracy@10.6314
cosine_accuracy@30.7943
cosine_accuracy@50.8386
cosine_accuracy@100.8829
cosine_precision@10.6314
cosine_precision@30.2648
cosine_precision@50.1677
cosine_precision@100.0883
cosine_recall@10.6314
cosine_recall@30.7943
cosine_recall@50.8386
cosine_recall@100.8829
cosine_ndcg@100.7591
cosine_mrr@100.7192
cosine_map@1000.7236

Training Details

Training Dataset

json

  • Dataset: json
  • Size: 311,351 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 1000 samples:
    anchorpositive
    typestringstring
    detailsmin: 9 tokensmean: 20.47 tokensmax: 41 tokensmin: 7 tokensmean: 46.65 tokensmax: 512 tokens
  • Samples:
    anchorpositive
    What section from item 8 addresses financial information?Item 8 covers 'Financial Statements and Supplementary Data' relating to financial information.
    What was the percentage increase in interest income from 2022 to 2023?Interest income increased $769 million, or 259%, in the year ended December 31, 2023 as compared to the year ended December 31, 2022. This increase was primarily due to higher interest earned on our cash and cash equivalents and short-term investments in the year ended December 31, 2023 as compared to the prior year due to rising interest rates and our increasing portfolio balance.
    What was the operating margin for UnitedHealthcare in 2023?The operating margin for UnitedHealthcare in 2023 was reported as 5.8%.
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            768,
            512,
            256,
            128,
            64
        ],
        "matryoshka_weights": [
            1,
            1,
            1,
            1,
            1
        ],
        "n_dims_per_step": -1
    }
    

Evaluation Dataset

json

  • Dataset: json
  • Size: 700 evaluation samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 700 samples:
    anchorpositive
    typestringstring
    detailsmin: 7 tokensmean: 20.59 tokensmax: 40 tokensmin: 6 tokensmean: 47.59 tokensmax: 326 tokens
  • Samples:
    anchorpositive
    What was the maximum borrowing capacity available from the Federal Home Loan Bank of Boston as of December 31, 2023?The maximum borrowing capacity available from the FHLBB as of December 31, 2023 was approximately $1.0 billion.
    What new compliance requirement was established by the CFPB's final rule issued on March 30, 2023, regarding small business credit applications?On March 30, 2023, the CFPB adopted a final rule requiring covered financial institutions, such as us, to collect and report data to the CFPB regarding certain small business credit applications.
    What potential impact could continued geopolitical tensions have on the business?While the ongoing Russia-Ukraine and Israel conflicts are still evolving and outcomes remain uncertain, the business does not expect the resulting challenging macroeconomic conditions to have a material impact currently. However, if conflicts continue or worsen, it could lead to greater disruptions and uncertainty, negatively impacting the business.
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            768,
            512,
            256,
            128,
            64
        ],
        "matryoshka_weights": [
            1,
            1,
            1,
            1,
            1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_train_batch_size: 128
  • per_device_eval_batch_size: 16
  • gradient_accumulation_steps: 16
  • learning_rate: 2e-05
  • num_train_epochs: 10
  • lr_scheduler_type: cosine
  • warmup_ratio: 0.1
  • fp16: True
  • tf32: False
  • load_best_model_at_end: True
  • optim: adamw_torch_fused
  • batch_sampler: no_duplicates

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 128
  • per_device_eval_batch_size: 16
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 16
  • 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: 10
  • max_steps: -1
  • lr_scheduler_type: cosine
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.1
  • 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: True
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: False
  • 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: True
  • 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}
  • 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_fused
  • 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: False
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • 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
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

EpochStepTraining Losslossdim_128_cosine_map@100dim_256_cosine_map@100dim_512_cosine_map@100dim_64_cosine_map@100dim_768_cosine_map@100
0.06581012.7958------
0.13152016.8225------
0.19733020.1236------
0.26304022.0845------
0.32885019.7865------
0.3946606.0102------
0.4603703.7813------
0.5261802.8675------
0.5919902.2002------
0.65761001.8334------
0.72341101.5052------
0.78911201.3454------
0.85491301.2089------
0.92071401.0615------
0.98641501.011------
0.9996152-0.29630.70430.72280.74620.64960.7566
1.05221607.9844------
1.118017012.726------
1.183718017.3762------
1.249519019.358------
1.315220019.4805------
1.38102105.7452------
1.44682201.3857------
1.51252300.9792------
1.57832400.8632------
1.64412500.8256------
1.70982600.742------
1.77562700.7307------
1.84132800.7064------
1.90712900.6492------
1.97293000.6265------
1.9992304-0.23450.71450.73170.75480.67060.7609
2.03863104.0854------
2.104432011.4485------
2.170233014.1851------
2.235934017.7422------
2.301735019.2742------
2.36743607.3918------
2.43323701.0444------
2.49903800.6947------
2.56473900.6------
2.63054000.6005------
2.69634100.5314------
2.76204200.5238------
2.82784300.5207------
2.89354400.5075------
2.95934500.4673------
2.9988456-0.21110.72520.73330.75300.68210.7617
3.02514601.5162------
3.090847010.5824------
3.156648011.8184------
3.222449016.3944------
3.288150018.1591------
3.353951010.8653------
3.41965200.8936------
3.48545300.5606------
3.55125400.4724------
3.61695500.4681------
3.68275600.4334------
3.74855700.4005------
3.81425800.4224------
3.88005900.4296------
3.94576000.3788------
3.9984608-0.18890.73450.74690.76470.69060.7633
4.01156100.5548------
4.07736208.6803------
4.143063010.6235------
4.208864014.5689------
4.274665017.649------
4.340366013.9682------
4.40616700.7801------
4.47186800.4848------
4.53766900.4082------
4.60347000.3883------
4.66917100.3737------
4.73497200.3485------
4.80077300.3547------
4.86647400.357------
4.93227500.3223------
4.99797600.33220.18430.73640.74820.76450.69110.7652
5.06377706.5343------
5.129578010.1093------
5.195279013.3253------
5.261080016.6724------
5.326881015.6655------
5.39258202.0319------
5.45838300.4315------
5.52408400.3544------
5.58988500.3488------
5.65568600.3301------
5.72138700.3035------
5.78718800.3123------
5.85298900.3149------
5.91869000.2857------
5.98449100.3021------
5.9975912-0.17040.74420.75270.76430.70310.7700
6.05019204.5418------
6.11599308.909------
6.181794012.7023------
6.247495015.6328------
6.313296017.1026------
6.37909703.8174------
6.44479800.4035------
6.51059900.3281------
6.576210000.3126------
6.642010100.304------
6.707810200.2692------
6.773510300.2807------
6.839310400.2993------
6.905110500.2721------
6.970810600.2674------
6.99711064-0.15960.74810.76070.77230.70740.7735
7.036610702.5499------
7.102310808.8274------
7.1681109011.3224------
7.2339110015.0825------
7.2996111017.6647------
7.365411206.0271------
7.431211300.3838------
7.496911400.3137------
7.562711500.285------
7.628411600.2913------
7.694211700.268------
7.760011800.2643------
7.825711900.2702------
7.891512000.2775------
7.957312100.2563------
7.99671216-0.15430.74950.76450.77150.71240.7802
8.023012200.7657------
8.088812308.542------
8.154512409.9807------
8.2203125014.3646------
8.2861126016.877------
8.3518127010.2992------
8.417612800.363------
8.483412900.304------
8.549113000.2851------
8.614913100.2853------
8.680613200.2676------
8.746413300.2522------
8.812213400.2619------
8.877913500.2757------
8.943713600.2528------
8.99631368-0.14830.75290.76800.77590.71720.7807
9.009513700.3564------
9.075213807.1402------
9.141013909.4364------
9.2067140013.1391------
9.2725141016.7827------
9.3383142013.456------
9.404014300.5238------
9.469814400.3073------
9.535614500.2773------
9.601314600.2783------
9.667114700.2645------
9.732814800.2495------
9.798614900.2649------
9.864415000.2655------
9.930115100.2395------
9.995915200.25690.14530.75670.7720.77870.72360.7817
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.1.1
  • Transformers: 4.45.2
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.3.0
  • Datasets: 2.19.1
  • Tokenizers: 0.20.3

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

MatryoshkaLoss

@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей