Peptriever: A Bi-Encoder for large-scale protein-peptide binding search

For training details see our Application Note.

Training code can be found in our Github repo.

A live demo is available on our application page

Usage

import torch
from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("ronig/protein_biencoder")
model = AutoModel.from_pretrained("ronig/protein_biencoder", trust_remote_code=True)
model.eval()

peptide_sequence = "AAA"
protein_sequence = "MMM"
encoded_peptide = tokenizer.encode_plus(peptide_sequence, return_tensors='pt')
encoded_protein = tokenizer.encode_plus(protein_sequence, return_tensors='pt')

with torch.no_grad():
    peptide_output = model.forward1(encoded_peptide)
    protein_output = model.forward2(encoded_protein)

print("distance: ", torch.norm(peptide_output - protein_output, p=2))

Version

Model checkpint: peptriever_2023-06-23T16:07:24.508460

Downloads last month
173
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The HF Inference API does not support model that require custom code execution.

Dataset used to train ronig/protein_biencoder

Space using ronig/protein_biencoder 1