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

Simplify XAdapterModel implementations #641

Merged
merged 6 commits into from
Feb 17, 2024
Merged

Conversation

calpt
Copy link
Member

@calpt calpt commented Jan 28, 2024

This PR includes some refactorings of all AdapterModel classes:

  • moves prediction head adding methods to base mixin & remove from all model classes
  • convert head_types to list, use single mapping in base mixin

@calpt calpt marked this pull request as ready for review January 31, 2024 22:17
Copy link
Member

@hSterz hSterz left a comment

Choose a reason for hiding this comment

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

Looks good just one small comment :)

Setting to True requires `eos_mask` to be passed as well.
**kwargs: Additional keyword arguments passed to the forward pass of the head.
"""
used_head_modules = self._get_used_heads(head_name)
Copy link
Member

Choose a reason for hiding this comment

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

I find this variable naming unintuitive as the head will be used. Maybe rename to active_head_modules or something similar?

@calpt calpt merged commit 29cbdd7 into adapter-hub:main Feb 17, 2024
3 checks passed
@calpt calpt deleted the refactor/heads branch February 17, 2024 11:11
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