Downloads · 30 days
17
0% of all-time downloads
wudejian789/MolMetaLM-base
MolMetaLM-base is a text generation model from wudejian789. Use it when you need the model to write or continue text.
refer to https://github.com/CSUBioGroup/MolMetaLM for more details.
Downloads · 30 days
17
0% of all-time downloads
All-time downloads
8.2K
Public
Parameters
100M
402 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors402 MB · 100%
From the Hugging Face model README
refer to https://github.com/CSUBioGroup/MolMetaLM for more details.
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained('wudejian789/MolMetaLM-base')
model = AutoModel.from_pretrained('wudejian789/MolMetaLM-base')
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