bert base uncased_clinical ner

samrawal

Introduction

The BERT-BASE-UNCASED_CLINICAL-NER model is designed for Named Entity Recognition (NER) tasks focused on clinical entities such as problems, treatments, and tests. It leverages the BERT architecture to identify and classify these entities within clinical text.

Architecture

This model is based on the BERT architecture, specifically the BERT-BASE-UNCASED version. It supports token classification tasks and is compatible with popular machine learning frameworks such as PyTorch, TensorFlow, and JAX.

Training

The model is trained on the i2b2 (now n2c2) dataset, specifically for the 2010 Relations task. The dataset comprises medical texts annotated for relationships among clinical entities, which helps the model learn to recognize and classify these entities accurately. Access to the dataset can be requested via the n2c2 website.

Guide: Running Locally

To run the BERT-BASE-UNCASED_CLINICAL-NER model locally, follow these basic steps:

  1. Setup Environment:

    • Install Python and necessary libraries such as transformers and torch.
    • Create a virtual environment for isolated package management.
  2. Download Model:

    • Use the Hugging Face Transformers library to download the model:
      pip install transformers
      
    • Load the model using:
      from transformers import AutoTokenizer, AutoModelForTokenClassification
      
      tokenizer = AutoTokenizer.from_pretrained("samrawal/bert-base-uncased_clinical-ner")
      model = AutoModelForTokenClassification.from_pretrained("samrawal/bert-base-uncased_clinical-ner")
      
  3. Inference:

    • Tokenize and run inference on your text data to perform entity recognition.
  4. Cloud GPUs:

    • For large-scale deployment or faster processing, consider using cloud GPU providers such as AWS, Google Cloud, or Azure.

License

The model is subject to the licensing terms provided by its contributors. Please refer to the Hugging Face Model Card for specific license details.

More Related APIs in Token Classification