/ Модель

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

Контекст
514 токенов
Параметры
137 млн
Архитектура
mpnet · dense
Базовая модель
multi-qa-mpnet-base-dot-v1
Библиотека
sentence-transformers
Опубликована
3 сен 2024

retrieval-mpnet-dot-finetuned-gpt-4o-mini-synthetic-dataset

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

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

105скачиваний за 30 дней0лайковвеса обновлены3 сен 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Это модель Sentence Transformer, разработанная на базе sentence-transformers/multi-qa-mpnet-base-dot-v1 и дообученная на 95 159 парах запросов и текстовых фрагментов с использованием MultipleNegativesRankingLoss. Она преобразует предложения и абзацы в плотные эмбеддинги размерности 768; сходство в исходной конфигурации измеряется скалярным произведением. Архитектура включает MPNet и пулинг по токену CLS, размер модели — 136,7 млн параметров, максимальная длина последовательности — 512 токенов.

Модель предназначена для семантического поиска, сопоставления запросов с релевантными фрагментами, оценки текстового сходства и поиска перефразировок. Её можно также применять для кластеризации и классификации текстов на основе эмбеддингов. Карточка демонстрирует примеры запросов и медицинских фрагментов, но не заявляет специализацию на конкретной предметной области. В метаданных лицензия не указана, поэтому условия использования по имеющимся сведениям определить нельзя.

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

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

Ограничения

Максимальная длина входной последовательности составляет 512 токенов; длинные тексты нужно разбивать на фрагменты. Карточка не сообщает лицензию и приводит только ограниченные результаты оценки поиска, поэтому качество для конкретной задачи следует проверять отдельно.

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

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

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

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

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

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

Открыть на Hugging Face

SentenceTransformer based on sentence-transformers/multi-qa-mpnet-base-dot-v1

This is a sentence-transformers model finetuned from sentence-transformers/multi-qa-mpnet-base-dot-v1. 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 Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel 
  (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})
)

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("sentence_transformers_model_id")
# Run inference
sentences = [
    'nerve cell dysfunction, riboflavin deficiency',
    'Riboflavin transporter deficiency neuronopathy is a disorder that affects nerve cells (neurons). Affected individuals typically have hearing loss caused by nerve damage in the inner ear (sensorineural hearing loss) and signs of damage to other nerves.',
    'A number sign (#) is used with this entry because hyperprolinemia type I (HYRPRO1) is caused by homozygous or compound heterozygous mutation in the proline dehydrogenase gene (PRODH; 606810) on chromosome 22q11.\n\nThe PRODH gene falls within the region deleted in the 22q11 deletion syndrome, including DiGeorge syndrome (188400) and velocardiofacial syndrome (192430).\n\nDescription\n\nPhang et al. (2001) noted that prospective studies of HPI probands identified through newborn screening as well as reports of several families have suggested that it is a metabolic disorder not clearly associated with clinical manifestations. Phang et al. (2001) concluded that HPI is a relatively benign condition in most individuals under most circumstances. However, other reports have suggested that some patients have a severe phenotype with neurologic manifestations, including epilepsy and mental retardation (Jacquet et al., 2003).\n\n### Genetic Heterogeneity of Hyperprolinemia',
]
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.1933
cosine_accuracy@30.5626
cosine_accuracy@50.7512
cosine_accuracy@100.841
cosine_precision@10.1933
cosine_precision@30.1875
cosine_precision@50.1502
cosine_precision@100.0841
cosine_recall@10.1933
cosine_recall@30.5626
cosine_recall@50.7512
cosine_recall@100.841
cosine_ndcg@100.512
cosine_mrr@100.4059
cosine_map@1000.411
dot_accuracy@10.1949
dot_accuracy@30.5673
dot_accuracy@50.7571
dot_accuracy@100.8415
dot_precision@10.1949
dot_precision@30.1891
dot_precision@50.1514
dot_precision@100.0842
dot_recall@10.1949
dot_recall@30.5673
dot_recall@50.7571
dot_recall@100.8415
dot_ndcg@100.5141
dot_mrr@100.4084
dot_map@1000.4136

Training Details

Training Dataset

