PepDoRA: A Modified Peptide-Specific Language Model via Weight-Decomposed Low-Rank Adaptation
In this work, we introduce
PepDoRA
, a SMILES transformer that fine-tunes the state-of-the-art
ChemBERTa-77M-MLM
transformer on modified peptide SMILES via
DoRA
, a novel PEFT method that incorporates weight decomposition. These representations can be leveraged for numerous downstream tasks, including membrane permeability prediction and target binding assessment, for both unmodified and modified peptide sequences.
Here's how to extract PepDoRA embeddings for your input peptide:
import torch
from transformers import AutoModel, AutoTokenizer
# Load the model and tokenizer
model_name = "ChatterjeeLab/PepDoRA"
model = AutoModel.from_pretrained(model_name, output_hidden_states=True)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Input peptide sequence
peptide = "CC(C)C[C@H]1NC(=O)[C@@H](C)NCCCCCCNC(=O)[C@H](CO)NC1=O"
# Tokenize the peptide
inputs = tokenizer(peptide, return_tensors="pt")
# Get the hidden states (embeddings) from the model
with torch.no_grad():
outputs = model(**inputs)
# Extract the embeddings from the last hidden layer
last_hidden_state = outputs.hidden_states[-1]
# Print the embedding shape (or the embedding itself)
print(last_hidden_state.shape)
PepDoRA huggingface.co is an AI model on huggingface.co that provides PepDoRA's model effect (), which can be used instantly with this ChatterjeeLab PepDoRA model. huggingface.co supports a free trial of the PepDoRA model, and also provides paid use of the PepDoRA. Support call PepDoRA model through api, including Node.js, Python, http.
PepDoRA huggingface.co is an online trial and call api platform, which integrates PepDoRA's modeling effects, including api services, and provides a free online trial of PepDoRA, you can try PepDoRA online for free by clicking the link below.
ChatterjeeLab PepDoRA online free url in huggingface.co:
PepDoRA is an open source model from GitHub that offers a free installation service, and any user can find PepDoRA on GitHub to install. At the same time, huggingface.co provides the effect of PepDoRA install, users can directly use PepDoRA installed effect in huggingface.co for debugging and trial. It also supports api for free installation.