Moreza009 nielsr HF Staff commited on
Commit
2dda6c5
·
verified ·
1 Parent(s): 0dad692

Improve dataset card: Add paper/code links, fix arXiv badge, and include sample usage (#3)

Browse files

- Improve dataset card: Add paper/code links, fix arXiv badge, and include sample usage (f51a680405012fc0a12c117078a1474e62090e54)


Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +79 -4
README.md CHANGED
@@ -1,5 +1,8 @@
1
  ---
2
  license: apache-2.0
 
 
 
3
  dataset_info:
4
  features:
5
  - name: smiles
@@ -38,15 +41,13 @@ configs:
38
  path: data/test-*
39
  - split: external
40
  path: data/external-*
41
- task_categories:
42
- - text-generation
43
- - text-classification
44
  tags:
45
  - chemistry
46
  - biology
47
  - medical
48
  ---
49
- [![arXiv](https://img.shields.io/badge/arXiv-1234.5678-b31b1b.svg)](https://arxiv.org/abs/2508.18579)
 
50
 
51
  # DrugReasoner Dataset
52
  This dataset contains a curated collection of approved (Phase IV clinical trial) and unapproved (pre-clinical trial) small molecules from the ChEMBL database, annotated for drug approval status. It was designed for training and evaluating DrugReasoner, a reasoning-augmented LLM for drug approval prediction.
@@ -61,6 +62,80 @@ A dataset of small molecules was obtained from the ChEMBL database (version 35)
61
  The dataset was partitioned into training, validation, and test subsets (8:1:1) using a stratified sampling strategy to maintain class distribution across all splits.
62
  An independent external dataset includes data presented in the ChemAP paper (Cho, C. et al., 2024). This dataset contained 20 approved and 8 unapproved drugs. Three approved drugs overlapping with the training, validation, or test sets were removed, and the remaining molecules (17 approved and 8 unapproved) were used for external evaluation.
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  # Citation
66
  If you use this dataset in your research, please cite our paper:
 
1
  ---
2
  license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ - text-classification
6
  dataset_info:
7
  features:
8
  - name: smiles
 
41
  path: data/test-*
42
  - split: external
43
  path: data/external-*
 
 
 
44
  tags:
45
  - chemistry
46
  - biology
47
  - medical
48
  ---
49
+
50
+ [Paper](https://huggingface.co/papers/2508.18579) | [![arXiv](https://img.shields.io/badge/arXiv-2508.18579-b31b1b.svg)](https://arxiv.org/abs/2508.18579) | [Code](https://github.com/mohammad-gh009/DrugReasoner)
51
 
52
  # DrugReasoner Dataset
53
  This dataset contains a curated collection of approved (Phase IV clinical trial) and unapproved (pre-clinical trial) small molecules from the ChEMBL database, annotated for drug approval status. It was designed for training and evaluating DrugReasoner, a reasoning-augmented LLM for drug approval prediction.
 
62
  The dataset was partitioned into training, validation, and test subsets (8:1:1) using a stratified sampling strategy to maintain class distribution across all splits.
63
  An independent external dataset includes data presented in the ChemAP paper (Cho, C. et al., 2024). This dataset contained 20 approved and 8 unapproved drugs. Three approved drugs overlapping with the training, validation, or test sets were removed, and the remaining molecules (17 approved and 8 unapproved) were used for external evaluation.
64
 
65
+ ## Sample Usage
66
+ To use **DrugReasoner**, you must first request access to the base model [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) on Hugging Face by providing your contact information. Once access is granted, you can run DrugReasoner either through the command-line interface (CLI) or integrate it directly into your Python workflows.
67
+
68
+ ### Prerequisites
69
+
70
+ - Python 3.8 or higher
71
+ - CUDA-compatible GPU (recommended for training and inference)
72
+ - Git
73
+
74
+ ### Setup Instructions
75
+
76
+ 1. **Clone the repository**
77
+ ```bash
78
+ git clone https://github.com/mohammad-gh009/DrugReasoner.git
79
+ cd DrugReasoner
80
+ ```
81
+
82
+ 2. **Create and activate virtual environment**
83
+
84
+ **Windows:**
85
+ ```bash
86
+ cd src
87
+ python -m venv myenv
88
+ myenv\Scripts\activate
89
+ ```
90
+
91
+ **Mac/Linux:**
92
+ ```bash
93
+ cd src
94
+ python -m venv myenv
95
+ source myenv/bin/activate
96
+ ```
97
+
98
+ 3. **Install dependencies**
99
+ ```bash
100
+ pip install -r requirements.txt
101
+ ```
102
+ 4. **Login to your Huggingface account**
103
+ You can use [this](https://huggingface.co/join) instruction on how to make an account and [this](https://huggingface.co/docs/hub/en/security-tokens) on how to get the token
104
+
105
+ ```bash
106
+ huggingface-cli login --token YOUR_TOKEN_HERE
107
+ ```
108
+ ## 🚀 How to use
109
+
110
+ **Note:** GPU is required for inference. If unavailable, use our [Kaggle Notebook](https://www.kaggle.com/code/mohammadgh009/drugreasoner).
111
+
112
+ #### CLI Inference
113
+ ```bash
114
+ python inference.py \
115
+ --smiles "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O" "CC1=CC=C(C=C1)C(=O)O" \
116
+ --output results.csv \
117
+ --top-k 9 \
118
+ --top-p 0.9 \
119
+ --max-length 4096 \
120
+ --temperature 1.0
121
+ ```
122
+
123
+ #### Python API Usage
124
+ ```python
125
+ from inference import DrugReasoner
126
+
127
+ predictor = DrugReasoner()
128
+
129
+ results = predictor.predict_molecules(
130
+ smiles_list=["CC(C)CC1=CC=C(C=C1)C(C)C(=O)O"],
131
+ save_path="results.csv",
132
+ print_results=True,
133
+ top_k=9,
134
+ top_p=0.9,
135
+ max_length=4096,
136
+ temperature=1.0
137
+ )
138
+ ```
139
 
140
  # Citation
141
  If you use this dataset in your research, please cite our paper: