Commit
Β·
4dd3b02
1
Parent(s):
9e2aecf
updated readme file
Browse files
README.md
CHANGED
|
@@ -1,3 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 𧬠mRNA-BioBERT: Fine-Tuned BioBERT for mRNA Sentence Classification
|
| 2 |
+
**Fine-tuned BioBERT model for classifying mRNA-related sentences in biomedical research papers.**
|
| 3 |
+
|
| 4 |
+
π **Hugging Face Model Link**: [debjit20504/mRNA-biobert](https://huggingface.co/debjit20504/mRNA-biobert)
|
| 5 |
+
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
## π Overview
|
| 9 |
+
**mRNA-BioBERT** is a fine-tuned version of [BioBERT](https://huggingface.co/dmis-lab/biobert-base-cased-v1.1), trained specifically for **classifying sentences** as **mRNA-related (relevant) or not (irrelevant)**. The model is useful for **automating literature reviews**, **extracting relevant sentences**, and **identifying key insights** in genomic research.
|
| 10 |
+
|
| 11 |
+
β **Base Model**: `dmis-lab/biobert-base-cased-v1.1`
|
| 12 |
+
β **Fine-tuning Method**: **LoRA (Low-Rank Adaptation)**
|
| 13 |
+
β **Dataset**: **Curated biomedical text corpus containing labeled mRNA-relevant and non-relevant sentences**
|
| 14 |
+
β **Task**: **Binary classification (1 = relevant, 0 = not relevant)**
|
| 15 |
+
β **Trained on**: **RTX A6000 GPU (5 epochs, batch size 32, learning rate 2e-5)**
|
| 16 |
+
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
## π Model Applications
|
| 20 |
+
β
**Biomedical NLP** β Extracting meaningful information from biomedical literature.
|
| 21 |
+
β
**mRNA Research** β Identifying sentences discussing mRNA mechanisms.
|
| 22 |
+
β
**Automated Literature Review** β Filtering relevant studies efficiently.
|
| 23 |
+
β
**Genomics & Bioinformatics** β Enhancing data retrieval from scientific texts.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## π How to Use the Model
|
| 28 |
+
### 1οΈβ£ Install Dependencies
|
| 29 |
+
```bash
|
| 30 |
+
pip install transformers torch
|
| 31 |
+
```
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 34 |
+
import torch
|
| 35 |
+
|
| 36 |
+
# Load the model and tokenizer
|
| 37 |
+
model_name = "debjit20504/mRNA-biobert"
|
| 38 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 39 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 40 |
+
|
| 41 |
+
# Move model to GPU or MPS (for Mac)
|
| 42 |
+
device = torch.device("mps") if torch.backends.mps.is_available() else torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 43 |
+
model.to(device)
|
| 44 |
+
model.eval()
|
| 45 |
+
|
| 46 |
+
def classify_text(text):
|
| 47 |
+
inputs = tokenizer(text, return_tensors="pt").to(device)
|
| 48 |
+
with torch.no_grad():
|
| 49 |
+
output = model(**inputs)
|
| 50 |
+
label = torch.argmax(output.logits, dim=1).item()
|
| 51 |
+
return "Relevant (mRNA-related)" if label == 1 else "Not Relevant"
|
| 52 |
+
|
| 53 |
+
# Example Test
|
| 54 |
+
sample_text = "mRNA translation is regulated by miRNAs."
|
| 55 |
+
print(f"Classification: {classify_text(sample_text)}")
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## π Training Details
|
| 59 |
+
- Dataset: Biomedical text dataset with 429,785 relevant sentences and 87,966 irrelevant sentences.
|
| 60 |
+
- Fine-Tuning Method: LoRA (Low-Rank Adaptation) for efficient training.
|
| 61 |
+
- Training Hardware: NVIDIA RTX A6000 GPU.
|
| 62 |
+
- Training Settings:
|
| 63 |
+
- Batch size: 32
|
| 64 |
+
- Learning rate: 2e-5
|
| 65 |
+
- Optimizer: AdamW
|
| 66 |
+
- Warmup steps: 1000
|
| 67 |
+
- Epochs: 5
|
| 68 |
+
- Mixed precision (fp16): β
Enabled for efficiency.
|
| 69 |
+
|
| 70 |
+
## π¬ Contact
|
| 71 |
+
For any questions or collaborations, reach out via:
|
| 72 |
+
|
| 73 |
+
**π§ Email**: debjit.pramanik@postgrad.manchester.ac.uk
|
| 74 |
+
**π LinkedIn**: https://www.linkedin.com/in/debjit-pramanik-88a837171/
|