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

Work with Pytorch Lightning #562

Closed
dyxohjl666 opened this issue Jul 3, 2023 · 1 comment
Closed

Work with Pytorch Lightning #562

dyxohjl666 opened this issue Jul 3, 2023 · 1 comment
Labels
question Further information is requested

Comments

@dyxohjl666
Copy link

I' m working on using adapters to learn domain specific knowledge. Since my previous work is based on Pytorch Lightning, I tried to train adapters with it too. However, the document says that " AdapterTrainer is only intended for training adapters. The Trainer class should still be used to fully fine-tune models. ". I thought it means if I use Trainer, all the parameters will be finetuned.

But Pytorch Lightning's Trainer doesn't have an "Adapter" version. Is it possible I use AdapterHub with Pytorch Lightning?

@dyxohjl666 dyxohjl666 added the question Further information is requested label Jul 3, 2023
@armin-zd
Copy link

You can use the lightning Trainer as usual with your adapter model. Just do model.train_adapter(adapter_id) before passing it to trainer.fit, which disables training of all weights outside the task adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants