-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
RWKV - loss.backward() failed #23653
Comments
+1 on this issue. Any update? |
Checkout this reply. I guess it's the same issue though not looked into it. |
Thanks for the help. I still have the same bug as before.
Any idea about this? |
I'm experiencing loss.backward() failure when using custom cuda kernel. In other words, whenever the setup branches towards the else path below:
loss.backward() throws out an error "TypeError: backward() takes 2 positional arguments but 3 were given". Any ideas on what might contribute to this? |
Pinging both @sgugger and @younesbelkada as they ported the model |
I can confirm the backward fails both on CPU (first error) and on GPU (last error). Diving into this. |
On CPU a simple workaround is to set For GPU the fix should be in a PR later today/tomorrow morning. |
GPU fix was merged in #23774 |
Thanks! I have verified that it is working, and the fine-tuning process is also functioning properly after this issue has been fixed. |
System Info
transformers
version: 4.29.2Who can help?
@ArthurZucker @younesbelkada
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
loss.backward()
to run but it failed:Expected behavior
loss.backward() should work out.
The text was updated successfully, but these errors were encountered: