Run this model with HF Jobs
Run GleghornLab/DSM_150 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/GleghornLab/DSM_150. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/GleghornLab/DSM_150 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use GleghornLab/DSM_150 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GleghornLab/DSM_150 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import ESM_Diff model = ESM_Diff.from_pretrained("GleghornLab/DSM_150", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files14 unmodified lines151617181920217 unmodified lines23823924024124224324424529 unmodified lines275276277278279280149 unmodified lines43043143243343443514 unmodified lines- [Training](#training)- [Evaluation](#evaluation)- [Results](#results)- [Cite](#cite)## Introduction217 unmodified lines1. **Clone the repository:**```bashgit clone <repository-url>cd <repository-name>```2. **Initialize the submodules:**29 unmodified linesdeactivate```## TrainingThe primary script for training models is `training/train_dsm.py`. This script further pretrains an ESM2 checkpoint using the DSM objective (masked diffusion based on LLaDA) on a large protein sequence dataset like [OMG-prot50](https://huggingface.co/datasets/Synthyra/omg_prot50).149 unmodified linesThese results highlight DSM's capability to unify high-quality protein representation learning and biologically coherent generative modeling within a single framework.## Cite```@misc{hallee2025diffusionsequencemodelsenhanced,14 unmodified lines15161718192021217 unmodified lines23924024124224324424524629 unmodified lines276277278279280281282283284285286287288289290291149 unmodified lines44144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649714 unmodified lines- [Training](#training)- [Evaluation](#evaluation)- [Results](#results)- [Experimental validation](#experimental-validation)- [Cite](#cite)## Introduction217 unmodified lines1. **Clone the repository:**```bashgit clone https://github.com/Gleghorn-Lab/DSM.gitcd DSM```2. **Initialize the submodules:**29 unmodified linesdeactivate```All together```bashgit clone https://github.com/Gleghorn-Lab/DSM.gitcd DSMgit submodule update --init --remote --recursivechmod +x setup_bioenv.sh./setup_bioenv.shsource ~/bioenv/bin/activate```## TrainingThe primary script for training models is `training/train_dsm.py`. This script further pretrains an ESM2 checkpoint using the DSM objective (masked diffusion based on LLaDA) on a large protein sequence dataset like [OMG-prot50](https://huggingface.co/datasets/Synthyra/omg_prot50).149 unmodified linesThese results highlight DSM's capability to unify high-quality protein representation learning and biologically coherent generative modeling within a single framework.## Experimental validationWe validated various DSM generated binders using biolayer interferometry through [Adaptyv Bio](https://www.adaptyvbio.com/) - sending in 20 designs for EGFR and PD-L1. Sequences generated via unconditional generation were sorted hierarchically by predicted binding affinity (Synteract2), then ESMfold pLDDT, ESM2 PLL, and finally Chai1 iPTM.### EGFROf the 13 expressed, 12 designs bound to EGFR with 11 of them binding strongly. Noteably, the top design, `dsm_egfr_10`, presented a mean KD in the picomolar range (861 pM), which is a ~30% increase in binding affinity vs. the winner (and our starting template) of the Adaptyv EGFR competition at 1.21 nM, and ~90% over the original starting scFV Cetuximab at 664 nM.<img width="1593" height="527" alt="image" src="https://github.com/user-attachments/assets/f6f6a614-d5f4-4e9e-b7c9-fc0fdf9dc1e2" />**dsm_egfr_10**```QVQLQQSGPGLVQPSQSLSITCTVSGFSLTNYGVHWVRQSPGKGLEWLGVIWSGGNTDYNTPFTSRLSISRDTSKSQVFFKMNSLQTDDTAVYYCARALTYYDYEFAYWGQGTLVTVSAGGGGSGGGGSGGGGSDILLTQSPVILSVSPGERVSFSCRASQSIGSNIHWYQQRTNGSPKLLIRYASESISGIPSRFSGSGSGTDFTLSINSVDPEDIADYYCQQNNNWPTTFGAGTKLEIK```* KD - 861 pM* pKD - 9.06* PPI probability (Synteract2) - 0.9991* predicted pKD (Synteract2) - 8.94* mask rate for DSM - 2%* mutations from template - 3* mutations - I92V, T165S, L240I* average esm2 pll - 1.23* esmfold plddt - 0.75* pTM (AlphaFold3) - 0.81* ipTM (AlphaFold3) - 0.91<table><tr><td><img width="596" height="355" alt="image" src="https://github.com/user-attachments/assets/0c6f690d-3134-44d2-9540-12c277e187b3" /></td><td><img src="https://github.com/Gleghorn-Lab/DSM/blob/main/wetlab_result_analysis/egfr/kinetics/dsm_egfr_10_2.png" width="400"></td></tr></table>This sequence would have won the EGFR competition by a wide margin! Of course, we piggybacked on the winning entry as our template. We have been using DSM-PPI-full to attempt to replicate competition winning binders from the Cetuximab starting point instead. Stay tuned!<img width="1865" height="548" alt="image" src="https://github.com/user-attachments/assets/ce486326-f4ba-4604-af47-259f7bbe496f" />### PD-L1All 20 PD-L1 designs had high expression rates, with 15/20 binding. 1 weak, 10 medium, and 3 strong. The strongest presented with an average KD of 8.06 nM (pKD) , which is markedly less than the original template at 0.8 pM. We attribute the consistent binding but worse performance overall to the higher error between Synteract2 ppKD and true pKD of the template, implying it is not modeled well by our affinity system.<img width="1592" height="516" alt="image" src="https://github.com/user-attachments/assets/6d2cde0e-75a4-4f29-999f-a8c601286845" /><img src="https://github.com/Gleghorn-Lab/DSM/blob/main/wetlab_result_analysis/pdl1/kinetics/dsm_pdl1_7_1.png" width="400">## Cite```@misc{hallee2025diffusionsequencemodelsenhanced,
README.md+64-2