Text Generation
Transformers
Safetensors
English
t5
molt5
drug-drug-interaction
biomedical
text-generation-inference
Instructions to use acdsd/DDI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use acdsd/DDI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="acdsd/DDI")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("acdsd/DDI") model = AutoModelForSeq2SeqLM.from_pretrained("acdsd/DDI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use acdsd/DDI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "acdsd/DDI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "acdsd/DDI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/acdsd/DDI
- SGLang
How to use acdsd/DDI 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 "acdsd/DDI" \ --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": "acdsd/DDI", "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 "acdsd/DDI" \ --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": "acdsd/DDI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use acdsd/DDI with Docker Model Runner:
docker model run hf.co/acdsd/DDI
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}
} --> |