Comments (5)
That was it, I wasn't loading the individual task adapters with model.load_adapter()
before using model.load_adapter_fusion()
- many thanks for your help, it's all working now!
from adapters.
Hi @om304,
Thanks for reporting. Your issue might already be fixed with a recent update to the library. Please try to update to the most recent version of the master branch:
pip install -U git+https://github.com/adapter-hub/adapter-transformers.git
from adapters.
Many thanks for the quick reply, I updated the library as recommended and repeated the above steps and now got this error message after running model.load_adapter_fusion()
:
File "<stdin>", line 1, in <module>
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_model_mixin.py", line 867, in load_adapter_fusion
load_dir, load_name = loader.load(adapter_fusion_name_or_path, load_as)
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_model_mixin.py", line 486, in load
self.model.add_fusion(adapter_fusion_name, config["config"])
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_model_mixin.py", line 746, in add_fusion
self.base_model.add_fusion_layer(adapter_names)
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_bert.py", line 582, in add_fusion_layer
self.encoder.add_fusion_layer(adapter_names)
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_bert.py", line 473, in add_fusion_layer
layer.add_fusion_layer(adapter_names)
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_bert.py", line 455, in add_fusion_layer
self.attention.output.add_fusion_layer(adapter_names)
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_bert.py", line 69, in add_fusion_layer
if self.config.adapters.common_config_value(adapter_names, "mh_adapter"):
File "/home/om304/anaconda3/lib/python3.7/site-packages/transformers/adapter_config.py", line 249, in common_config_value
config_value = self.get(name).get(attribute, None)
AttributeError: 'NoneType' object has no attribute 'get'
from adapters.
This error looks like no adapter was found for one of the fusion tasks you provide, i.e. the model does not include an adapter for either "qqp" or "snli". Did you make sure to load both trained adapter modules using model.load_adapter()
before loading the fusion layer using model.load_adapter_fusion()
?
from adapters.
Cannot load either
from adapters.
Related Issues (20)
- Support for Yi Models
- Logits are changing in old adapters-transformer models if used by the new library HOT 1
- Transformers 4.35.0 Snyk Vulnerability HOT 1
- Error when trying to do torch.save HOT 2
- multi GPU setup causes error HOT 1
- Seed for Adapter Initialization?
- export onnx HOT 1
- How to add an adapter to a quantized model without peft? HOT 1
- load adapters from safetensor files (enhancement) HOT 2
- Cannot automatically convert prediction head of model class RobertaAdapterModel to flex head. HOT 2
- Adding adapters and fusion layer to UNIPELT
- Error when trying to set up adapter training for CodeLlama HOT 1
- T5 AdapterDrop Prefix-Tuning Bug HOT 2
- No difference in performance or speed between different adapter configs
- Total Parameter added to original model HOT 1
- UNIPELT original paper use alpha = 2 for Lora while the UNIPELT implementation in adapter has a alpha = 8 HOT 1
- regression head? HOT 4
- Custom Heads not working with adapters
- UNIPELT, UNIPELT (AP) and UNIPELT (APL)
- QuestionAnsweringTrainer for adapter? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adapters.