-
Notifications
You must be signed in to change notification settings - Fork 326
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix adapters with *adapter_attention*
#29
Closed
4 tasks
JoPfeiff opened this issue
Jul 13, 2020
· 2 comments
路 Fixed by adapter-hub/Hub#9 or adapter-hub/Hub#20
Closed
4 tasks
fix adapters with *adapter_attention*
#29
JoPfeiff opened this issue
Jul 13, 2020
· 2 comments
路 Fixed by adapter-hub/Hub#9 or adapter-hub/Hub#20
Labels
bug
Something isn't working
Comments
can we keep the logging and reduce the log level from "warn" to "info"? |
Can we just remove the weights from the checkpoints? import sys
from shutil import copyfile
import torch
chckpt_path = sys.argv[1]
copyfile(chckpt_path, chckpt_path + '.backup')
chckpt = torch.load(chckpt_path, map_location=torch.device('cpu'))
chckpt_new = dict()
for k, w in chckpt.items():
if 'adapter_attention' not in k:
chckpt_new[k] = w
else:
print('unwanted key: {}'.format(k))
torch.save(chckpt_new, chckpt_path) |
calpt
added a commit
that referenced
this issue
Aug 25, 2023
calpt
added a commit
to calpt/adapter-transformers
that referenced
this issue
Aug 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Bug
Old versions of the adapters initialized
*adapter_attention*
which were never used but stored.I proposed a two stage fix:
hot fix which does not log the warning that the parameters were not instantiated
remove the parameters from all adapters
Information
Model I am using (Bert, XLNet ...): e.g. RoBERTa-Base
Language I am using the model on (English, Chinese ...): English
Adapter setup I am using (if any):
many but e.g.
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
no warning
Environment info
transformers
version:The text was updated successfully, but these errors were encountered: