Downloads · 30 days
82
0% of all-time downloads
gayane/BARTSmiles
BARTSmiles is a feature extraction model from gayane. Use it when you need embeddings to search or compare text. It is set up for transformers.
The repository is adapted based on: https://huggingface.co/chenxran/bart-smiles/tree/main
Downloads · 30 days
82
0% of all-time downloads
All-time downloads
18.7K
Public
Repo size
2.8 GB
Likes
5
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
The repository is adapted based on: https://huggingface.co/chenxran/bart-smiles/tree/main
from transformers import AutoTokenizer, AutoModel, SequenceFeatureExtractor
import torch
from transformers import AutoTokenizer, AutoModel
smiles = "CCC(=O)"
tokenizer = AutoTokenizer.from_pretrained("./BARTSmiles/", add_prefix_space=True)
inputs = tokenizer(smiles, return_tensors="pt", return_token_type_ids=False, add_special_tokens=True)
model = AutoModel.from_pretrained('./BARTSmiles')
model.eval()
# Use a pipeline as a high-level helper
from transformers import pipeline
extractor = pipeline("feature-extraction", model=model, tokenizer=tokenizer)
result = extractor(smiles, return_tensors=True, tokenize_kwargs={'return_token_type_ids':False})
@article{chilingaryan2022bartsmiles, title={Bartsmiles: Generative masked language models for molecular representations}, author={Chilingaryan, Gayane and Tamoyan, Hovhannes and Tevosyan, Ani and Babayan, Nelly and Khondkaryan, Lusine and Hambardzumyan, Karen and Navoyan, Zaven and Khachatrian, Hrant and Aghajanyan, Armen}, journal={arXiv preprint arXiv:2211.16349}, year={2022} }