How to use from the
Use from the
Transformers library
# 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")
Quick Links

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

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

Downloads last month
14
Safetensors
Model size
0.8B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support