lamm-mit / SilkomePretrainedGPT

huggingface.co
Total runs: 5
24-hour runs: 0
7-day runs: -2
30-day runs: 1
Model's Last Updated: December 04 2023
text-generation

Introduction of SilkomePretrainedGPT

Model Details of SilkomePretrainedGPT

SilkomeGPT: Generative strategies for modeling, design and analysis of spider silk protein sequences for enhanced mechanical properties

Generative strategies for modeling, design and analysis of silk protein sequences for enhanced mechanical properties

Wei Lu, David L. Kaplan, Markus J. Buehler

Massachusetts Institute of Technology, 77 Massachusetts Ave., Cambridge, MA 02139, USA

Contact email: [email protected]

Abstract: Spider silks are remarkable materials characterized by superb mechanical properties such as strength, extensibility and lightweightedness. Yet, to date, limited models are available to fully explore sequence-property relationships for analysis and design. Here a custom generative large-language model is proposed to enable design of novel spider silk protein sequences to meet complex combinations of target mechanical properties. The model, pretrained on a large set of protein sequences, is fine-tuned on ~1,000 major ampullate spidroin (MaSp) sequences for which associated fiber-level mechanical properties exist, to yield an end-to-end forward and inverse generative approach that is aplied in a multi-agent strategy. Performance is assessed through: (1) a novelty analysis and protein type classification for generated spidroin sequences through Basic Local Alignment Search Tool (BLAST) searches, (2) property evaluation and comparison with similar sequences, (3) comparison of molecular structures, as well as, and (4) a detailed sequence motif analyses. This work generates silk sequences with property combinations that do not exist in nature, and develops a deep understanding of the mechanistic roles of sequence patterns in achieving overarching key mechanical properties (elastic modulus, strength, toughness, failure strain). The model provides an efficient approach to expand the silkome dataset, facilitating further sequence-structure analyses of silks, and establishes a foundation for synthetic silk design and optimization. This work not only shows the capacity of generative transformer models to design complex materials, but also illustrates an effective use of agentic modeling for self-improving design solutions.

Keywords: biomaterials; deep learning; generative autoregressive transformer; hierarchical; multiscale modeling; spider silk; spidroin

Pretrained model

This model is a pretrained autoregressive transformer model in GPT-style, trained on a large number of silk and other protein sequences. The pretraining task is defined as "Sequence<...>" where ... is an amino acid sequence.

Load pretrained model:

from transformers import AutoModelForCausalLM, AutoTokenizer

pretrained_model_name='lamm-mit/SilkomePretrainedGPT'

tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token

model_name = pretrained_model_name
 
model = AutoModelForCausalLM.from_pretrained(
    model_name, 
    trust_remote_code=True
).to(device)

model.config.use_cache = False

Sample inference using the "Sequence<...>" task, where here, the model will simply autocomplete the sequence starting with "AIIAA":

prompt = "Sequence<AIIAA"
generated = torch.tensor(tokenizer.encode(prompt, add_special_tokens = False)) .unsqueeze(0).to(device)
print(generated.shape, generated)

sample_outputs = model.generate(
                                inputs=generated, 
                                eos_token_id =tokenizer.eos_token_id,
                                do_sample=True,   
                                top_k=500, 
                                max_length = 300,
                                top_p=0.9, 
                                num_return_sequences=3,
                                temperature=1,
                                ).to(device)

for i, sample_output in enumerate(sample_outputs):
      print("{}: {}\n\n".format(i, tokenizer.decode(sample_output, skip_special_tokens=True)))

Output (here, three candidate sequences):

