/ Модель

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

Контекст
512 токенов
Параметры
40 млн
Архитектура
bert · dense
Опубликована
17 апр 2024

bge-medical-small-en-v1.5

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

Англоязычная BERT-модель эмбеддингов, дообученная на медицинских вопросах и ответах для семантического поиска.

57скачиваний за 30 дней1лайквеса обновлены22 апр 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

aleynahukmet/bge-medical-small-en-v1.5 — англоязычная модель эмбеддингов для семантического поиска медицинской информации. Разработчик дообучил BAAI/bge-small-en-v1.5 из библиотеки SentenceTransformers на наборах медицинских вопросов и ответов, включая MedQuad и Medical Meadow. Модель построена на архитектуре BERT, содержит около 40 млн параметров и принимает текстовые запросы; максимальная длина контекста — 512 токенов.

Модель предназначена для представления медицинских запросов и текстов в виде векторов, чтобы находить семантически близкие материалы в системах поиска и ответов на вопросы. В README сообщается о результате около 0,887 на тестовом наборе, оценённом Translation Evaluator, однако подробности протокола оценки не приведены. Модель выдаёт признаки или эмбеддинги, а не готовые медицинские ответы. Лицензия в предоставленных данных не указана.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

medical-qa

🚀 Overview

This project focuses on developing a semantic search system for medical question answering fine-tuning pre-trained language models. The project utilizes datasets sourced from Hugging Face, containing medical question-answer pairs, which are processed to ensure compatibility with the chosen model architecture. The base model fine-tuned for this task is the BAAI/bge-small-en-v1.5 model from the SentenceTransformers library, and the details for the fine-tuned model can be found below.

Motivation

This project addresses the critical need for efficient and accurate medical information retrieval systems. Traditional methods often struggle with the nuanced semantics of medical queries. By leveraging advanced natural language processing techniques and large-scale medical datasets, we aim to streamline the process, empowering healthcare professionals and patients with timely, reliable, and personalized medical information. Ultimately, our goal is to contribute to the efforts to make medical information more accessible.

Dataset

This project incorporates multiple datasets sourced from the Hugging Face platform, each contributing to the training and evaluation of the semantic search system:

  1. keivalya/MedQuad-MedicalQnADataset
    • Description: This medical question-answer pairs intended for training machine learning models in the medical domain. It consists of three columns: 'qtype' denoting the question type, 'Question' representing the medical queries, and 'Answer' providing corresponding answers. The dataset comprises 16,407 samples in the training split.
  2. medalpaca/medical_meadow_wikidoc
    • Description: This dataset, consisting of 10,000 samples in the training split, contains medical information in the form of instructions, input, and output. The 'instruction' column provides contextual information, while the 'input' and 'output' columns contain medical queries and their corresponding answers, respectively.
  3. medalpaca/medical_meadow_medical_flashcards
    • Description: This dataset comprises 33,955 samples in the training split. It follows a similar structure to the medical_meadow_wikidoc dataset, with 'instruction', 'input', and 'output' columns. The '
      instruction' column provides additional context, while the 'input' and 'output' columns contain medical questions and their corresponding answers.
  4. medalpaca/medical_meadow_wikidoc_patient_information
    • Description: With 5,942 samples in the training split, this dataset focuses on patient information within the medical domain. It features 'instruction', 'input', and 'output' columns similar to the previous datasets, where 'input' represents medical queries and 'output' denotes corresponding answers.

After preprocessing, which involves removing irrelevant columns and renaming columns for uniformity, the datasets are concatenated into a single dataset. The resulting dataset contains 53,043 samples in the training split and 13,261 samples in the test split, with 'question' and 'answer' columns representing medical queries and their corresponding answers, respectively.

Usage

The model is hosted on the Hugging Face model hub at aleynahukmet/bge-medical-small-en-v1.5, and it's easy to use it with the Sentence Transformers library.

  1. Install Sentence Transformers Library: Ensure you have the Sentence Transformers library installed. You can install it via pip if you haven't already:

    pip install sentence-transformers
    
    
  2. Load the Model: Once the model is downloaded, you can load it into your Python environment using the SentenceTransformer class:

    from sentence_transformers import SentenceTransformer
    
    model_name = "aleynahukmet/bge-medical-small-en-v1.5"
    model = SentenceTransformer(model_name)
    
    
  3. Encode Medical Texts: You can now use the loaded model to encode medical texts into fixed-dimensional vectors. For example:

    #Example medical text
    medical_text = "A 45-year-old male presents with chest pain and shortness of breath."
    
    #Encode the medical text
    encoded_text = model.encode(medical_text)
    
    
  4. Utilize Encoded Vectors: The encoded vectors can be used for various downstream tasks, such as semantic search, clustering, or classification, depending on your specific application needs.

Training:

You can review the code for fine-tuning in this notebook.

Evaluation:

I used Translation Evaluator to evaluate the model on the test set, and it achieved ~0.887 (a 10-point improvement from 0.78 for the base model).

Requirements:

datasets==2.18.0
numpy==1.24.4
pandas==2.0.3
sentence_transformers==2.5.1
torch==2.0.1

If you don't have the requirements installed, they can be installed with the following:

pip install -r requirements.txt

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

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

GPU в ailist

Универсальный рантайм

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

Подбираем GPU…

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

0 моделей