Downloads · 30 days
19
2% of all-time downloads
AntibodyGeneration/fine-tuned-progen2-medium
fine-tuned-progen2-medium is a text generation model from AntibodyGeneration. Use it when you need the model to write or continue text. It is set up for transformers.
- Model Name: Antibody Generator - Version: 1.0 - Release Date: 12/15/2023 - Model Developer: Joesph Roberts, David Noble, Rahul Suresh, Neel Patel - Model Type: Protein Generation, based on the ProGen2 architecture.…
Downloads · 30 days
19
2% of all-time downloads
All-time downloads
769
Public
Parameters
793M
3.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
How the weights are stored.
F32765M · 96%
From the Hugging Face model README
The Antibody Generator is a specialized protein generation model developed for creating therapeutic antibodies. It is based on the ProGen2 model, an advanced language model developed by Salesforce. ProGen2, an enhancement of the original ProGen model launched in 2020, is pre-trained on a vast dataset of over 280 million protein sequences. With up to 6.4B parameters, ProGen2 demonstrates state-of-the-art performance in generating novel, viable protein sequences and predicting protein fitness.
Models are labeled as progen2_<size><finetuning_type><prompting_type>
Evaluation Tools:
Performance and analytics:


Instructions on how to use the model, including example prompts and API documentation, are available in the Code Repository.
from models.progen.modeling_progen import ProGenForCausalLM
import torch
from tokenizers import Tokenizer
import json
# Define the model identifier from Hugging Face's model hub
model_path = 'AntibodyGeneration/fine-tuned-progen2-small'
# Load the model and tokenizer
model = ProGenForCausalLM.from_pretrained(model_path)
tokenizer = Tokenizer.from_file('tokenizer.json')
# Define your sequence and other parameters
target_sequence = 'MQIPQAPWPVVWAVLQLGWRPGWFLDSPDRPWNPPTFSPALLVVTEGDNATFTCSFSNTSESFVLNWYRMSPSNQTDKLAAFPEDRSQPGQDCRFRVTQLPNGRDFHMSVVRARRNDSGTYLCGAISLAPKAQIKESLRAELRVTERRAEVPTAHPSPSPRPAGQFQTLVVGVVGGLLGSLVLLVWVLAVICSRAARGTIGARRTGQPLKEDPSAVPVFSVDYGELDFQWREKTPEPPVPCVPEQTEYATIVFPSGMGTSSPARRGSADGPRSAQPLRPEDGHCSWPL'
number_of_sequences = 2
# Tokenize the sequence
tokenized_sequence = tokenizer(target_sequence, return_tensors="pt")
# Move model and tensors to CUDA if available
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
model = model.to(device)
tokenized_sequence = tokenized_sequence.to(device)
# Generate sequences
with torch.no_grad():
output = model.generate(**tokenized_sequence, max_length=1024, pad_token_id=tokenizer.pad_token_id, do_sample=True, top_p=0.9, temperature=0.8, num_return_sequences=number_of_sequences)
# Decoding the output to get generated sequences
generated_sequences = [tokenizer.decode(output_seq, skip_special_tokens=True) for output_seq in output]
For questions or feedback regarding this model, please contact [XYZ].