torch.Size([1, 4]) tensor([[303,  32, 853, 261]], device='cuda:0')
0: Sequence<AIIAAGGDHGAPFNIALESLINQSGRIWDDGISKETVEDLEDLKSLRLQDPTAEQALICSILSSLQLDDTRQAELISQGCEQIIQGNNNLTQQIEQFCCPIDLCGSTLWSNAGISTQWPIYDQLQIIWEQKTEVGCRFVIDSKQLVYQVEFATPVLTLPNLRGFTRLEYLNDYRNSYIYVGGDSMGFPFDGIVNDTCAAGTLAT>
1: Sequence<AIIAASHEQVSRLLGDLIYKVNWGTATDSNTTVDSGSKYDADYAYVLKPDNIATIHTNIIDKWKADVDVTEENVDKFSGKPIYNSFHADGGIDLVGLTVEERMAHVHHRITLKPVYQYAGIEECMFNIDKARVLHIPEGYRKVYDRATAIHTAILDDPDYAEFMAYKMNKTDLVKPVELIEVTKLDKKGMWNGHHGGVVMLGGRGIHHASNGYGVETIEYFRNDNWSEEYHYDRVNLIHGMGGRGMKEAALEEIAKAINNLDYTSMIHDAEDYKILPSGESKDIVGETKLNGAMVGRAYLKLMKINMEELDVYMKPGSHHHHHH>
2: Sequence<AIIAATKHRTRAKQLVEKLNEVSKTKKDLVLVGISASGQHRQIDTTSRRPSSAKKRVVLYGVLEKQFLHDARTYHPTNSRGITGELLLVEDLIHDRRLDNVAYVIQSKKGLIHQRRVTHGHVLVNRTHHVKVKAGSSDIVDFDKVIRVAEETAKESDVLIVLEADDPEALIYLGVKADIDIDVRTLTNEVGDGTTVHIIDLGADGILLPTKEDLKLPANVNKAVIDIKAKNIP>
Citation

To cite this work:

@article{WeiKaplanBuehler_2023,
    title   = {Generative Modeling, Design, and Analysis of Spider Silk Protein Sequences for Enhanced Mechanical Properties},
    author  = {W. Lu, D. L., Kaplan, M.J. Buehler},
    journal = {Adv. Funct. Mater.},
    year    = {2023},
    volume  = {},
    pages   = {},
    url     = {https://doi.org/10.1002/adfm.202311324}
}

Runs of lamm-mit SilkomePretrainedGPT on huggingface.co

5
Total runs
0
24-hour runs
0
3-day runs
-2
7-day runs
1
30-day runs

More Information About SilkomePretrainedGPT huggingface.co Model

More SilkomePretrainedGPT license Visit here:

https://choosealicense.com/licenses/apache-2.0

SilkomePretrainedGPT huggingface.co

SilkomePretrainedGPT huggingface.co is an AI model on huggingface.co that provides SilkomePretrainedGPT's model effect (), which can be used instantly with this lamm-mit SilkomePretrainedGPT model. huggingface.co supports a free trial of the SilkomePretrainedGPT model, and also provides paid use of the SilkomePretrainedGPT. Support call SilkomePretrainedGPT model through api, including Node.js, Python, http.

SilkomePretrainedGPT huggingface.co Url

https://huggingface.co/lamm-mit/SilkomePretrainedGPT

lamm-mit SilkomePretrainedGPT online free

SilkomePretrainedGPT huggingface.co is an online trial and call api platform, which integrates SilkomePretrainedGPT's modeling effects, including api services, and provides a free online trial of SilkomePretrainedGPT, you can try SilkomePretrainedGPT online for free by clicking the link below.

lamm-mit SilkomePretrainedGPT online free url in huggingface.co:

https://huggingface.co/lamm-mit/SilkomePretrainedGPT

SilkomePretrainedGPT install

SilkomePretrainedGPT is an open source model from GitHub that offers a free installation service, and any user can find SilkomePretrainedGPT on GitHub to install. At the same time, huggingface.co provides the effect of SilkomePretrainedGPT install, users can directly use SilkomePretrainedGPT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

SilkomePretrainedGPT install url in huggingface.co:

https://huggingface.co/lamm-mit/SilkomePretrainedGPT

Url of SilkomePretrainedGPT

SilkomePretrainedGPT huggingface.co Url

Provider of SilkomePretrainedGPT huggingface.co

lamm-mit
ORGANIZATIONS

Other API from lamm-mit

huggingface.co

Total runs: 854
Run Growth: 289
Growth Rate: 33.84%
Updated:December 04 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 31 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 11 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024