Instructions to use multimolecule/proteinbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MultiMolecule
How to use multimolecule/proteinbert with MultiMolecule:
pip install multimolecule
from multimolecule import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("multimolecule/proteinbert") model = AutoModel.from_pretrained("multimolecule/proteinbert") inputs = tokenizer("MANLGCWMLVLFVATWSDLGLCKKRPKPGGWNTGGSRYPGQGSPGGNRYPPQGGGGWGQPHGGGWGQPHGGGWGQPHGGGWGQPHGGGWGQGGGTHSQWNKPSKPKTNMKHMAGAAAAGAVVGGLGGYMLGSAMSRPIIHFGSDYEDRYYRENMHRYPNQVYYRPMDEYSNQNNFVHDCVNITIKQHTVTTTTKGENFTETDVKMMERVVEQMCITQYERESQAYYQRGSSMVLFSSPPVILLISFLIFLIVG", return_tensors="pt") outputs = model(**inputs) embeddings = outputs.last_hidden_stateimport multimolecule from transformers import pipeline predictor = pipeline("fill-mask", model="multimolecule/proteinbert") output = predictor("MANLGCWMLVLFV<mask>TWSDLGLCKKRPKPGGWNTGGSRYPGQGSPGGNRYPPQGGGGWGQPHGGGWGQPHGGGWGQPHGGGWGQPHGGGWGQGGGTHSQWNKPSKPKTNMKHMAGAAAAGAVVGGLGGYMLGSAMSRPIIHFGSDYEDRYYRENMHRYPNQVYYRPMDEYSNQNNFVHDCVNITIKQHTVTTTTKGENFTETDVKMMERVVEQMCITQYERESQAYYQRGSSMVLFSSPPVILLISFLIFLIVG") - Notebooks
- Google Colab
- Kaggle
File size: 951 Bytes
d462d5c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | {
"annotation_size": 8943,
"architectures": [
"ProteinBertForPreTraining"
],
"attention_key_size": 64,
"bos_token_id": 1,
"conv_kernel_size": 9,
"dtype": "float32",
"eos_token_id": 2,
"global_hidden_size": 512,
"head": null,
"hidden_act": "gelu",
"hidden_size": 128,
"id2label": null,
"initializer_range": 0.02,
"label2id": null,
"layer_norm_eps": 0.001,
"lm_head": {
"act": null,
"bias": true,
"dropout": 0.0,
"hidden_size": null,
"layer_norm_eps": 1e-12,
"loss_weight": null,
"num_labels": 37,
"output_name": null,
"transform": null,
"transform_act": null
},
"mask_token_id": 4,
"model_type": "proteinbert",
"null_token_id": 5,
"num_attention_heads": 4,
"num_hidden_layers": 6,
"num_labels": 1,
"pad_token_id": 0,
"tie_word_embeddings": false,
"transformers_version": "5.9.0",
"unk_token_id": 3,
"vocab_size": 37,
"wide_conv_dilation_rate": 5
}
|