
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.

"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).
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_UR50DControls which positions to mask for sampling. Default: random 30%.
‘single_pass’ fills all masks in one forward; ‘iterative_refinement’ runs a MaskGIT-style loop.Options:
single_pass, iterative_refinementSharpness of sampling. Below 1 sharpens toward the likely amino acid; above 1 increases diversity.
Nucleus sampling cumulative probability cutoff used in iterative refinement. 1.0 disables it.
Number of iterative-refinement rounds. Returns diminish above 20.
Per-round unmask rate. ‘cosine’ commits more positions late; ‘linear’ commits the same each round.Options:
cosine, linearHow positions are picked each round. ‘entropy’ takes most-confident first; ‘random’ is uniform.Options:
random, entropyAnneal temperature toward 0 across rounds
GPU device to run ESM2 on (e.g. ‘cuda’ or ‘cuda:0’).
Number of sequences to process simultaneously on GPU
Usage
python
Metadata
| Property | Value |
|---|---|
| Key | esm2 |
| Class | ESM2Generator |
| Category | mutation |
| Input Type | starting_sequence |
| Uses GPU | True |
| Supported Sequence Types | protein |
| Allows Empty Start | False |