Loading…
Loading…
This is a RoBERTa model trained from scratch for antibody humanization of Variable Heavy (VH) chain sequences using Masked Language Modeling (MLM).
This model was trained on approximately 141 million human antibody variable heavy chain (VH) sequences for humanization tasks. It achieves an accuracy of 91.46% and can be applied to antibody sequence analysis, humanization, and the study of VH chain patterns.
from transformers import RobertaTokenizer, RobertaForMaskedLM
# Load tokenizer and model from Hugging Face
tokenizer = RobertaTokenizer.from_pretrained("hemantn/roberta-base-humAb-vh")
model = RobertaForMaskedLM.from_pretrained("hemantn/roberta-base-humAb-vh")
For easier antibody humanization, you can use the AnthroAb Python package which provides a high-level interface for antibody humanization tasks. This package is available on PyPI and includes both VH and VL chain models.
conda create -n anthroab python=3.10
conda activate anthroab
pip install anthroab
import anthroab
# Humanize a heavy chain sequence (VH)
vh_sequence= "**QLV*SGVEVKKPGASVKVSCKASGYTFTNYYMYWVRQAPGQGLEWMGGINPSNGGTNFNEKFKNRVTLTTDSSTTTAYMELKSLQFDDTAVYYCARRDYRFDMGFDYWGQGTTVTVSS"
humanized_vh = anthroab.predict_masked(vh_sequence, 'H')
print(f"Humanized VH: {humanized_vh}")
# Humanize a light chain sequence (VL)
vl_sequence = "DIQMTQSPSSLSASV*DRVTITCRASQSISSYLNWYQQKPGKAPKLLIYSASTLASGVPSRFSGSGSGTDF*LTISSLQPEDFATYYCQQSYSTPRTFGQGTKVEIK"
humanized_vl = anthroab.predict_masked(vl_sequence, 'L')
print(f"Humanized VL: {humanized_vl}")
pip install anthroabThe AnthroAb package uses this RoBERTa model (hemantn/roberta-base-humAb-vh) for VH chain humanization along with a companion VL model for light chain processing.
FacebookAI/roberta-base