Downloads · 30 days
12
3% of all-time downloads
mikemayuare/SELFY-APE-tox21
SELFY-APE-tox21 is a text classification model from mikemayuare. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model is fine-tuned on the Tox21 dataset and is designed to classify chemical compounds using SELFIES (Self-referencing Embedded Strings) as input representations. It employs the APE (Atom Pair Encoding) tokenize…
Downloads · 30 days
12
3% of all-time downloads
All-time downloads
397
Public
Parameters
34.7M
278 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors139 MB · 100%
From the Hugging Face model README
This model is fine-tuned on the Tox21 dataset and is designed to classify chemical compounds using SELFIES (Self-referencing Embedded Strings) as input representations. It employs 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.
This is a 🤗 transformers model fine-tuned on the Tox21 dataset for classifying chemical compounds. It uses the SELFIES molecular representation format as input and tokenizes these inputs using the APE Tokenizer. The vocabulary for the APE tokenizer is stored in the file tokenizer.json, located in the same repository as the model.
This model can be used directly for classification tasks on chemical compounds. It is specifically designed for toxicity prediction tasks, and the inputs must be formatted as SELFIES.
This model can be fine-tuned further for other chemical classification tasks if the downstream dataset also uses SELFIES representations.
This model is not suited for tasks that do not involve molecular data or tasks that require natural language processing (NLP).
As this model has been trained on the Tox21 dataset, it may not generalize well to unseen chemical compounds that differ significantly from the training data. Moreover, since this model is designed for molecular data, it is not appropriate for use in non-chemical classification tasks.
Users should be aware of potential biases stemming from the training data (Tox21). Careful evaluation on the target chemical compounds is recommended to ensure the model's suitability for a given application.
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 SELFIES.
You can load the APE tokenizer and the model with the following steps:
# 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/SELFY-APE-tox21")