Downloads · 30 days
15
39% of all-time downloads
biomap-research/ProteinSage
ProteinSage is a machine learning model from biomap-research. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-4.0.
ProteinSage-650M is a protein language model checkpoint for extracting sequence representations from protein sequences.
Downloads · 30 days
15
39% of all-time downloads
All-time downloads
38
Public
Repo size
1.3 GB
Likes
2
Public
Click a slice to open those files.
.bin1.3 GB · 100%
From the Hugging Face model README
ProteinSage-650M is a protein language model checkpoint for extracting sequence representations from protein sequences.
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "ProteinSage650"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
).eval()
seq = "MILMCQHFSGQFSKYFLAVSSDFCHFVFPIILVSHVNFKQMKRKGFALWNDRAVPFTQGIFTTVMILLQYLHGTGM"
inputs = tokenizer(seq, add_special_tokens=True, return_tensors="pt")
with torch.inference_mode():
outputs = model(**inputs, output_hidden_states=True, output_attentions=True, return_dict=True)
hidden_states = outputs.hidden_states
attentions = outputs.attentions
Use trust_remote_code=True because this checkpoint includes custom ProteinSage model and tokenizer code.
transformers and PyTorch in the proteinsage environment.output_layer.weight may be newly initialized, so masked language modeling predictions may require downstream training or a matching head checkpoint.CC BY-NC 4.0.