NeuronZero
commited on
Commit
•
2f74f71
1
Parent(s):
4571ece
Update README.md
Browse files
README.md
CHANGED
@@ -1,8 +1,70 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
|
4 |
-
- en
|
5 |
-
pipeline_tag: token-classification
|
6 |
tags:
|
7 |
-
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
base_model: microsoft/deberta-v3-base
|
|
|
|
|
4 |
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
model-index:
|
7 |
+
- name: deberta-med-ner-2
|
8 |
+
results: []
|
9 |
+
|
10 |
+
widget:
|
11 |
+
- text: "A 48 year-old female presented with vaginal bleeding and abnormal Pap smears.
|
12 |
+
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.
|
13 |
+
Pathological examination revealed that the tumour also extensively involved the lower uterine segment."
|
14 |
+
example_title: "example 1"
|
15 |
+
|
16 |
+
---
|
17 |
+
|
18 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
19 |
+
should probably proofread and complete it, then remove this comment. -->
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
# deberta-med-ner-2
|
25 |
+
|
26 |
+
This model is a fine-tuned version of [DeBERTaV3](https://huggingface.co/microsoft/deberta-v3-base) on the PubMED Dataset.
|
27 |
+
|
28 |
+
## Model description
|
29 |
+
|
30 |
+
MED-NER Model was finetuned on BERT to recognize 41 Medical entities.
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
### Training hyperparameters
|
35 |
+
|
36 |
+
The following hyperparameters were used during training:
|
37 |
+
- learning_rate: 2e-05
|
38 |
+
- train_batch_size: 16
|
39 |
+
- eval_batch_size: 32
|
40 |
+
- seed: 69
|
41 |
+
- gradient_accumulation_steps: 2
|
42 |
+
- total_train_batch_size: 32
|
43 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
44 |
+
- lr_scheduler_type: cosine
|
45 |
+
- lr_scheduler_warmup_ratio: 0.1
|
46 |
+
- num_epochs: 25
|
47 |
+
- mixed_precision_training: Native AMP
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
## Usage
|
52 |
+
The easiest way is to load the inference api from huggingface and second method is through the pipeline object offered by transformers library.
|
53 |
+
```python
|
54 |
+
# Use a pipeline as a high-level helper
|
55 |
+
from transformers import pipeline
|
56 |
+
pipe = pipeline("token-classification", model="NeuronZero/MED-NER", aggregation_strategy='simple')
|
57 |
+
|
58 |
+
result = pipe('A 48 year-old female presented with vaginal bleeding and abnormal Pap smears.
|
59 |
+
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.
|
60 |
+
Pathological examination revealed that the tumour also extensively involved the lower uterine segment.')
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
# Load model directly
|
65 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
66 |
+
|
67 |
+
tokenizer = AutoTokenizer.from_pretrained("NeuronZero/MED-NER")
|
68 |
+
model = AutoModelForTokenClassification.from_pretrained("NeuronZero/MED-NER")
|
69 |
+
```
|
70 |
+
|