Text Generation
Transformers
Safetensors
English
drug-discovery
drug-target-interaction
dti
biomedical-ai
cheminformatics
llm
llama-3
lora
unsloth
biology
regression
classification
virtual-screening
molecular-modeling
bioinformatics
structure-activity-relationship
qsar
protein-ligand-interaction
Instructions to use Cyanex/BioGPT-X with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cyanex/BioGPT-X with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Cyanex/BioGPT-X")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Cyanex/BioGPT-X", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Cyanex/BioGPT-X with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Cyanex/BioGPT-X" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyanex/BioGPT-X", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Cyanex/BioGPT-X
- SGLang
How to use Cyanex/BioGPT-X with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Cyanex/BioGPT-X" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyanex/BioGPT-X", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Cyanex/BioGPT-X" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyanex/BioGPT-X", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use Cyanex/BioGPT-X with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Cyanex/BioGPT-X to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Cyanex/BioGPT-X to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Cyanex/BioGPT-X to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Cyanex/BioGPT-X", max_seq_length=2048, ) - Docker Model Runner
How to use Cyanex/BioGPT-X with Docker Model Runner:
docker model run hf.co/Cyanex/BioGPT-X
File size: 8,977 Bytes
8b0a8f1 c699c0a 8b0a8f1 c699c0a 5a9c0d2 c699c0a 5a9c0d2 c699c0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | ---
license: llama3
language:
- en
tags:
- drug-discovery
- drug-target-interaction
- dti
- biomedical-ai
- cheminformatics
- llm
- llama-3
- lora
- unsloth
- biology
- regression
- classification
- virtual-screening
- molecular-modeling
- bioinformatics
- structure-activity-relationship
- qsar
- protein-ligand-interaction
pipeline_tag: text-generation
base_model: unsloth/llama-3-8b-bnb-4bit
datasets:
- eve-bio/drug-target-activity
library_name: transformers
task_categories:
- text-generation
widget:
- text: |
Drug:
SMILES: CC(=O)OC1=CC=CC=C1C(=O)O
Target:
UniProt ID: P35354
---
# 🧬 DTI-LLM: Drug–Target Interaction Prediction with LLaMA-3
> A LoRA fine-tuned LLaMA-3 model for predicting drug–target interactions from molecular and protein information.
>
> **Current Status:** 🚧 Active Development / Research Prototype
---
# Overview
DTI-LLM is a biomedical Large Language Model fine-tuned for **Drug–Target Interaction (DTI) prediction**. The model was trained on curated drug activity data and is designed to perform two related tasks simultaneously:
### 1. Classification
Predict whether a drug is likely to be biologically active against a target protein.
### 2. Regression
Estimate the interaction potency (pXC50) of the drug–target pair.
This makes DTI-LLM a **dual-task model**, capable of both activity prediction and potency estimation within a single inference pipeline.
The project is currently in an experimental stage and is being actively improved through continued dataset refinement, prompt engineering, architecture experimentation, and evaluation on larger benchmark datasets.
---
# Research Goal
The primary objective of this project is to explore how modern Large Language Models can be adapted for computational drug discovery tasks.
The long-term goals include:
* Improving virtual screening workflows
* Assisting early-stage lead prioritization
* Exploring LLM-based molecular reasoning
* Investigating structured biomedical prediction with generative models
* Building lightweight domain-specific AI systems deployable on consumer hardware
This repository represents an ongoing research effort rather than a finished production model.
---
# Model Details
| Component | Value |
| -------------------- | --------------------------- |
| Base Model | unsloth/llama-3-8b-bnb-4bit |
| Fine-Tuning Method | LoRA |
| LoRA Rank (r) | 32 |
| LoRA Alpha | 64 |
| LoRA Dropout | 0.05 |
| Trainable Parameters | ~83.9M |
| Context Length | 1024 |
| Training Samples | ~50,000 |
| Training Epochs | 1 |
| Training Hardware | NVIDIA T4 16GB |
| Framework | Unsloth |
---
# Input Format
The model expects information about:
* Drug molecule (SMILES)
* Protein target (UniProt ID)
* Optional assay metadata
Example:
```text
Drug:
SMILES: NC1=NC(=S)C2=C(N1)N=CN2
Target:
UniProt ID: Q13043
```
# Output Format
The model generates structured JSON:
```json
{
"is_active": true,
"pxc50": 6.2,
"confidence": "high",
"reasoning": "Structural similarity suggests moderate binding affinity."
}
```
| Field | Description |
| ---------- | --------------------------- |
| is_active | Binary activity prediction |
| pxc50 | Predicted potency value |
| confidence | Model confidence estimate |
| reasoning | Brief generated explanation |
---
# Performance
## Classification Task (Activity Prediction)
| Metric | Score |
| --------- | ----- |
| Accuracy | 0.946 |
| Precision | 1.000 |
| Recall | 0.512 |
| F1 Score | 0.658 |
| ROC-AUC | 0.765 |
| PR-AUC | 0.610 |
### Interpretation
The model currently exhibits extremely high precision.
When the model predicts that a compound is active, it is rarely incorrect. This behavior makes it useful for reducing false positives during early-stage virtual screening.
However, recall remains moderate, meaning some genuinely active compounds may not be identified.
Current development efforts are focused on improving recall while maintaining strong precision.
---
## Regression Task (Potency Prediction)
| Metric | Score |
| ---------- | ------ |
| RMSE | 1.099 |
| MAE | 0.723 |
| R² | -0.235 |
| Pearson r | 0.404 |
| Spearman ρ | 0.578 |
### Interpretation
The regression component remains experimental.
While the model demonstrates moderate ranking capability (Spearman correlation 0.578), absolute potency prediction is currently unreliable.
The model can often distinguish stronger interactions from weaker ones, but exact pXC50 values should not be interpreted as experimentally accurate measurements.
For the current release:
✅ Suitable for relative ranking
⚠️ Not suitable for precise potency estimation
Future work will focus heavily on improving regression performance through larger datasets, improved loss functions, and multi-task optimization.
---
# Current Development Status
This model is actively being developed.
Planned improvements include:
* Larger and more diverse training datasets
* Additional target protein coverage
* Improved regression accuracy
* Better calibration of confidence scores
* Multi-stage fine-tuning strategies
* Retrieval-augmented biomedical context
* Expanded benchmark evaluation
Performance metrics and model behavior may change significantly between releases.
---
# Example Usage
## Installation
```bash
pip install unsloth transformers accelerate bitsandbytes peft
```
## Loading the Adapter
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/llama-3-8b-bnb-4bit"
)
model = PeftModel.from_pretrained(
base_model,
"YOUR_USERNAME/DTI-LLM"
)
tokenizer = AutoTokenizer.from_pretrained(
"YOUR_USERNAME/DTI-LLM"
)
```
# CLI Inference (Recommended)
The repository includes a ready-to-use inference script for generating Drug–Target Interaction predictions.
Example:
```bash
python inference.py \
--model_path ./lora_adapter \
--smiles "CCO" \
--uniprot "P04637" \
--target_name "p53" \
--mechanism "binding" \
--technology "IC50 assay"
```
### Supported Arguments
| Argument | Description |
|-----------|-------------|
| `--model_path` | Path to the LoRA adapter |
| `--smiles` | Drug SMILES string |
| `--uniprot` | UniProt protein identifier |
| `--target_name` | Optional target name |
| `--mechanism` | Optional assay mechanism |
| `--technology` | Optional assay technology |
The CLI script is the recommended way to run inference and reproduce the results reported in this repository.
---
# Repository Contents
```text
lora_adapter/
├── adapter_config.json
├── adapter_model.safetensors
├── tokenizer.json
├── tokenizer_config.json
├── special_tokens_map.json
├── chat_template.jinja
├── training_config.json
└── README.md
```
---
# Limitations
This model has several important limitations.
### Regression Performance
Potency prediction remains the weakest component of the system and should be considered experimental.
### Dataset Bias
Training data originates from public biological assays and may not represent all protein families, assay conditions, or chemical spaces.
### Hallucinated Reasoning
Generated explanations are model-generated text and should not be interpreted as mechanistic biological evidence.
### Not for Clinical Use
This model is intended solely for research, education, and experimentation.
Predictions must never be used for:
* Clinical decision making
* Medical diagnosis
* Drug prescription
* Regulatory submissions
All predictions require experimental validation.
---
# Intended Use
Appropriate uses include:
* Academic research
* Educational projects
* Drug discovery experimentation
* Virtual screening exploration
* Biomedical AI benchmarking
* LLM fine-tuning demonstrations
---
# Acknowledgements
Special thanks to:
* Meta for LLaMA-3
* Unsloth for efficient fine-tuning tools
* The creators of the eve-bio/drug-target-activity dataset
* The open-source biomedical AI community
---
# License
Research Only.
This repository is provided for educational and research purposes.
Commercial use may be subject to the license terms of the underlying LLaMA-3 model.
---
## Disclaimer
DTI-LLM is an experimental research project under active development.
The model demonstrates promising classification performance and moderate ranking capability, but it is not a substitute for laboratory validation, computational chemistry pipelines, or expert scientific review.
|