Skip to content

Add ability for BenchmarkModel to have its decoder disabled #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2025

Conversation

amorehead
Copy link
Collaborator

@amorehead amorehead commented Mar 13, 2025

  • Adds the ability for BenchmarkModel to have its decoder disabled
  • This is useful when loading pretrained model weights that are only used to extract encoder representations
  • For example, it's possible to inject this new decoder.disable argument as follows:
pretrained_config = OmegaConf.load(
    configs.model.encoder.pretrained.config_path
)
pretrained_config.decoder.disable = True
encoder = BenchMarkModel.load_from_checkpoint(
    configs.model.encoder.pretrained.checkpoint_path,
    strict=False,
    cfg=pretrained_config,
)

@amorehead amorehead merged commit 340885e into main Mar 13, 2025
2 checks passed
@amorehead amorehead deleted the amorehead-decoder-disable branch March 13, 2025 16:23
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.

1 participant