/ Модель

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

Контекст
512 токенов
Параметры
212 млн
Лицензия
Не указана
Архитектура
deberta-v2 · dense
Базовая модель
deberta-v3-base
Опубликована
11 ноя 2024

BioMed_NER

Разметка токеновТекст → label3 профессии

Модель на базе DeBERTa-v3-base выделяет медицинские сущности в англоязычных клинических и биомедицинских текстах.

49скачиваний за 30 дней8лайковвеса обновлены30 янв 2025

Бенчмарки

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

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

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

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

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

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

BIOMed_NER — модель распознавания и классификации именованных сущностей в биомедицинском и клиническом тексте. Она разработана на основе DeBERTa-v3-base и дообучена для выделения заболеваний, процедур, лекарств, анатомических терминов и других медицинских сущностей. Модель содержит 211,6 млн параметров, использует архитектуру DeBERTa v2 для классификации токенов и принимает текстовые фрагменты длиной до 512 токенов.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

BIOMed_NER: Named Entity Recognition for Biomedical Entities

Model Overview: BIOMed_NER is a Named Entity Recognition (NER) model which identifies biomedical entities using DeBERTaV3. This model is useful for extracting structured information from clinical text, such as diseases, procedures, medications, and anatomical terms. Here's a more detailed and enthusiastic introduction emphasizing the strengths of DeBERTa and why it's an excellent choice for your BIOMed_NER model:


Why DeBERTa for Biomedical NER?

DeBERTa (Decoding-enhanced BERT with Disentangled Attention) represents a significant leap forward in NLP model architecture, particularly for nuanced tasks like Named Entity Recognition (NER) in complex domains such as biomedical texts. Here’s why DeBERTa was the ideal choice for BIOMed_NER:

  1. Advanced Disentangled Attention Mechanism:

    • DeBERTa goes beyond traditional transformers by using a unique disentangled attention mechanism that separately encodes word content and word position. This allows DeBERTa to capture the contextual meaning of biomedical terms and understand complex sentence structures, which is essential for accurately tagging biomedical entities that often have overlapping or highly specific terms.
  2. Enhanced Embedding for Richer Contextual Understanding:

    • Biomedical text often contains long sentences, specialized terminology, and hierarchical relationships between entities (e.g., "diabetes" vs. "Type 1 diabetes"). DeBERTa’s improved embedding layer allows it to capture these nuanced relationships better than traditional transformer models, making it especially effective in understanding context-rich medical documents.
  3. Superior Performance on Downstream NLP Tasks:

    • DeBERTa consistently ranks among the top models on NLP benchmarks like GLUE and SQuAD, which is a testament to its ability to generalize across tasks. This high performance is especially beneficial for BIOMed_NER, where accurate recognition of subtle differences between biomedical entities can significantly enhance the quality of structured data extracted from unstructured clinical notes.
  4. Pre-trained for Optimal Transfer Learning:

    • Leveraging the "base" DeBERTaV3 variant allows us to tap into a model pre-trained on vast amounts of text, thus providing an excellent foundation for fine-tuning on domain-specific biomedical data. This pre-training, combined with the fine-tuning on the dataset, allows BIOMed_NER to accurately distinct biomedical entities, from diseases and medications to clinical events and anatomical structures.
  5. Efficient Fine-Tuning for Large Biomedical Datasets:

    • DeBERTa is optimized for both accuracy and efficiency, making it easier to train on large and complex datasets without needing excessive computational resources. This means faster iterations during model development and a more accessible deployment pipeline.

By selecting DeBERTa for BIOMed_NER, we've built a model that excels in understanding the intricate language of medicine, providing high accuracy and contextual depth essential for healthcare applications. Whether for researchers analyzing clinical data or applications structuring patient records, DeBERTa enables BIOMed_NER to extract, tag, and organize critical medical information effectively. Hyperparameters:

  • Base Model: microsoft/deberta-v3-base
  • Learning Rate: 3e-5
  • Batch Size: 8
  • Gradient Accumulation Steps: 2
  • Scheduler: Cosine schedule with warmup
  • Epochs: 30
  • Optimizer: AdamW with betas (0.9, 0.999) and epsilon 1e-8

How to Use the Model for Inference:

You can use the Hugging Face pipeline for easy inference:

from transformers import pipeline

# Load the model
model_path = "Helios9/BIOMed_NER"
pipe = pipeline(
    task="token-classification",
    model=model_path,
    tokenizer=model_path,
    aggregation_strategy="simple"
)

# Test the pipeline
text = ("A 48-year-old female presented with vaginal bleeding and abnormal Pap smears. "
        "Upon diagnosis of invasive non-keratinizing SCC of the cervix, she underwent a radical "
        "hysterectomy with salpingo-oophorectomy which demonstrated positive spread to the pelvic "
        "lymph nodes and the parametrium.")
result = pipe(text)
print(result)

Output Example:

The output will be a list of recognized entities with their entity type, score, and start/end positions in the text. Here’s a sample output format:

[
    {
        "entity_group": "Disease_disorder",
        "score": 0.98,
        "word": "SCC of the cervix",
        "start": 63,
        "end": 80
    },
    ...
]

In some cases, we are getting multiple same entity groups, so to join, please use below code:


def merge_consecutive_entities(entities, text):
    entities = sorted(entities, key=lambda x: x['start'])
    merged_entities = []
    current_entity = None

    for entity in entities:
        if current_entity is None:
            current_entity = entity
        elif (
            entity['entity_group'] == current_entity['entity_group'] and
            (entity['start'] <= current_entity['end'])
        ):
            # Merge based on start and end positions in the text
            current_entity['end'] = max(current_entity['end'], entity['end'])
            current_entity['word'] = text[current_entity['start']:current_entity['end']]
            current_entity['score'] = (current_entity['score'] + entity['score']) / 2  
        else:
            merged_entities.append(current_entity)
            current_entity = entity
    if current_entity:
        merged_entities.append(current_entity)

    return merged_entities



from transformers import pipeline

# Load the model
model_path = "Helios9/BIOMed_NER"
pipe = pipeline(
    task="token-classification",
    model=model_path,
    tokenizer=model_path,
    aggregation_strategy="simple"
)

# Test the pipeline
text = ("A 48-year-old female presented with vaginal bleeding and abnormal Pap smears. "
        "Upon diagnosis of invasive non-keratinizing SCC of the cervix, she underwent a radical "
        "hysterectomy with salpingo-oophorectomy which demonstrated positive spread to the pelvic "
        "lymph nodes and the parametrium.")
result = pipe(text)
final_result=merge_consecutive_entities(result,text)
print(final_result)

Use Cases:

  • Extracting clinical information from unstructured text in medical records.
  • Structuring data for downstream biomedical research or applications.
  • Assisting healthcare professionals by highlighting relevant biomedical entities.

This model is publicly available on Hugging Face and can be easily integrated into applications for medical text analysis.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей