Downloads · 30 days
19
6% of all-time downloads
wudejian789/MolMetaLM-base-1B
MolMetaLM-base-1B is a text generation model from wudejian789. Use it when you need the model to write or continue text.
Using 1B+ smiles (PubChem+ZINC+ChEMBL) for pretraining.
Downloads · 30 days
19
6% of all-time downloads
All-time downloads
314
Public
Parameters
100M
201 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors201 MB · 100%
From the Hugging Face model README
Using 1B+ smiles (PubChem+ZINC+ChEMBL) for pretraining.
refer to https://github.com/CSUBioGroup/MolMetaLM for more details.
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained('wudejian789/MolMetaLM-base-1B')
model = AutoModel.from_pretrained('wudejian789/MolMetaLM-base-1B')
smi = "COc1cc2c(cc1OC)CC([NH3+])C2"
tokenized_smi = tokenizer(" ".join(list(smi)), return_token_type_ids=False,
return_tensors='pt', max_length=512, padding='longest', truncation=True)
emb_smi = model(**tokenized_smi).last_hidden_state
print(emb_smi.shape) # batch size, seq length, embedding size