BALM
1.0.0
พื้นที่เก็บข้อมูลนี้มีรหัสการอนุมานสำหรับ การทำนายฟังก์ชันและโครงสร้างแอนติบอดีที่แม่นยำโดยใช้แบบจำลองภาษาแอนติบอดีที่ได้รับแรงบันดาลใจจากไบโอ 
conda env create -f environment.yml
conda activate BALM
น้ำหนักของบาล์มที่ผ่านการฝึกอบรมมาก่อนสามารถดาวน์โหลดได้จากลิงค์ Google Drive: Pretrained-Balm
from modeling_balm import BALMForMaskedLM
from ba_position_embedding import get_anarci_pos
from transformers import EsmTokenizer
import torch
# an antibody sequence example
input_seq = "AVQLQESGGGLVQAGGSLRLSCTVSARTSSSHDMGWFRQAPGKEREFVAAISWSGGTTNYVDSVKGRFDISKDNAKNAVYLQMNSLKPEDTAVYYCAAKWRPLRYSDNPSNSDYNYWGQGTQVTVSS"
tokenizer = EsmTokenizer.from_pretrained("./tokenizer/vocab.txt", do_lower_case=False, model_max_length=168)
tokenizer_input = tokenizer(input_seq, truncation=True, padding="max_length", return_tensors="pt")
# generate position_ids
tokenizer_input.update(get_anarci_pos(input_seq))
with torch.no_grad():
# please download from Google drive link before
model = BALMForMaskedLM.from_pretrained("./pretrained-BALM/")
# on CPU device
outputs = model(**tokenizer_input, return_dict=True, output_hidden_states=True, output_attentions=True)
# final hidden layer representation [batch_sz * max_length * hidden_size]
final_hidden_layer = outputs.hidden_states[-1]
# final hidden layer sequence representation [batch_sz * hidden_size]
final_seq_embedding = final_hidden_layer[:, 0, :]
# final layer attention map [batch_sz * num_head * max_length * max_length]
final_attention_map = outputs.attentions[-1]
Balmfold ขึ้นอยู่กับบาล์มเพื่อทำนายโครงสร้างระดับอุดมศึกษาของแอนติบอดีที่มีลำดับหลัก เซิร์ฟเวอร์ออนไลน์สามารถใช้ได้อย่างอิสระที่ Balmfold Server แค่ลอง -
หากคุณพบว่าโมเดลของเรามีประโยชน์สำหรับคุณโปรดอ้างอิงเป็น:
@article{jing2024accurate,
title={Accurate prediction of antibody function and structure using bio-inspired antibody language model},
author={Jing, Hongtai and Gao, Zhengtao and Xu, Sheng and Shen, Tao and Peng, Zhangzhi and He, Shwai and You, Tao and Ye, Shuang and Lin, Wei and Sun, Siqi},
journal={Briefings in Bioinformatics},
volume={25},
number={4},
pages={bbae245},
year={2024},
publisher={Oxford University Press}
}
สถาปัตยกรรมและกระบวนการฝึกอบรมล่วงหน้าของ BALM สร้างขึ้นบน ESM และกอดกรอบการสร้างแบบจำลองใบหน้า เราซาบซึ้งในการทำงานของ ESM และ Hugging Face Team
ซอร์สโค้ดนี้ได้รับใบอนุญาตภายใต้ใบอนุญาต MIT ที่พบในไฟล์ LICENSE ในไดเรกทอรีรูทของแผนผังต้นทางนี้