-
Notifications
You must be signed in to change notification settings - Fork 493
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
Nystromformer ONNX export #728
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, very clean! Just to understand, what is the issue with hf-internal-testing/tiny-random-NystromformerModel
with the ONNX Runtime integration?
Co-authored-by: fxmarty <9808326+fxmarty@users.noreply.github.com>
Co-authored-by: fxmarty <9808326+fxmarty@users.noreply.github.com>
I ran the onnx test suite and was getting an error that the inputs were incorrect. I went back and verified that the coded inputs were correct, and then changed the model to the reference model from UW, and the test suite passed with no issues. I did not investigate the |
I tested locally with Could you have a try again with the tiny model? It avoids to slow down too much the tests. |
Sure. I'll do that right now and push a change if it passes.
…On Tue, Jan 31, 2023 at 4:23 AM fxmarty ***@***.***> wrote:
I tested locally with "nystromformer":
"hf-internal-testing/tiny-random-NystromformerModel" and pytest
tests/onnxruntime/test_modeling.py -k "nystromformer" --exitfirst -s and
the tests pass.
Could you have a try again with the tiny model? It avoids to slow down too
much the tests.
—
Reply to this email directly, view it on GitHub
<#728 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNKCQ7UB23F23YIEHS2AJLWVDK2PANCNFSM6AAAAAAUJYFJNE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I cleaned out all of my pycache files etc ```find . | grep -E
"(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf``` and the test ran fine. I'll
push a change and notify you when it's done.
…On Tue, Jan 31, 2023 at 6:17 AM William Roe ***@***.***> wrote:
Sure. I'll do that right now and push a change if it passes.
On Tue, Jan 31, 2023 at 4:23 AM fxmarty ***@***.***> wrote:
> I tested locally with "nystromformer":
> "hf-internal-testing/tiny-random-NystromformerModel" and pytest
> tests/onnxruntime/test_modeling.py -k "nystromformer" --exitfirst -s and
> the tests pass.
>
> Could you have a try again with the tiny model? It avoids to slow down
> too much the tests.
>
> —
> Reply to this email directly, view it on GitHub
> <#728 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABNKCQ7UB23F23YIEHS2AJLWVDK2PANCNFSM6AAAAAAUJYFJNE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Co-authored-by: fxmarty <9808326+fxmarty@users.noreply.github.com>
Co-authored-by: fxmarty <9808326+fxmarty@users.noreply.github.com>
…g/tiny-random-NystromformerModel
…/optimum into onnx-export-nystromformer
@fxmarty changes are pushed. Thanks for the help! |
Thanks great! The git history seems broken (see the diff), could you try to fix it? Not sure what's wrong, I already had the issue using git rebase. Maybe |
@fxmarty I think I have the git history fixed. I also ran make style. What appears to have happened is I inadvertently hit the sync fork button on the forked optimum repository web page.
Sorry about the issues. |
It's all good now, the failing test is unrelated. Thanks for the addition! |
This PR implements ONNX export functionality for Nystromformer models.
Fixes # (727)
In addition to running the test cases, I exported a locally built Nystromformer 2048 input sequence model to ONNX and ran prediction. I verified the prediction output.
I decided to use the uw-madison/nystromformer-1024 for testing and not the hf-internal-testing/tiny-random-NystromformerModel... as the inputs are wrong in the hf-internal-testing model.
Before submitting