We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
adapters
transformers
Model I am using (Bert, XLNet ...): CodeLlama
Language I am using the model on (English, Chinese ...): English
Adapter setup I am using (if any):
The problem arises when using:
The tasks I am working on is:
Steps to reproduce the behavior:
import adapters from adapters import AutoAdapterModel, AdapterArguments, setup_adapter_training from transformers import HfArgumentParser, TrainingArguments import torch parser = HfArgumentParser((TrainingArguments, AdapterArguments)) training_args, adapter_args = parser.parse_args_into_dataclasses() print(training_args, adapter_args) state_dict = torch.load("/var/data/mmior/finetune-hf/model.pth") model = AutoAdapterModel.from_pretrained( "codellama/CodeLlama-7b-Instruct-hf", state_dict=state_dict, ) adapters.init(model) model.add_classification_head("mrpc", num_labels=2) model.set_active_adapters("mrpc") setup_adapter_training(model, adapter_args, "seq_bn")
I expect the training to be set up, but instead I get the error below.
/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( /home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/transformers/utils/generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( /home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/transformers/utils/generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:25<00:00, 12.63s/it] Traceback (most recent call last): File "/home/mmior/apps/json-descriptions/adapter.py", line 15, in <module> model.add_classification_head("mrpc", num_labels=2) File "/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/adapters/heads/model_mixin.py", line 70, in wrapper return f(self, *args, **kwargs) File "/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/adapters/heads/model_mixin.py", line 325, in add_classification_head head = ClassificationHead(self, head_name, num_labels, layers, activation_function, id2label, use_pooler) File "/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/adapters/heads/base.py", line 149, in __init__ self.build(model) File "/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/adapters/heads/base.py", line 76, in build dropout_prob = model_config.hidden_dropout_prob File "/home/mmior/.local/share/virtualenvs/json-descriptions-cLP9Kwl8/lib/python3.10/site-packages/transformers/configuration_utils.py", line 265, in __getattribute__ return super().__getattribute__(key) AttributeError: 'LlamaConfig' object has no attribute 'hidden_dropout_prob'
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up. This issue should be fixed with the merge of #685.
Sorry, something went wrong.
Use default head dropout prob if not provided by model (#685)
25797a0
Fixes #666 and issue described in #523.
calpt
Successfully merging a pull request may close this issue.
Environment info
adapters
version: 0.1.2transformers
version: 4.36.2Information
Model I am using (Bert, XLNet ...): CodeLlama
Language I am using the model on (English, Chinese ...): English
Adapter setup I am using (if any):
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the training to be set up, but instead I get the error below.
The text was updated successfully, but these errors were encountered: