Instructions to use unikei/bert-base-proteins with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unikei/bert-base-proteins with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="unikei/bert-base-proteins")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("unikei/bert-base-proteins") model = AutoModelForMaskedLM.from_pretrained("unikei/bert-base-proteins") - Notebooks
- Google Colab
- Kaggle
BERT base for proteins
This is bidirectional transformer pretrained on amino-acid sequences of human proteins.
Example: Insulin (P01308)
MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN
The model was trained using the masked-language-modeling objective.
Intended uses
This model is primarily aimed at being fine-tuned on the following tasks:
- protein function
- molecule-to-gene-expression mapping
- cell targeting
How to use in your code
from transformers import BertTokenizerFast, BertModel
checkpoint = 'unikei/bert-base-proteins'
tokenizer = BertTokenizerFast.from_pretrained(checkpoint)
model = BertModel.from_pretrained(checkpoint)
example = 'MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN'
tokens = tokenizer(example, return_tensors='pt')
predictions = model(**tokens)
- Downloads last month
- 23