SMILES-based Transformer Encoder-Decoder (SMI-TED)
Project description
SMILES-based Transformer Encoder-Decoder (SMI-TED)
This repository is a fork of the original source code and adapted for usage with HuggingFace AutoModel.
Forked GitHub: GitHub Link
Forked HuggingFace: HuggingFace Link
The original repository provides PyTorch source code associated with the publication, "A Large Encoder-Decoder Family of Foundation Models for Chemical Language".
Paper: Arxiv Link
Original GitHub: GitHub Link
Original HuggingFace: HuggingFace Link
For more information contact: eduardo.soares@ibm.com or evital@br.ibm.com.
Usage
import torch
import smi_ted
from transformers import AutoConfig, AutoModel, AutoTokenizer
config = AutoConfig.from_pretrained("bisectgroup/materials-smi-ted-fork")
tokenizer = AutoTokenizer.from_pretrained("bisectgroup/materials-smi-ted-fork")
model = AutoModel.from_pretrained("bisectgroup/materials-smi-ted-fork")
model.smi_ted.tokenizer = tokenizer
model.smi_ted.set_padding_idx_from_tokenizer()
smiles = ['CC1C2CCC(C2)C1CN(CCO)C(=O)c1ccc(Cl)cc1',
'COc1ccc(-c2cc(=O)c3c(O)c(OC)c(OC)cc3o2)cc1O',
'CCOC(=O)c1ncn2c1CN(C)C(=O)c1cc(F)ccc1-2',
'Clc1ccccc1-c1nc(-c2ccncc2)no1',
'CC(C)(Oc1ccc(Cl)cc1)C(=O)OCc1cccc(CO)n1']
with torch.no_grad():
encoder_outputs = model.encode(smiles)
with torch.no_grad():
decoded_smiles = model.decode(encoder_outputs)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smi_ted-1.0.0.tar.gz.
File metadata
- Download URL: smi_ted-1.0.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88e2005cdc125650073867f1a0dba8367bbb3a377ee08112e518c79b57037fa6
|
|
| MD5 |
0525fa8ea49c66ddf7e4fc0100a49c5e
|
|
| BLAKE2b-256 |
38c84097ee7489251b73075312a1215a84f6de70b32770011a52daf3fa1d6b7c
|
File details
Details for the file smi_ted-1.0.0-py3-none-any.whl.
File metadata
- Download URL: smi_ted-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaa8f7c4561d7bfe5e3eab9fd6ed77b115808545825ebb604900d82202dd50cd
|
|
| MD5 |
963dc5b151e7ffff006b7114fe5952ec
|
|
| BLAKE2b-256 |
e948846dc706f698c2be6f190312947f2065f11c36696e765172f86ece616713
|