DPLM-2 650M
DPLM-2 is a multimodal diffusion protein language model for jointly modeling,
understanding, and generating protein sequences and structures. It extends the
discrete diffusion protein language model family from sequence-only protein
language modeling to sequence-structure modeling, enabling protein
sequence-structure co-generation and conditional generation tasks such as
folding, inverse folding, and motif scaffolding.
This repository contains the 650M-parameter DPLM-2 checkpoint. For the official
implementation, installation instructions, generation scripts, training
configuration, and evaluation utilities, see the
bytedance/dplm repository.
Model Details
- Model type: Multimodal discrete diffusion protein language model
- Checkpoint:
airkingbd/dplm2_650m
- Architecture: ESM-style transformer for DPLM-2 (
EsmForDPLM2)
- Scale: 650M parameters, 33 transformer layers, hidden size 1280, 20
attention heads
- Vocabulary: 8,229 tokens, covering amino-acid tokens, structure tokens,
and special tokens
- Base initialization: DPLM-2 training is initialized from a pretrained DPLM
sequence model to transfer evolutionary knowledge from large-scale sequence
pretraining
- Structure tokenizer: Uses the DPLM structure tokenizer
(
airkingbd/struct_tokenizer) for structure-token based modeling and PDB
reconstruction
- License: Apache-2.0
- Paper: DPLM-2: A Multimodal Diffusion Protein Language Model
Quick Start
Install the official DPLM codebase and dependencies:
1git clone --recursive https://github.com/bytedance/dplm.git
2cd dplm
3
4conda create -n dplm python=3.9 pip
5conda activate dplm
6bash scripts/install.sh
Load the pretrained DPLM-2 checkpoint:
1from byprot.models.dplm2 import MultimodalDiffusionProteinLanguageModel as DPLM2
2
3dplm2 = DPLM2.from_pretrained("airkingbd/dplm2_650m").cuda()
4dplm2 = dplm2.eval()
Sequence-Structure Co-Generation
The official repository provides generate_dplm2.py for co-generation. The
default DPLM-2 sampling strategy is annealing@2.0:0.1, which starts with high
sampling temperature for diversity and anneals to a lower temperature for
designability.
1model_name=dplm2_650m
2sampling_strategy=annealing@2.0:0.1
3output_dir=generation-results/${model_name}
4
5python generate_dplm2.py \
6 --model_name airkingbd/${model_name} \
7 --task co_generation \
8 --sampling_strategy ${sampling_strategy} \
9 --num_seqs 50 \
10 --max_iter 500 \
11 --seq_lens 100 200 300 400 500 \
12 --saveto ${output_dir}
Generated sequences and structures are saved under
generation-results/dplm2_650m/co_generation. The official repository also
includes evaluation utilities for TM-score, RMSD, diversity, and related
structure metrics.
Forward Folding
DPLM-2 can generate structures conditioned on input amino-acid sequences. The
official scripts use deterministic argmax decoding for 100 diffusion iterations:
1model_name=dplm2_650m
2output_dir=generation-results/${model_name}
3
4python generate_dplm2.py \
5 --model_name airkingbd/${model_name} \
6 --task folding \
7 --input_fasta_path data-bin/cameo2022/aatype.fasta \
8 --max_iter 100 \
9 --unmasking_strategy deterministic \
10 --sampling_strategy argmax \
11 --saveto ${output_dir}
For custom sequences, provide a FASTA file via --input_fasta_path.
Inverse Folding
DPLM-2 can predict amino-acid sequences conditioned on tokenized protein
structures:
1model_name=dplm2_650m
2output_dir=generation-results/${model_name}
3
4python generate_dplm2.py \
5 --model_name airkingbd/${model_name} \
6 --task inverse_folding \
7 --input_fasta_path data-bin/cameo2022/struct.fasta \
8 --max_iter 100 \
9 --unmasking_strategy deterministic \
10 --sampling_strategy argmax \
11 --saveto ${output_dir}
To use a custom structure, first tokenize PDB files with the structure tokenizer:
1python src/byprot/utils/protein/tokenize_pdb.py \
2 --input_pdb_folder /path/to/your/input/structure \
3 --output_dir /path/to/your/input/structure/tokenized_protein
Then pass the generated struct.fasta to generate_dplm2.py.
Motif Scaffolding
DPLM-2 supports multimodal motif scaffolding by conditioning on both the
sequence and structure tokens of the motif and co-generating the scaffold
sequence and structure:
1model_name=dplm2_650m
2output_dir=./generation-results/${model_name}/motif_scaffold
3
4python run/scaffold_generate_dplm2.py \
5 --model_name airkingbd/${model_name} \
6 --num_seqs 100 \
7 --saveto ${output_dir}
See the official repository for required motif data preparation and evaluation
steps.
Training Data and Training Procedure
DPLM-2 is trained on experimental structures from PDB and AF2-predicted
structures from SwissProt. The authors provide the preprocessed training dataset
on Hugging Face as
airkingbd/pdb_swissprot.
The official DPLM repository describes the following training setup for
dplm2_650m:
- Initialize from the pretrained DPLM checkpoint
airkingbd/dplm_650m
- Use a warm-up training strategy for structure data scarcity
- Use LoRA to limit large parameter shifts during multimodal training
- Use
airkingbd/struct_tokenizer for structure tokenization
The experiment configuration is available in the official repository at
configs/experiment/dplm2/dplm2_650m.yaml.
Evaluation Summary
The DPLM repository reports DPLM-2 results on multiple protein generation and
understanding tasks. Selected 650M-scale results include:
- Forward folding: On the reported CAMEO 2022 split, DPLM-2 obtains RMSD
7.70 and TM-score 0.79; on the reported PDB date split, it obtains RMSD 5.30
and TM-score 0.83.
- Motif scaffolding: DPLM-2 succeeds on 18/24 benchmark cases with average
success rate 0.29 under the repository's motif consistency and overall
quality criteria.
- Representation learning: DPLM-2 provides structure-aware representations
and is evaluated on downstream protein prediction tasks including
thermostability, protein-protein interaction, metal ion binding, EC, GO, and
DeepLoc benchmarks.
For full tables, baselines, metrics, and evaluation details, refer to the
DPLM-2 paper, the
DPLM-2.1 paper, and the official
bytedance/dplm repository.
Citation
If you use this checkpoint, please cite the DPLM and DPLM-2 papers:
1@inproceedings{wang2024dplm,
2 title={Diffusion Language Models Are Versatile Protein Learners},
3 author={Wang, Xinyou and Zheng, Zaixiang and Ye, Fei and Xue, Dongyu and Huang, Shujian and Gu, Quanquan},
4 booktitle={International Conference on Machine Learning},
5 year={2024}
6}
7
8@inproceedings{wang2025dplm2,
9 title={DPLM-2: A Multimodal Diffusion Protein Language Model},
10 author={Wang, Xinyou and Zheng, Zaixiang and Ye, Fei and Xue, Dongyu and Huang, Shujian and Gu, Quanquan},
11 booktitle={International Conference on Learning Representations},
12 year={2025}
13}
14
15@inproceedings{hsieh2025dplm2_1,
16 title={Elucidating the Design Space of Multimodal Protein Language Models},
17 author={Hsieh, Cheng-Yen and Wang, Xinyou and Zhang, Daiheng and Xue, Dongyu and Ye, Fei and Huang, Shujian and Zheng, Zaixiang and Gu, Quanquan},
18 booktitle={International Conference on Machine Learning},
19 year={2025}
20}
Acknowledgements
DPLM builds on and acknowledges prior work and resources including ByProt,
EvoDiff, SaProt, ESM, LM-Design, EigenFold, MultiFlow, FrameFlow, and
OpenFold-related structure modeling utilities. See the official repository for
the complete acknowledgements and implementation details.