Skip to content

Expose disabling decoder loading for classification and regression tasks#3

Merged
Sllambias merged 1 commit into
Sllambias:mainfrom
lukasugar:expose_load_decoder_for_cls_and_reg
May 14, 2026
Merged

Expose disabling decoder loading for classification and regression tasks#3
Sllambias merged 1 commit into
Sllambias:mainfrom
lukasugar:expose_load_decoder_for_cls_and_reg

Conversation

@lukasugar
Copy link
Copy Markdown
Contributor

Cls/reg fine-tuning previously could not override load_decoder even though BaseModule supported it. ClassificationModule and RegressionModule both go through ClsRegBase, and ClsRegBase.__init__ did not accept or forward a load_decoder argument. As a result, BaseModule always used its default load_decoder=True for cls/reg checkpoint loading.

This change makes the option explicit for cls/reg fine-tuning by adding load_decoder to ClsRegBase, forwarding it to BaseModule, adding training.load_decoder: True to the default cls/reg fine-tune configs, and passing that config value from finetune_cls.py and finetune_reg.py.

The default behavior is unchanged: cls/reg still load decoder weights by default. The difference is that users can now override the behavior from config or CLI, for example:

asp_finetune_cls training.load_decoder=False
asp_finetune_reg training.load_decoder=False

Imo, it makes sense to not load decoder in many classification and regression cases.

@Sllambias Sllambias self-requested a review May 14, 2026 11:48
Copy link
Copy Markdown
Owner

@Sllambias Sllambias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Luka,
Thanks for your PR. I think you are right that it makes sense to expose this, so thank you for contributing with the changes, and since this is completely backwards compatible I say we get this merged right away

@lukasugar
Copy link
Copy Markdown
Contributor Author

Great! I don't have merge permission, so please merge it.

I can only comment on the PR:
image

@Sllambias Sllambias merged commit 347ccd8 into Sllambias:main May 14, 2026
1 check 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