Update README.md
Browse files
README.md
CHANGED
@@ -1,8 +1,83 @@
|
|
1 |
---
|
2 |
license: unknown
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
pipeline_tag: token-classification
|
8 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: unknown
|
3 |
+
base_model: microsoft/deberta-v3-base
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
- medical
|
7 |
+
model-index:
|
8 |
+
- name: deberta-med-ner-2
|
9 |
+
results: []
|
10 |
+
widget:
|
11 |
+
- text: A 28-year-old previously healthy man presented with a 6-week history of palpitations.The symptoms occurred during rest, 2–3 times per week, lasted up to 30 minutes at a time and were associated with dyspnea.
|
12 |
+
example_title: Example-1
|
13 |
+
- text: A 30-year-old female (65 kg) underwent rhinoplasty under general anaesthesia, which was induced using a combination of a bolus of Remifentanyl (0.5 μg/kg) and Propofol 2 mg/kg.
|
14 |
+
example_title: Example-2
|
15 |
+
- text: >-
|
16 |
+
An 18-year-old male was diagnosed with attention-deficit hyperactivity disorder (ADHD) in 2005.He was overweight with a body mass index (BMI) of 40.
|
17 |
+
example_title: example 3
|
18 |
pipeline_tag: token-classification
|
19 |
+
---
|
20 |
+
|
21 |
+
|
22 |
+
### **BIOMed_NER: Named Entity Recognition for Biomedical Entities**
|
23 |
+
|
24 |
+
**Model Overview:**
|
25 |
+
BIOMed_NER is a Named Entity Recognition (NER) model which identifies 41 biomedical entities using DeBERTaV3. This model is useful for extracting structured information from clinical text, such as diseases, procedures, medications, and anatomical terms.
|
26 |
+
|
27 |
+
**Hyperparameters:**
|
28 |
+
- **Base Model**: `microsoft/deberta-v3-base`
|
29 |
+
- **Learning Rate**: `3e-5`
|
30 |
+
- **Batch Size**: `8`
|
31 |
+
- **Gradient Accumulation Steps**: `2`
|
32 |
+
- **Scheduler**: Cosine schedule with warmup
|
33 |
+
- **Epochs**: `30`
|
34 |
+
- **Optimizer**: AdamW with betas `(0.9, 0.999)` and epsilon `1e-8`
|
35 |
+
|
36 |
+
**How to Use the Model for Inference:**
|
37 |
+
|
38 |
+
You can use the Hugging Face `pipeline` for easy inference:
|
39 |
+
|
40 |
+
```python
|
41 |
+
from transformers import pipeline
|
42 |
+
|
43 |
+
# Load the model
|
44 |
+
model_path = "venkatd/BIOMed_NER"
|
45 |
+
pipe = pipeline(
|
46 |
+
task="token-classification",
|
47 |
+
model=model_path,
|
48 |
+
tokenizer=model_path,
|
49 |
+
aggregation_strategy="simple"
|
50 |
+
)
|
51 |
+
|
52 |
+
# Test the pipeline
|
53 |
+
text = ("A 48-year-old female presented with vaginal bleeding and abnormal Pap smears. "
|
54 |
+
"Upon diagnosis of invasive non-keratinizing SCC of the cervix, she underwent a radical "
|
55 |
+
"hysterectomy with salpingo-oophorectomy which demonstrated positive spread to the pelvic "
|
56 |
+
"lymph nodes and the parametrium.")
|
57 |
+
result = pipe(text)
|
58 |
+
print(result)
|
59 |
+
```
|
60 |
+
|
61 |
+
**Output Example:**
|
62 |
+
|
63 |
+
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:
|
64 |
+
|
65 |
+
```json
|
66 |
+
[
|
67 |
+
{
|
68 |
+
"entity_group": "Disease_disorder",
|
69 |
+
"score": 0.98,
|
70 |
+
"word": "SCC of the cervix",
|
71 |
+
"start": 63,
|
72 |
+
"end": 80
|
73 |
+
},
|
74 |
+
...
|
75 |
+
]
|
76 |
+
```
|
77 |
+
|
78 |
+
**Use Cases:**
|
79 |
+
- Extracting clinical information from unstructured text in medical records.
|
80 |
+
- Structuring data for downstream biomedical research or applications.
|
81 |
+
- Assisting healthcare professionals by highlighting relevant biomedical entities.
|
82 |
+
|
83 |
+
This model is publicly available on Hugging Face and can be easily integrated into applications for medical text analysis.
|