Instructions to use Moreza009/Llama-DrugReasoner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Moreza009/Llama-DrugReasoner with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "Moreza009/Llama-DrugReasoner") - Notebooks
- Google Colab
- Kaggle
Improve model card: Update pipeline tag, library, and add paper/repo details
#3
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,19 +1,33 @@
|
|
| 1 |
---
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 3 |
-
library_name: peft
|
| 4 |
datasets:
|
| 5 |
- Moreza009/drug_approval_prediction
|
|
|
|
| 6 |
license: apache-2.0
|
| 7 |
-
pipeline_tag: text-
|
| 8 |
tags:
|
| 9 |
- medical
|
| 10 |
- biology
|
| 11 |
- chemistry
|
| 12 |
---
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
# DrugReasoner: Interpretable Drug Approval Prediction with a Reasoning-augmented Language Model
|
| 15 |
DrugReasoner is an AI-powered system for predicting drug approval outcomes using reasoning-augmented Large Language Models (LLMs) and molecular feature analysis. By combining advanced machine learning with interpretable reasoning, DrugReasoner provides transparent predictions that can accelerate pharmaceutical research and development.
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
## Model Details
|
| 18 |
|
| 19 |
- Model Name: DrugReasoner
|
|
@@ -66,10 +80,10 @@ You can use [this](https://huggingface.co/join) instruction on how to make an ac
|
|
| 66 |
```bash
|
| 67 |
huggingface-cli login --token YOUR_TOKEN_HERE
|
| 68 |
```
|
| 69 |
-
##
|
| 70 |
|
| 71 |
|
| 72 |
-
**Note:** GPU is required for inference. If unavailable, use our [
|
| 73 |
|
| 74 |
|
| 75 |
#### CLI Inference
|
|
@@ -100,6 +114,15 @@ results = predictor.predict_molecules(
|
|
| 100 |
)
|
| 101 |
```
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
## Citation
|
| 104 |
|
| 105 |
If you use DrugReasoner in your research, please cite our work:
|
|
@@ -114,4 +137,15 @@ If you use DrugReasoner in your research, please cite our work:
|
|
| 114 |
primaryClass={cs.LG},
|
| 115 |
url={https://arxiv.org/abs/2508.18579},
|
| 116 |
}
|
| 117 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
|
|
|
| 3 |
datasets:
|
| 4 |
- Moreza009/drug_approval_prediction
|
| 5 |
+
library_name: transformers
|
| 6 |
license: apache-2.0
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
- medical
|
| 10 |
- biology
|
| 11 |
- chemistry
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
[](https://arxiv.org/abs/2508.18579)
|
| 15 |
+
[](https://github.com/mohammad-gh009/DrugReasoner)
|
| 16 |
+
|
| 17 |
# DrugReasoner: Interpretable Drug Approval Prediction with a Reasoning-augmented Language Model
|
| 18 |
DrugReasoner is an AI-powered system for predicting drug approval outcomes using reasoning-augmented Large Language Models (LLMs) and molecular feature analysis. By combining advanced machine learning with interpretable reasoning, DrugReasoner provides transparent predictions that can accelerate pharmaceutical research and development.
|
| 19 |
|
| 20 |
+
## Abstract
|
| 21 |
+
Drug discovery is a complex and resource-intensive process, making early prediction of approval outcomes critical for optimizing research investments. While classical machine learning and deep learning methods have shown promise in drug approval prediction, their limited interpretability constraints their impact. Here, we present DrugReasoner, a reasoning-based large language model (LLM) built on the LLaMA architecture and fine-tuned with group relative policy optimization (GRPO) to predict the likelihood of small-molecule approval. DrugReasoner integrates molecular descriptors with comparative reasoning against structurally similar approved and unapproved compounds, generating predictions alongside step-by-step rationales and confidence scores. DrugReasoner achieved robust performance with an AUC of 0.732 and an F1 score of 0.729 on the validation set and 0.725 and 0.718 on the test set, respectively. These results outperformed conventional baselines, including logistic regression, support vector machine, and k-nearest neighbors and had competitive performance relative to XGBoost. On an external independent dataset, DrugReasoner outperformed both baseline and the recently developed ChemAP model, achieving an AUC of 0.728 and an F1-score of 0.774, while maintaining high precision and balanced sensitivity, demonstrating robustness in real-world scenarios. These findings demonstrate that DrugReasoner not only delivers competitive predictive accuracy but also enhances transparency through its reasoning outputs, thereby addressing a key bottleneck in AI-assisted drug discovery. This study highlights the potential of reasoning-augmented LLMs as interpretable and effective tools for pharmaceutical decision-making.
|
| 22 |
+
|
| 23 |
+
## β¨ Key Features
|
| 24 |
+
|
| 25 |
+
- **π€ LLM-Powered Predictions**: Utilizes fine-tuned Llama model for drug approval prediction
|
| 26 |
+
- **𧬠Molecular Analysis**: Advanced SMILES-based molecular structure analysis
|
| 27 |
+
- **π Interpretable Results**: Clear reasoning behind predictions for better decision-making
|
| 28 |
+
- **π Similarity Analysis**: Identifies similar approved/non-approved compounds for context
|
| 29 |
+
- **β‘ Flexible Inference**: Support for both single molecule and batch predictions
|
| 30 |
+
|
| 31 |
## Model Details
|
| 32 |
|
| 33 |
- Model Name: DrugReasoner
|
|
|
|
| 80 |
```bash
|
| 81 |
huggingface-cli login --token YOUR_TOKEN_HERE
|
| 82 |
```
|
| 83 |
+
## π How to use
|
| 84 |
|
| 85 |
|
| 86 |
+
**Note:** GPU is required for inference. If unavailable, use our [Kaggle Notebook](https://www.kaggle.com/code/mohammadgh009/drugreasoner).
|
| 87 |
|
| 88 |
|
| 89 |
#### CLI Inference
|
|
|
|
| 114 |
)
|
| 115 |
```
|
| 116 |
|
| 117 |
+
## π Dataset & Model
|
| 118 |
+
|
| 119 |
+
- **Dataset**: [](https://huggingface.co/datasets/Moreza009/drug_approval_prediction)
|
| 120 |
+
- **Model**: [](https://huggingface.co/Moreza009/Llama-DrugReasoner)
|
| 121 |
+
|
| 122 |
+
## π Performance
|
| 123 |
+
|
| 124 |
+
DrugReasoner demonstrates superior performance compared to traditional baseline models across multiple evaluation metrics. Detailed performance comparisons are available in our [paper](https://arxiv.org/abs/2508.18579).
|
| 125 |
+
|
| 126 |
## Citation
|
| 127 |
|
| 128 |
If you use DrugReasoner in your research, please cite our work:
|
|
|
|
| 137 |
primaryClass={cs.LG},
|
| 138 |
url={https://arxiv.org/abs/2508.18579},
|
| 139 |
}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## π License
|
| 143 |
+
|
| 144 |
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
| 145 |
+
|
| 146 |
+
---
|
| 147 |
+
|
| 148 |
+
<div align="center">
|
| 149 |
+
<strong>Accelerating drug discovery through AI-powered predictions</strong>
|
| 150 |
+
<br><br>
|
| 151 |
+
</div>
|