Downloads · 30 days
21
4% of all-time downloads
sharraks97/biorecall-PubMedBERT-NLI
biorecall-PubMedBERT-NLI is a text classification model from sharraks97. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
21
4% of all-time downloads
All-time downloads
506
Public
Parameters
109M
8.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext on synthetic biomedical Natural Language Inference (NLI) dataset available at [https://huggingface.co/datasets/sharraks97/PubMedQA-synthetic-nli] to classify whether a hypothesis sentence is entailed by, contradicted by, or neutral with respect to a biomedical context. It achieves the following results on the evaluation set:
This model can be used to:
Example usage:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("sharraks97/biorecall-PubMedBERT-NLI")
model = AutoModelForSequenceClassification.from_pretrained("sharraks97/biorecall-PubMedBERT-NLI")
premise = "Biomedical context text"
hypothesis = "Claim sentence"
inputs = tokenizer(premise, hypothesis, return_tensors="pt", truncation=True)
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1)
Best model checkpoint selected using validation Macro F1-score.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro |
|---|---|---|---|---|---|
| 0.7412 | 1.0 | 79 | 0.3621 | 0.9078 | 0.8822 |
| 0.3472 | 2.0 | 158 | 0.3379 | 0.9218 | 0.8986 |
| 0.2476 | 3.0 | 237 | 0.2202 | 0.9078 | 0.8840 |
| 0.1514 | 4.0 | 316 | 0.2108 | 0.9274 | 0.9054 |
Rakshit Sharma Project: BioRecall (Reasoning Enabled and Contradiction Augmented LLM RAG)