adapter-hub / adapters

A Unified Library for Parameter-Efficient and Modular Transfer Learning

Home Page:https://docs.adapterhub.ml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How could I change the name of an adapter layer?

ajesujoba opened this issue · comments

Due to conflicting names, I want to change the name of an adapter, is this possible?

Hey @ajesujoba, once the adapter is loaded you can unfortunately not change the name. However, you can specify which name the adapter should be loaded with by providing the load_as argument as follows: model.load_adapter(adapter_name, load_as='some_new_name').
So one hacky workaround would be to save the adapter and load it with the new name.