Skip to content
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

Add automatic conversion of static heads when loaded via XModelWithHeads #181

Merged
merged 6 commits into from
Jun 11, 2021

Conversation

calpt
Copy link
Member

@calpt calpt commented May 29, 2021

Changes in detail:

  • Enable conversion of static heads to flex head model heads.
  • Add use_pooler argument classification & m.-choice heads.
  • Allow passing of id2label to prediciton head loading.
  • Save "num_labels" into static head config and use it for conversion to flex head

Current limitations:
id2label/label2id must be either present in the head config (often not the case, e.g. here) or explicitly provided to load_adapter()/load_head(). Alternatively, num_labels can be passed to load_adapter(). Fix must be provided on the Hub side.

Example notebook: https://colab.research.google.com/drive/1JYAPKlPtJwCddc-Jra9WG9Cw5RVjFkhR?usp=sharing

calpt added 2 commits May 29, 2021 16:53
Add use_pooler argument classification & m.-choice heads.
Allow passing of id2label to prediciton head loading.
@calpt calpt force-pushed the dev/universal_head_loading branch from e28be4d to 2ef6a73 Compare May 29, 2021 17:58
@calpt calpt marked this pull request as ready for review June 3, 2021 13:09
@calpt calpt requested a review from hSterz June 3, 2021 13:09
@calpt calpt changed the base branch from master to develop June 11, 2021 13:01
@calpt calpt merged commit 94ff58d into adapter-hub:develop Jun 11, 2021
@calpt calpt deleted the dev/universal_head_loading branch June 11, 2021 13:07
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