File size: 3,445 Bytes
df38d03
ec81ce4
 
df38d03
ec81ce4
df38d03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
base_model:
- mikemayuare/SMILYAPE
library_name: transformers
license: mit
tags:
- Tox21
- SMILES
- APE Tokenizer
- classification
---

# Model Card for Model ID

This model is fine-tuned on the Tox21 (Toxicology in the 21st Century) dataset and is designed to classify chemical compounds based on their toxicity. The input to the model is in the SMILES (Simplified Molecular Input Line Entry System) molecular representation format. The model uses the APE (Atom Pair Encoding) tokenizer for tokenizing the input, with the vocabulary stored in the same repository as the model under the file name `tokenizer.json`. The model is intended for sequence classification tasks and should be loaded with the `AutoModelForSequenceClassification` class.

## Model Details

### Model Description

This is a 🤗 transformers model fine-tuned on the Tox21 dataset. It classifies chemical compounds based on their toxicity profiles. The model takes SMILES molecular representations as input and uses the APE Tokenizer for tokenization. The tokenizer’s vocabulary is stored in `tokenizer.json`, which is located in the same repository as the model.

- **Developed by:** Miguelangel Leon
- **Funded by:** This work was supported by national funds through FCT (Fundação para a Ciência e a Tecnologia), under the project - UIDB/04152/2020 (DOI:10.54499/UIDB/04152/2020) - Centro de Investigação em Gestão de Informação (MagIC)/NOVA IMS).
- **Model type:** Sequence Classification
- **Language(s) (NLP):** Not applicable (SMILES molecular representation)
- **License:** MIT
- **Finetuned from model:** mikemayuare/SMILYAPE

### Model Sources

- **Paper :** Pending

## Uses

### Direct Use

This model can be used directly for binary or multi-label classification of chemical compounds to predict their toxicity. The inputs must be formatted as SMILES strings.

### Downstream Use

This model can be further fine-tuned for other chemical classification tasks, particularly those that use molecular representations in SMILES format.

### Out-of-Scope Use

This model is not designed for tasks outside of chemical compound classification or tasks unrelated to molecular data (e.g., NLP).

## Bias, Risks, and Limitations

As this model is fine-tuned on the Tox21 dataset, it may not generalize well to compounds outside the dataset’s chemical space. Additionally, it is not suited for use in applications outside of chemical compound classification tasks.

### Recommendations

Users should be cautious when applying this model to new chemical datasets that differ significantly from the Tox21 dataset. Thorough evaluation on the target dataset is recommended before deployment.

## How to Get Started with the Model

To use the model for classification, it must be loaded with the `AutoModelForSequenceClassification` class from 🤗 transformers. The APE tokenizer is required to process the input data, which should be formatted as SMILES.

You can load the APE tokenizer and the model with the following steps:

```python
# Install the APETokenizer from the repository
# !git clone https://github.com/mikemayuare/apetokenizer
# Load the tokenizer
from src.apetokenizer.ape_tokenizer import APETokenizer

tokenizer = APETokenizer()
tokenizer.load_vocabulary("tokenizer.json")

# Load the model
from transformers import AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained("mikemayuare/SMILY-APE-Tox21")