adapter-hub / adapters

A Unified Library for Parameter-Efficient and Modular Transfer Learning
https://docs.adapterhub.ml
Apache License 2.0
2.56k stars 342 forks source link

Scaling to thousands of adapters #546

Closed armin-zd closed 1 year ago

armin-zd commented 1 year ago

I'm working on a personalisation problem that involves fine-tuning a model for each individual user. I'm experimenting with adapters, creating a unique adapter for every user.

I noticed that subsequent calls to add_adapter get increasingly slow and it practically halts after a few hundred iterations (Bert, various adapter types). I understand this might not be the intended usage, but are there any workarounds to allow scaling the number of adapters to thousands/millions?

Many thanks!

armin-zd commented 1 year ago

I realized a better way would be to have a single adapter and do save/load adapter for each user.