ncbi/pubmed
Updated • 1.27k • 163
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 = "venkatd/NCBI_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 entity type of Disease, score, and start/end positions in the text. Here’s a sample output format:
[
{
"entity_group": "Disease",
"score": 0.98,
"word": "SCC of the cervix",
"start": 121,
"end": 139
},
...
]
Model Summary and Training Details
microsoft/deberta-v3-base Optimizer: AdamW
Learning Rate Scheduler: Cosine Scheduler with Warmup
len(train_loader) * num_epochsBase model
microsoft/deberta-v3-base