-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
MarianMTModel/MBartForConditionalGeneration does not support device_map='auto'
yet
#22305
Comments
Hi @TranPhu1999, thanks for raising this issue. Yes, it seems an equivalent update to the MBart and MarianMT models would need to be added, as the one added to XGLM. Would you like to open a PR to add these changes? |
Hi @TranPhu1999 pip install git+https://github.com/huggingface/transformers.git I will work later on adding the same support for Marian as well |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Any updates on MarianMT models? |
System Info
Hi, I'm experiment some Transformer models for Translation task. These model are vinai-translate-en2vi, wmt19-ru-en
In the attempt to optimize the Transformer inference time on single GPU, I tried to follow the instruction on this document but stump on this error. I found a similar case here where the solution is to Add
accelerate
support for the correspond model. Is it the solution for my problem too? Can anyone share your experience to optimize Transformer inference time? Thanks a lot.Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I use this code like the example
` from transformers import AutoModelForSeq2SeqLM
model_name = "vinai-translate-en2vi"
model_8bit = AutoModelForSeq2SeqLM.from_pretrained(model_name, device_map="auto", load_in_8bit=True)`
and
` from transformers import AutoModelForSeq2SeqLM
model_name = "wmt19-ru-en"
model_8bit = AutoModelForSeq2SeqLM.from_pretrained(model_name, device_map="auto", load_in_8bit=True)`
Error
ValueError: MarianMTModel does not support
device_map='auto'
yet.and
ValueError: MBartForConditionalGeneration does not support
device_map='auto'
yet.Expected behavior
The code in the instruction should be working
The text was updated successfully, but these errors were encountered: