-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
torch.export fails for llama model #29190
Comments
cc @fxmarty as well |
Thanks @fxmarty for fixing the first part! Just reinstalled from source using commit 2cc8cf6 and rechecked. Still running into the second issue with the code snippet from above:
|
this will be fixed by #29198, there is no longer |
@ArthurZucker I have seen similar issues with mistralai/Mixtral-8x7B-v0.1 model, I have seen there are 13 graph breaks because of conditional statements and call backs to python, is there any plan to support dynamo full_graph support for maximum of models ? |
System Info
transformers
version: 4.38.0.dev0Who can help?
@ArthurZucker @gante
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
Successfully export of the model but fails with:
I worked around this issue by guarding with torch._dynamo_is_compiling() in these two places:
transformers/src/transformers/models/llama/modeling_llama.py
Line 1080 in fc37f38
transformers/src/transformers/models/llama/modeling_llama.py
Line 131 in fc37f38
Happy to create a PR if this is a viable solution.
The text was updated successfully, but these errors were encountered: