Run this model with HF Jobs
Run ronig/protein_biencoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ronig/protein_biencoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ronig/protein_biencoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ronig/protein_biencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ronig/protein_biencoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ronig/protein_biencoder", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("ronig/protein_biencoder", trust_remote_code=True) model = AutoModel.from_pretrained("ronig/protein_biencoder", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
updating model peptriever_2023-06-23T16:07:24.508460
Browse files123456789101112131415161718192021222324252627---language: enlicense: mitdatasets:- ronig/protein_binding_sequences---# Protein BiEncoder Bert Model
Usage```pythontokenizer = AutoTokenizer.from_pretrained("ronig/protein_biencoder")model = BiEncoder.from_pretrained("ronig/protein_biencoder")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))```
Model checkpint: `peptriever_2023-06-23T16:07:24.508460`README.mdAdded+27