We collect protein sequences and their PTM annotations from Uniprot-Swissprot. The PTM annotations are represented as tokens and used to replace the corresponding amino acids. The data can be downloaded from
here
. Please place the data in
protein_lm/dataset/
.
Configs
The training and testing configs are in
protein_lm/configs
. We provide a basic training config at
protein_lm/configs/train/base.yaml
.
report_to='wandb'
tracks the training using wandb.
training_arguments.per_device_train_batch_size=300
sets the max batch size per device when constructing a batch.
training_arguments.max_tokens_per_batch=80000
sets the max num of tokens within a batch. If a batch exceeds the max token limit(depending on the seq len), we will trim the batch. Tune the
per_device_train_batch_size
and
max_tokens_per_batch
togather to maximize the memory usage during training. The rule of thumb is setting a large batch size (e.g., 300) while searching for the max num token that fits your GPU memory.
training_arguments.use_esm=True
uses the ESM embedding. By default, we use ESM 650M, and set the
model.esm_embed_dim: 1280
in
base.yaml
. If disabled, the model will use its own embeddings.
training_arguments.save_dir='ckpt/bi_directional_mamba-esm'
where the model ckpts will be saved.
training_arguments.sample_len_ascending=true
is enable by default, samples sequences from short to long during the training.
Multi-GPU training with Deepspeed
Setup deepspeed with
accelerate config
and answer the questions asked. It will ask whether you want to use a config file for DeepSpeed to which you should answer no. Then answer the following questions to generate a basic DeepSpeed config. Use ZeRo 2 and FP32, which are sufficient for training our ~300M model without introducing overhead. This will generate a config file that will be used automatically to properly set the default options when launching training.
Inference
The inference example is at
protein_lm/modeling/scripts/infer.py.
The model checkpoints can be downloaded from
here
. The outputs are:
@article {Peng2024.02.28.581983,
author = {Zhangzhi Peng and Benjamin Schussheim and Pranam Chatterjee},
title = {PTM-Mamba: A PTM-Aware Protein Language Model with Bidirectional Gated Mamba Blocks},
elocation-id = {2024.02.28.581983},
year = {2024},
doi = {10.1101/2024.02.28.581983},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2024/02/29/2024.02.28.581983},
eprint = {https://www.biorxiv.org/content/early/2024/02/29/2024.02.28.581983.full.pdf},
journal = {bioRxiv}
}
Runs of ChatterjeeLab PTM-Mamba on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About PTM-Mamba huggingface.co Model
PTM-Mamba huggingface.co is an AI model on huggingface.co that provides PTM-Mamba's model effect (), which can be used instantly with this ChatterjeeLab PTM-Mamba model. huggingface.co supports a free trial of the PTM-Mamba model, and also provides paid use of the PTM-Mamba. Support call PTM-Mamba model through api, including Node.js, Python, http.
PTM-Mamba huggingface.co is an online trial and call api platform, which integrates PTM-Mamba's modeling effects, including api services, and provides a free online trial of PTM-Mamba, you can try PTM-Mamba online for free by clicking the link below.
ChatterjeeLab PTM-Mamba online free url in huggingface.co:
PTM-Mamba is an open source model from GitHub that offers a free installation service, and any user can find PTM-Mamba on GitHub to install. At the same time, huggingface.co provides the effect of PTM-Mamba install, users can directly use PTM-Mamba installed effect in huggingface.co for debugging and trial. It also supports api for free installation.