Skip to content

Expose ESMFold2 MSA inference-diversity knobs in local fold()#342

Merged
faustomilletari merged 2 commits into
mainfrom
fm/esmfold2-msa-knobs-local
Jun 8, 2026
Merged

Expose ESMFold2 MSA inference-diversity knobs in local fold()#342
faustomilletari merged 2 commits into
mainfrom
fm/esmfold2-msa-knobs-local

Conversation

@faustomilletari

Copy link
Copy Markdown
Collaborator

The transformers ESMFold2Model.forward accepts msa_max_depth, msa_column_mask_rate, and msa_subsample_at_inference, but the local ESMFold2InputBuilder.fold() entrypoint didn't surface them, so users running ESMFold2 locally couldn't access the feature.

Add the three knobs to fold() and forward them to the model. Defaults match the model's hardcoded values (1024 / 0.1 / True), so behavior is unchanged unless set; they only take effect for inputs that carry an MSA.

The transformers ESMFold2Model.forward accepts msa_max_depth,
msa_column_mask_rate, and msa_subsample_at_inference, but the local
ESMFold2InputBuilder.fold() entrypoint didn't surface them, so users
running ESMFold2 locally couldn't access the feature.

Add the three knobs to fold() and forward them to the model. Defaults
match the model's hardcoded values (1024 / 0.1 / True), so behavior is
unchanged unless set; they only take effect for inputs that carry an MSA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Tests Skipped Failures Errors Time
28 1 💤 0 ❌ 0 🔥 17.245s ⏱️

@faustomilletari

Copy link
Copy Markdown
Collaborator Author

msa_subsample_at_inference argument is not present in api.py (forge). pls clarify if this is something that should also be omitted in this PR

Its model default is True and we always want it on, so omitting the
knob is behavior-preserving and leaves fold() exposing exactly
msa_max_depth + msa_column_mask_rate, matching the FoldingConfig
(forge) interface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@faustomilletari faustomilletari merged commit eca8e1c into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants