Downloads · 30 days
12
17% of all-time downloads
kprsnt/drug-discovery-chemberta
drug-discovery-chemberta is a text classification model from kprsnt. Use it when you need a label for a piece of text. The card lists the license as mit.
A ChemBERTa model finetuned for predicting drug approval success based on molecular SMILES representation.
Downloads · 30 days
12
17% of all-time downloads
All-time downloads
72
Public
Repo size
353 MB
Likes
0
Public
Click a slice to open those files.
.bin176 MB · 100%
From the Hugging Face model README
A ChemBERTa model finetuned for predicting drug approval success based on molecular SMILES representation.
This model is a finetuned version of seyonec/ChemBERTa-zinc-base-v1 for drug success prediction. It classifies molecules as likely to be approved or failed based on their SMILES structure.
| Metric | Score |
|---|---|
| Accuracy | 69.6% |
| F1 Score | 48.8% |
| ROC-AUC | 70.8% |
| PR-AUC | 65.1% |
| Model | Accuracy | ROC-AUC |
|---|---|---|
| Pretrained (no finetuning) | 44.2% | 42.9% |
| Finetuned (this model) | 69.6% | 70.8% |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/drug-discovery-chemberta")
model = AutoModelForSequenceClassification.from_pretrained("YOUR_USERNAME/drug-discovery-chemberta")
# Predict for a molecule (Aspirin)
smiles = "CC(=O)OC1=CC=CC=C1C(=O)O"
inputs = tokenizer(smiles, return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
prediction = "Approved" if probs[0][1] > 0.5 else "Failed"
confidence = probs[0][1].item() if prediction == "Approved" else probs[0][0].item()
print(f"Prediction: {prediction} (confidence: {confidence:.2%})")
This model is intended for:
If you use this model, please cite:
@misc{drug-discovery-chemberta-2024,
author = {Your Name},
title = {Drug Discovery ChemBERTa: Finetuned for Drug Success Prediction},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/YOUR_USERNAME/drug-discovery-chemberta}
}
MIT License