Unnamed Dataset

  • Size: 95,159 training samples
  • Columns: queries and chunks
  • Approximate statistics based on the first 1000 samples:
    querieschunks
    typestringstring
    detailsmin: 5 tokensmean: 15.01 tokensmax: 30 tokensmin: 5 tokensmean: 158.91 tokensmax: 319 tokens
  • Samples:
    querieschunks
    hypotrichosis, wiry hair, onycholysisGreen et al. (2003) reported an Australian family in which 22 members over 4 generations had progressive patterned scalp hypotrichosis and wiry hair similar to that seen in Marie Unna hereditary hypotrichosis (MUHH; 146550). Features differing from those of MUHH included absence of signs of abnormality at birth, relative sparing of body hair, distal onycholysis, and intermittent cosegregation with autosomal dominant cleft lip and palate. Five individuals had associated cleft lip and palate. Green et al. (2003) excluded linkage of the disorder in the Australian family to the MUHH locus on chromosome 8p21.
    cleft lip, cleft palate, hair lossGreen et al. (2003) reported an Australian family in which 22 members over 4 generations had progressive patterned scalp hypotrichosis and wiry hair similar to that seen in Marie Unna hereditary hypotrichosis (MUHH; 146550). Features differing from those of MUHH included absence of signs of abnormality at birth, relative sparing of body hair, distal onycholysis, and intermittent cosegregation with autosomal dominant cleft lip and palate. Five individuals had associated cleft lip and palate. Green et al. (2003) excluded linkage of the disorder in the Australian family to the MUHH locus on chromosome 8p21.
    progressive patterned scalp, autosomal dominant inheritanceGreen et al. (2003) reported an Australian family in which 22 members over 4 generations had progressive patterned scalp hypotrichosis and wiry hair similar to that seen in Marie Unna hereditary hypotrichosis (MUHH; 146550). Features differing from those of MUHH included absence of signs of abnormality at birth, relative sparing of body hair, distal onycholysis, and intermittent cosegregation with autosomal dominant cleft lip and palate. Five individuals had associated cleft lip and palate. Green et al. (2003) excluded linkage of the disorder in the Australian family to the MUHH locus on chromosome 8p21.
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 1,
        "similarity_fct": "dot_score"
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 8,747 evaluation samples
  • Columns: queries and chunks
  • Approximate statistics based on the first 1000 samples:
    querieschunks
    typestringstring
    detailsmin: 6 tokensmean: 14.71 tokensmax: 31 tokensmin: 4 tokensmean: 155.81 tokensmax: 305 tokens
  • Samples:
    querieschunks
    white patches, corrugated tongue, immunocompromised, Epstein-Barr virusNot to be confused with Hairy tongue.Hairy leukoplakia Other namesOral hairy leukoplakia,[1]:385 OHL, or HIV-associated hairy leukoplakia[2] SpecialtyGastroenterology Hairy leukoplakia is a white patch on the side of the tongue with a corrugated or hairy appearance. It is caused by Epstein-Barr virus (EBV) and occurs usually in persons who are immunocompromised, especially those with human immunodeficiency virus infection/acquired immunodeficiency syndrome (HIV/AIDS). The white lesion, which cannot be scraped off, is benign and does not require any treatment, although its appearance may have diagnostic and prognostic implications for the underlying condition.Depending upon what definition of leukoplakia is used, hairy leukoplakia is sometimes considered a subtype of leukoplakia, or a distinct diagnosis.## Contents
    HIV-associated lesions, oral hairy leukoplakia, benign white lesions, tongue appearanceNot to be confused with Hairy tongue.Hairy leukoplakia Other namesOral hairy leukoplakia,[1]:385 OHL, or HIV-associated hairy leukoplakia[2] SpecialtyGastroenterology Hairy leukoplakia is a white patch on the side of the tongue with a corrugated or hairy appearance. It is caused by Epstein-Barr virus (EBV) and occurs usually in persons who are immunocompromised, especially those with human immunodeficiency virus infection/acquired immunodeficiency syndrome (HIV/AIDS). The white lesion, which cannot be scraped off, is benign and does not require any treatment, although its appearance may have diagnostic and prognostic implications for the underlying condition.Depending upon what definition of leukoplakia is used, hairy leukoplakia is sometimes considered a subtype of leukoplakia, or a distinct diagnosis.## Contents
    hairy leukoplakia symptoms, non-scrapable lesions, HIV/AIDS, oral lesionsNot to be confused with Hairy tongue.Hairy leukoplakia Other namesOral hairy leukoplakia,[1]:385 OHL, or HIV-associated hairy leukoplakia[2] SpecialtyGastroenterology Hairy leukoplakia is a white patch on the side of the tongue with a corrugated or hairy appearance. It is caused by Epstein-Barr virus (EBV) and occurs usually in persons who are immunocompromised, especially those with human immunodeficiency virus infection/acquired immunodeficiency syndrome (HIV/AIDS). The white lesion, which cannot be scraped off, is benign and does not require any treatment, although its appearance may have diagnostic and prognostic implications for the underlying condition.Depending upon what definition of leukoplakia is used, hairy leukoplakia is sometimes considered a subtype of leukoplakia, or a distinct diagnosis.## Contents
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 1,
        "similarity_fct": "dot_score"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • learning_rate: 2e-05
  • num_train_epochs: 15
  • warmup_ratio: 0.1
  • fp16: True
  • load_best_model_at_end: True
  • eval_on_start: 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: 32
  • per_device_eval_batch_size: 32
  • 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: 15
  • max_steps: -1
  • lr_scheduler_type: linear
  • 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: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: True
  • 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
  • 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: True
  • eval_use_gather_object: False
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

EpochStepTraining Losslossdot_map@100
00-1.43550.2271
0.13461001.2599--
0.26922000.7627--
0.40383000.6061--
0.53844000.5632--
0.67295000.39650.45890.3852
0.80756000.3104--
0.94217000.446--
1.07678000.4426--
1.21139000.4518--
1.345910000.41450.37260.3964
1.480511000.4296--
1.615112000.4144--
1.749713000.1536--
1.884314000.3425--
2.018815000.32250.34330.3930
2.153416000.3529--
2.288017000.3382--
2.422618000.3092--
2.557219000.339--
2.691820000.16810.36330.4032
2.826421000.1753--
2.961022000.2552--
3.095623000.2549--
3.230124000.2759--
3.364725000.25130.33380.4066
3.499326000.258--
3.633927000.2222--
3.768528000.0541--
3.903129000.2275--
4.037730000.19190.35290.4026
4.172331000.215--
4.306932000.2114--
4.441533000.2153--
4.576034000.2164--
4.710635000.07730.35090.4090
4.845236000.1211--
4.979837000.1553--
5.114438000.1764--
5.249039000.1953--
5.383640000.15590.34740.4089
5.518241000.1686--
5.652842000.1327--
5.787343000.0514--
5.921944000.1381--
6.056545000.14450.35210.4056
6.191146000.1621--
6.325747000.1365--
6.460348000.1579--
6.594949000.1547--
6.729550000.03160.38950.4094
6.864151000.0958--
6.998752000.1082--
7.133253000.1379--
7.267854000.1348--
7.402455000.13220.35520.4100
7.537056000.1321--
7.671657000.0763--
7.806258000.0472--
7.940859000.0989--
8.075460000.10450.36310.3967
8.210061000.122--
8.344562000.1057--
8.479163000.1194--
8.613764000.113--
8.748365000.01260.39440.4116
8.882966000.089--
9.017567000.0849--
9.152168000.1052--
9.286769000.111--
9.421370000.10260.36650.4133
9.555971000.1165--
9.690472000.0394--
9.825073000.0443--
9.959674000.0756--
10.094275000.08060.37850.4090
10.228876000.103--
10.363477000.0875--
10.498078000.0959--
10.632679000.0851--
10.767280000.00730.39020.4136
10.901781000.079--
11.036382000.0664--
11.170983000.0766--
11.305584000.084--
11.440185000.09470.37330.4099
11.574786000.0906--
11.709387000.0224--
11.843988000.0424--
11.978589000.0569--
12.113190000.06970.38240.4071
12.247691000.095--
12.382292000.0651--
12.516893000.0756--
12.651494000.065--
12.786095000.01940.38760.4110
12.920696000.0595--
13.055297000.0629--
13.189898000.0808--
13.324499000.0652--
13.4590100000.08020.37830.4091
13.5935101000.0809--
13.7281102000.0111--
13.8627103000.0465--
13.9973104000.0504--
14.1319105000.0680.38310.4071
14.2665106000.0739--
14.4011107000.0734--
14.5357108000.0737--
14.6703109000.0379--
14.8048110000.02310.38410.4112
14.9394111000.0493--
15.011145-0.39020.4136
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.11.9
  • Sentence Transformers: 3.0.1
  • Transformers: 4.43.3
  • PyTorch: 2.3.1+cu121
  • Accelerate: 0.30.1
  • Datasets: 2.19.2
  • Tokenizers: 0.19.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",
}

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…

Класс архитектуры
MPNetModel
Ревизия весов
69e24df

0 моделей