Layer-wise adapters

0 views
Skip to first unread message

Surangika Ranathunga

unread,
Jun 9, 2023, 4:19:18 PM6/9/23
to Lingua, Thillainathan Sarubi
Hi team
Sarubi (cced here) needs some guidance on connecting adapters layer-wise.
Please send information you have for this.

Pasindu Udawatta

unread,
Jun 10, 2023, 1:34:28 AM6/10/23
to sts...@gmail.com, Surangika Ranathunga, Lingua
Hi Sarubi,

Are you trying to connect adapters to a new model architecture or to integrate adapter modules into an existing model architecture of HuggingFace Transformers?

--
You received this message because you are subscribed to the Google Groups "Lingua" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lingua-cse-1...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lingua-cse-18/CAAFKZ_xDPUr0SsW8h%3DoeUjf7YGkHaSFm27a9wv93m3MisPFeTw%40mail.gmail.com.


--
Pasindu Udawatta
(CIMA Dip MA)
Undergraduate
Department of Computer Science & Engineering
University of Moratuwa

Sarubi Thillainathan

unread,
Jun 11, 2023, 4:40:09 AM6/11/23
to Pasindu Udawatta, Lingua, Surangika Ranathunga

Hi Pasindu, 

The later one, integrate to existing model architecture. 

We fine tune using mbart with adapters. 

Thank you in advance,
Sarubi. 
--
Sarubi Thillainathan
Doctoral Student, 
Department of Language Science and Technology, 
Saarland University | Universität des Saarlandes.

Sarubi Thillainathan

unread,
Jun 15, 2023, 4:22:54 PM6/15/23
to Pasindu Udawatta, Lingua, Surangika Ranathunga
Hi Pasindu,

Appreciate your guidance on this! 

Chathulanka Gamage

unread,
Jun 16, 2023, 12:39:11 AM6/16/23
to Sarubi Thillainathan, Pasindu Udawatta, Lingua, Surangika Ranathunga
Hi Sarubi,

Sorry for the late reply.

load_adapter(adapter_name_or_path: strconfig: Union[dictstr] = Noneversion: str = Nonemodel_name: str = Noneload_as: str = Nonesource: str = Nonewith_head: bool = Truecustom_weights_loaders: Optional[List[transformers.adapters.loading.WeightsLoader]] = Noneleave_out: Optional[List[int]] = Noneid2label=Noneset_active: bool = False**kwargs) → str

The "leave_out" parameter allows you to specify a list of layers where you do not want the adapters to be applied. You can find more details on the MBart page on the AdapterHub documentation. 

If you need further assistance, feel free to reach out.




Sarubi Thillainathan

unread,
Jun 16, 2023, 1:44:53 AM6/16/23
to Chathulanka Gamage, Lingua, Pasindu Udawatta, Surangika Ranathunga
Thank you for sharing it. 
Sure! 
Reply all
Reply to author
Forward
0 new messages