Skip to content
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

Why is Pararallel Composition blocked for XLM-Roberta #282

Closed
jinyongyoo opened this issue Feb 11, 2022 · 3 comments · Fixed by #305
Closed

Why is Pararallel Composition blocked for XLM-Roberta #282

jinyongyoo opened this issue Feb 11, 2022 · 3 comments · Fixed by #305
Labels
question Further information is requested

Comments

@jinyongyoo
Copy link

Parallel composition of adapters are only supported for a few model types listed here:
https://github.com/Adapter-Hub/adapter-transformers/blob/9a6bf1757b684a4c627c5a35a56e61ea706dccee/src/transformers/adapters/composition.py#L101-L103

But I believe XLM-Roberta has the same architecture as Roberta, so I think parallel composition will also work with XLM-Roberta models. Is it possible to use parallel composition with XLM-Roberta models?

@jinyongyoo jinyongyoo added the question Further information is requested label Feb 11, 2022
@jinyongyoo
Copy link
Author

jinyongyoo commented Feb 11, 2022

Nevermind seems like parallel composition does not work with XLM-Roberta models.

Edit

The error I'm getting is RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling cublasCreate(handle)

As far as I can tell, it's occurring at this line and only when I'm using GPU.

https://github.com/Adapter-Hub/adapter-transformers/blob/9a6bf1757b684a4c627c5a35a56e61ea706dccee/src/transformers/models/roberta/modeling_roberta.py#L211

Edit 2
Well turns it was because of GPU OOM issue (strangely didn't raise OOM error directly, however). I now can confirm that parallel composition also works for xlm-roberta.

@jinyongyoo
Copy link
Author

jinyongyoo commented Feb 11, 2022

Can we add xlm-roberta to the whitelist? It's pretty common to use adapters with multilingual models, so I don't see why we should not allow xlm-roberta to the whitelist.

@calpt
Copy link
Member

calpt commented Mar 15, 2022

Hi @jinyongyoo, you're right, I think there's no reason why XLM-Roberta shouldn't be on that list. Adding in #305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants