/ Модель

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

Контекст
514 токенов
Параметры
659 млн
Архитектура
xlm-roberta · dense
Базовая модель
multilingual-e5-large-instruct
Библиотека
sentence-transformers
Опубликована
30 сен 2024

intfloat_multilingual-e5-large-instruct_FareedKhan_prime_synthetic_data_2k_2_4

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

Дообученная многоязычная модель E5 преобразует тексты в эмбеддинги для семантического поиска, сравнения и группировки.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Это модель Sentence Transformer на базе intfloat/multilingual-e5-large-instruct, дообученная FareedKhan на парах текстов. Она преобразует предложения и абзацы в нормализованные плотные векторы размерностью 1024 для семантического поиска и сравнения текстов; сходство оценивается косинусной мерой. Модель построена на XLM-RoBERTa с усреднением токенных представлений и поддерживает последовательности до 512 токенов.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

SentenceTransformer based on intfloat/multilingual-e5-large-instruct

This is a sentence-transformers model finetuned from intfloat/multilingual-e5-large-instruct. It maps sentences & paragraphs to a 1024-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: intfloat/multilingual-e5-large-instruct
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 1024 tokens
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel 
  (1): Pooling({'word_embedding_dimension': 1024, '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})
  (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("FareedKhan/just_for_testing_model")
# Run inference
sentences = [
    '\n\nThe gene in question appears to have a multifaceted role and involvement in various biological processes, diseases, and anatomical structures, with implications for both physiology and pathology. Here is a summary of its characteristics:\n\n### Function and Interactions\n- **Name**: mTORC1, a component of the mammalian target of rapamycin complex 1.\n- **Role**: Involved in regulation of membrane potential',
    'Identify genes or proteins that interact with KCNMB1 and share an associated phenotype or effect.',
    'Which solid-state medications specifically engage with the METAP2 gene/protein through direct interaction?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# 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.401
cosine_accuracy@30.4604
cosine_accuracy@50.4901
cosine_accuracy@100.5446
cosine_precision@10.401
cosine_precision@30.1535
cosine_precision@50.098
cosine_precision@100.0545
cosine_recall@10.401
cosine_recall@30.4604
cosine_recall@50.4901
cosine_recall@100.5446
cosine_ndcg@100.465
cosine_mrr@100.4406
cosine_map@1000.4488

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,814 training samples
  • Columns: positive and anchor
  • Approximate statistics based on the first 1000 samples:
    positiveanchor
    typestringstring
    detailsmin: 3 tokensmean: 270.4 tokensmax: 512 tokensmin: 15 tokensmean: 39.58 tokensmax: 127 tokens
  • Samples:
    positiveanchor
    Racecadotril, a drug from the Antidiarrheals and Intestinal Antiinflammatory/antiinfective Agents therapeutic group, targets the treatment of acute diarrhea and acute gastroenteritis. This drug falls under Alimentary Tract and Metabolism (ATC Classification) and is related to other antidiarrheals (ATC Specificity Class). Its chemical and functional group is classified under other antidiarrheals, reflecting its role in gastrointestinal health. With a molecular weight of 385.48 grams, and a topological polar surface area of 72.47, Racecadotril demonstrates specific properties that contribute to its effectiveness. The drug's inclusion in the investigational group suggests ongoing research to further validate its efficacy and safety in managing acute diarrhea. Racecadotril's diverse chemical nature, including amino acids, peptides, and sulfur-compound-based inhibitors, highlights its broad mechanism of action, which is crucial for addressing the multifaceted causes of acute diarrhea.Could you suggest some effective medications for acute diarrhea?
    The gene KCNJ6, also known as potassium inwardly rectifying channel subfamily J member 6, is responsible for encoding a member of the G protein-coupled inwardly-rectifying potassium channel family. This type of potassium channel allows for a greater flow of potassium into the cell than out, playing a critical role in various physiological processes. The KCNJ6 gene modulates functions in cardiac cells and neuronal cells through G-protein coupled receptor stimulation. Mutations in KCNJ6 can lead to Keppen-Lubinsky Syndrome, a rare condition characterized by severe developmental delay, facial dysmorphism, and intellectual disability. In terms of its expression, the KCNJ6 gene is notably absent in the mucosal tissues of the mouth and the small intestine as indicated by its 'expression_absent' attribute. The absence of KCNJ6 in these specific anatomical areas might imply a tailored physiological function or evolutionary adaptation distinct from that in other organs where it is expressed. The gene's absence in the small intestine and mouth tissues might be crucial for ensuring optimal functionality within those specific environments, emphasizing the importance of precise gene expression in various parts of the body. Overall, the gene plays a vital role in cellular and physiological activities and its absence from certain tissues like the mucosal surfaces of the mouth and small intestine is indicative of tailored biological functions within these areas.Which gene or protein is consistently not expressed in the mucosal tissues of the mouth and the small intestine?
    The term you're referring to seems to describe a wide range of biological entities or contexts, possibly within the framework of a scientific study or database that categorizes anatomical locations, tissues, or organs in the human body. Here's a breakdown of the classification:1. Lower Body and Tissue Levels: - Intestines (Large and Small): Refers to the large intestine (colon) and small intestine, parts of the digestive system. - Kidneys: Includes both the adult kidney and metanephros, an embryonic kidney stage. - Adrenal Gland: Part of the endocrine system related to metabolism, stress response, and more. - Liver: A primary organ involved in detoxification and metabolism. - Pancreas: Produces digestive enzymes and hormones such as insulin. - Renal Glomerulus: Tiny filtration units in the kidney. - Muscles (Various): Refers to a classification of skeletal, smooth, and cardiac muscles, each serving different bodily functions. - Bones and Connective Tissue: Includes bones, regions like the spinal cord, and structures like the heart, aorta, etc.2. Anatomical Areas: - Dorsal Root Ganglion: A cluster of neurons in the spinal cord. - Cerebral Cortex: Outer layers of the brain responsible for higher functions. - Embryonic Stages: Describes entities like the embryonic kidney (metanephros) and placenta, which are crucial during fetal development. - Reproductive Organ Systems: Such as the uterus, vagina, and mammary gland, highlighting the female reproductive system.3. Tissue Types: - Connective Tissue: Includes bones, the meninges, and fat. - Adipose Tissue: Found in various organs and is involved in energy storage and insulation.4. Impact of Exposure: The mention of "blood" might indicate the interest in studying the effects of environmentalWhich genes or proteins exhibit interactions with HNRNPU, share an association with its related disease(s), and participate in the peroxisomal beta-oxidation process of fatty acid metabolism?
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            768
        ],
        "matryoshka_weights": [
            1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_train_batch_size: 2
  • learning_rate: 1e-05
  • num_train_epochs: 2
  • warmup_ratio: 0.1
  • bf16: True
  • tf32: False
  • load_best_model_at_end: True

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 2
  • per_device_eval_batch_size: 8
  • 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: 1e-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: 2
  • 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: True
  • fp16: False
  • 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
  • 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
  • eval_use_gather_object: False
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional

Training Logs

EpochStepTraining Lossdim_768_cosine_map@100
00-0.2774
0.0220100.7928-
0.0441200.7435-
0.0661300.6181-
0.0881400.5851-
0.1101500.4896-
0.1322600.5216-
0.1542700.3562-
0.1762800.4002-
0.1982900.286-
0.22031000.3835-
0.24231100.3237-
0.26431200.5041-
0.28631300.4061-
0.30841400.3758-
0.33041500.4442-
0.35241600.3714-
0.37441700.4349-
0.39651800.3492-
0.41851900.1045-
0.44052000.2965-
0.46262100.1913-
0.48462200.4259-
0.50662300.4671-
0.52862400.4812-
0.55072500.2442-
0.57272600.157-
0.59472700.4386-
0.61672800.0979-
0.63882900.7879-
0.66083000.073-
0.68283100.252-
0.70483200.3913-
0.72693300.1331-
0.74893400.1311-
0.77093500.3487-
0.79303600.2204-
0.81503700.1718-
0.83703800.4277-
0.85903900.4798-
0.88114000.1381-
0.90314100.4986-
0.92514200.2379-
0.94714300.2717-
0.96924400.5997-
0.99124500.2738-
1.0454-0.4476
1.01324600.0649-
1.03524700.1113-
1.05734800.0916-
1.07934900.0866-
1.10135000.1341-
1.12335100.1591-
1.14545200.0737-
1.16745300.2395-
1.18945400.051-
1.21155500.1838-
1.23355600.0741-
1.25555700.2529-
1.27755800.1624-
1.29965900.1957-
1.32166000.1015-
1.34366100.056-
1.36566200.0592-
1.38776300.2027-
1.40976400.0874-
1.43176500.144-
1.45376600.2371-
1.47586700.083-
1.49786800.1608-
1.51986900.1924-
1.54197000.1765-
1.56397100.0068-
1.58597200.1316-
1.60797300.1538-
1.63007400.1136-
1.65207500.1216-
1.67407600.2417-
1.69607700.1868-
1.71817800.2164-
1.74017900.1186-
1.76218000.0155-
1.78418100.033-
1.80628200.024-
1.82828300.2094-
1.85028400.0761-
1.87228500.0876-
1.89438600.308-
1.91638700.0557-
1.93838800.2808-
1.96048900.0886-
1.98249000.2489-
2.0908-0.4488
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.10.10
  • Sentence Transformers: 3.0.1
  • Transformers: 4.43.4
  • PyTorch: 2.4.0+cu121
  • Accelerate: 0.33.0
  • Datasets: 2.21.0
  • 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",
}

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…

Класс архитектуры
XLMRobertaModel
Ревизия весов
51fdcaf

0 моделей