AttributeError: 'NoneType' object has no attribute 'output_adapter_gating_scores' #677
-
Hi, I tried to train adapter with CLIPVisionModel. When I tried to train the model and it showed the errors. File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 1537, in train |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This problem is quite wired. When I add some codes like "if context is None" before it, ForwardContext.get_context() would not return a Nonetype. I don't know the reason. Something like Schrödinger' codes. |
Beta Was this translation helpful? Give feedback.
-
Hey, sorry for missing this. Would you mind sharing a minimal example we can run to reproduce this? Thank you! |
Beta Was this translation helpful? Give feedback.
-
i also have this problem when i try to use
i use preiffer adapter for text classification task |
Beta Was this translation helpful? Give feedback.
-
@calpt I am also facing the same issue with the Bottleneck adapters from the AdapterHub. I am training LLaMA for summarization. It is working fine with LoRA config but not with BottleNeck Adapters (all configurations). Can you please help me with this? |
Beta Was this translation helpful? Give feedback.
-
Thanks all for reporting this issue! The issue seems to be happening only if gradient checkpointing is enabled (please provide counter examples if this is not the case). For Bottleneck adapters, the issue should be resolved by #730. However, it still persists for a few other adapter types in combination with gradient checkpointing, see #732. |
Beta Was this translation helpful? Give feedback.
Thanks all for reporting this issue!
The issue seems to be happening only if gradient checkpointing is enabled (please provide counter examples if this is not the case).
For Bottleneck adapters, the issue should be resolved by #730. However, it still persists for a few other adapter types in combination with gradient checkpointing, see #732.