
License: ESM2 is open source and free for academic and commercial use under an MIT license. Please refer to the license for full terms.
This generator is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.

Generator contributors
dguo8412
Protein sequence mutation/refinement generator using ESM2 language model.
This generator uses the ESM2 protein language model to refine existing
protein sequences through iterative mutation. It masks positions according
to the configured masking strategy and samples biologically plausible amino
acids at those positions.
The generator category is "mutation", indicating it refines proposal
sequences through targeted mutations.
API Reference
Configuration object for ESM2Generator.This class defines configuration parameters for the ESM2 generator, which uses
a protein language model to refine existing protein sequences through iterative
mutation of masked positions. In Proto Language, ESM2 is registered as a
mutation-category generator that edits the supplied starting sequence; the
segment must carry a sequence (directly or from a prior optimizer stage).
enum
default:"esm2_t33_650M_UR50D"
ESM-2 model variant to load (e.g. esm2_t33_650M_UR50D).Options:
esm2_t6_8M_UR50D, esm2_t12_35M_UR50D, esm2_t30_150M_UR50D, esm2_t33_650M_UR50D, esm2_t36_3B_UR50D, esm2_t48_15B_UR50DMaskingStrategy
Controls which positions to mask for sampling. Default: random 30%.
enum
default:"single_pass"
‘single_pass’ fills all masks in one forward; ‘iterative_refinement’ runs a MaskGIT-style loop.Options:
single_pass, iterative_refinementnumber
default:"1.0"
Sharpness of sampling. Below 1 sharpens toward the likely amino acid; above 1 increases diversity.
number
default:"1.0"
Nucleus sampling cumulative probability cutoff used in iterative refinement. 1.0 disables it.
integer
default:"20"
Number of iterative-refinement rounds. Returns diminish above 20.
enum
default:"cosine"
Per-round unmask rate. ‘cosine’ commits more positions late; ‘linear’ commits the same each round.Options:
cosine, linearenum
default:"random"
How positions are picked each round. ‘entropy’ takes most-confident first; ‘random’ is uniform.Options:
random, entropyboolean
default:"True"
Anneal temperature toward 0 across rounds
string
default:"cuda"
GPU device to run ESM2 on (e.g. ‘cuda’ or ‘cuda:0’).
integer
default:"1"
Number of sequences to process simultaneously on GPU
Usage
python