Skip to main content
All boileroom models accept a config dictionary at initialization and an options dictionary per call. Understanding the difference between static and dynamic configuration keys is essential for using the API correctly.

Static vs dynamic config

Configuration keys are divided into two categories:
  • Static keys can only be set at initialization via config={}. Attempting to override them per-call via options={} raises a ValueError. These keys affect model loading or resource allocation and cannot be changed between calls.
  • Dynamic keys can be set at initialization via config={} (setting a default) or overridden per-call via options={}.

Setting config at initialization

Pass a config dictionary when creating the model:
from boileroom import ESMFold

model = ESMFold(
    backend="modal",
    config={
        "include_fields": ["plddt", "pae"],
        "glycine_linker": "G" * 25,
    }
)

Overriding per call

Pass an options dictionary to the prediction method:
# Override dynamic keys per call
result = model.fold(
    "MKTVRQERLKSIVRI",
    options={"include_fields": ["pdb", "plddt"]}
)

Error behavior

Attempting to override a static key per-call raises a ValueError:
model = ESMFold(backend="modal")

# This raises ValueError — "device" is static
result = model.fold("MKTVRQERLKSIVRI", options={"device": "cpu"})
# ValueError: The following config keys can only be set at initialization
# and cannot be overridden per-call: ['device']

Full configuration reference

ESMFold

KeyTypeDefaultStaticDescription
devicestr"cuda:0"YesGPU device identifier
glycine_linkerstr""NoLinker string for multimer tokenization
position_ids_skipint512NoPosition ID offset between chains
include_fieldslist[str] | NoneNoneNoOutput fields to return

ESM2

KeyTypeDefaultStaticDescription
devicestr"cuda:0"YesGPU device identifier
model_namestr"esm2_t33_650M_UR50D"YesESM-2 model variant
glycine_linkerstr""NoLinker string for multimer tokenization
position_ids_skipint512NoPosition ID offset between chains
include_fieldslist[str] | NoneNoneNoOutput fields to return

Chai-1

KeyTypeDefaultStaticDescription
devicestr"cuda:0"YesGPU device identifier
num_trunk_recyclesint3NoTrunk recycling iterations
num_diffn_timestepsint200NoDiffusion timesteps
num_diffn_samplesint5NoDiffusion samples to generate
num_trunk_samplesint1NoTrunk samples
use_esm_embeddingsboolFalseNoUse ESM embeddings as input
use_msa_serverboolFalseNoQuery MSA server
use_templates_serverboolFalseNoQuery templates server
include_fieldslist[str] | NoneNoneNoOutput fields to return

Boltz-2

KeyTypeDefaultStaticDescription
devicestr"cuda:0"YesGPU device identifier
cache_dirstr | NoneNoneYesModel weights and resources directory
no_kernelsboolFalseYesDisable custom CUDA kernels
use_msa_serverboolTrueNoQuery MSA server
msa_server_urlstr"https://api.colabfold.com"NoMSA server URL
msa_pairing_strategystr"greedy"NoMSA pairing strategy
recycling_stepsint3NoRecycling iterations
sampling_stepsint200NoDiffusion sampling steps
diffusion_samplesint1NoStructure samples to generate
max_parallel_samplesint5NoMax parallel samples
step_scalefloat1.5NoDiffusion step scale factor
write_full_paeboolTrueNoCompute full PAE matrix
write_full_pdeboolTrueNoCompute full PDE matrix
write_embeddingsboolFalseNoInclude model embeddings
num_workersint2NoData loading workers
max_msa_seqsint8192NoMax MSA sequences
subsample_msaboolTrueNoSubsample MSAs
num_subsampled_msaint1024NoNumber of subsampled MSA sequences
msa_cache_enabledboolTrueNoEnable MSA caching
overrideboolFalseNoOverride existing output files
seedint | NoneNoneNoRandom seed
include_fieldslist[str] | NoneNoneNoOutput fields to return