Downloads · 30 days
11
26% of all-time downloads
genbio-ai/GB.Protein-16B-peptide_HLA_MHC_affinity
GB.Protein-16B-peptide_HLA_MHC_affinity is a machine learning model from genbio-ai. 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 other.
LoRA fine-tuned checkpoint for peptideHLAMHCaffinity prediction.
Downloads · 30 days
11
26% of all-time downloads
All-time downloads
42
Public
Repo size
528 MB
Likes
0
Public
Click a slice to open those files.
.ckpt176 MB · 100%
From the Hugging Face model README
LoRA fine-tuned checkpoint for peptide_HLA_MHC_affinity prediction.
from huggingface_hub import snapshot_download
from pathlib import Path
model_name = "genbio-ai/GB.Protein-16B-peptide_HLA_MHC_affinity"
genbio_models_path = Path.home().joinpath('genbio_models', model_name)
genbio_models_path.mkdir(parents=True, exist_ok=True)
snapshot_download(repo_id=model_name, local_dir=genbio_models_path)
import torch
from modelgenerator.tasks import SequenceClassification
ckpt_path = genbio_models_path.joinpath('model.ckpt')
model = SequenceClassification.load_from_checkpoint(ckpt_path, strict_loading=False).eval()
collated_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
logits = model(collated_batch)
print(logits)
print(torch.argmax(logits, dim=-1))