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

Multiple AdaptersFusion on same adapters #316

Closed
luccitan opened this issue Mar 31, 2022 · 1 comment · Fixed by #774
Closed

Multiple AdaptersFusion on same adapters #316

luccitan opened this issue Mar 31, 2022 · 1 comment · Fixed by #774
Assignees
Labels
enhancement New feature or request

Comments

@luccitan
Copy link

luccitan commented Mar 31, 2022

Environment info

  • adapter-transformers version: 2.2.0
  • Platform: macOS-10.16-x86_64-i386-64bit
  • Python version: 3.8.12
  • PyTorch version (GPU?): 1.10.2 (False)

Details

Hello, I am ramping up on the usage of adapters and I would like to add Fusion Layers (with Fuse) for several adapters.
The issue is that I would like to have multiple Fuse for the same bag of adapters (trained on different datasets).

The Fuse layer is referenced through the name of the adapters, so to my knowledge having multiple fuse for same adapters would have the same reference, leading to a collision.
One workaround is to simply switch the order of the adapters name:

fuse1 = tf.adapters.composition.Fuse(['adapter1', 'adapter2'])
fuse2 = tf.adapters.composition.Fuse(['adapter2', 'adapter1'])

It is a bit a quick&dirty workaround, and one additional disadvantage is that it would not be possible to have more than 2 different fuses with the same 2 adapters.
Is there a more proper way to have this kind of feature?

Thanks!

@luccitan luccitan added the question Further information is requested label Mar 31, 2022
@calpt
Copy link
Member

calpt commented Apr 13, 2022

Hey @luccitan, I believe we don't have any better way of doing what you describe at the moment. However, having a possibility to name AdapterFusion layers makes sense to me. Will keep this open as a feature request.

@calpt calpt added enhancement New feature or request and removed question Further information is requested labels Jul 26, 2022
@calpt calpt self-assigned this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants