File size: 1,741 Bytes
011df9a
 
 
 
 
 
 
 
 
 
c34f966
011df9a
 
 
066a84d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
011df9a
066a84d
 
8e91d00
 
 
 
066a84d
 
 
 
011df9a
066a84d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e91d00
066a84d
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
---
language: en
license: mit
datasets:
  - custom
tags:
  - molt5
  - drug-drug-interaction
  - biomedical
library_name: transformers
pipeline_tag: text-generation
---


# MolT5 for Drug–Drug Interaction Prediction

This repository contains a MolT5 model fine-tuned for Drug–Drug Interaction (DDI) prediction.
It is designed to infer potential interactions between drugs given their SMILES strings or textual descriptions.

## Model Description
MolT5 is a T5-based architecture designed for molecular tasks.  
This model was further fine-tuned on a custom drug–drug interaction dataset to generate interaction classes or descriptions.

### Files Included
- `config.json`: model configuration
- `model.safetensors`: model weights
- `tokenizer_config.json`, `special_tokens_map.json`, `spiece.model`: tokenizer files
- `generation_config.json`: decoding parameters
- `added_tokens.json`: extra tokens

## Example Usage

```python
from transformers import T5ForConditionalGeneration, T5Tokenizer

tokenizer = T5Tokenizer.from_pretrained("acdsd/DDI")
model = T5ForConditionalGeneration.from_pretrained("acdsd/DDI")

query = "[DRUG1] ibuprofen SMILES CC(C)CC1=CC=C(C=C1)C(C)C(=O)O [DRUG2] paracetamol SMILES CC(=O)NC1=CC=C(O)C=C1"

inputs = tokenizer(query, return_tensors="pt")
outputs = model.generate(**inputs, num_beams=4, max_length=128)
print(tokenizer.decode(outputs, skip_special_tokens=True))
```


## Intended Use
- Drug–Drug Interaction classification
- Drug safety/toxicity assessment

## License
MIT License

## Citation
<!-- 
If you use this model:
@model{your_org_molt5_ddi_2025,
title={MolT5 Fine-tuned for Drug–Drug Interaction Prediction},
year={2025},
author={Your Name},
url={https://huggingface.co/acdsd/DDI}
} -->