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

Replace .norm() with decomposed version for CLIP executorch export #32887

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

qubvel
Copy link
Member

@qubvel qubvel commented Aug 19, 2024

What does this PR do?

At the moment export of the CLIP model fails with torch._export.verifier.SpecViolationError: Operator torch._ops.aten.linalg_vector_norm.default is not Aten Canonical error.

This PR replaces .norm() operation with a decomposed version to make the CLIPModel model executorch exportable.

Related export error issue:

Related issue:

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We should just have a quick run on the slow tests in case this results in some small numerical differences

@qubvel qubvel merged commit 078d5a8 into huggingface:main Aug 20, 2024
22 checks passed
Titus-von-Koeller pushed a commit to jiqing-feng/transformers that referenced this pull request Aug 21, 2024
…xport (huggingface#32887)

* Replace .norm() with decomposed version for executorch export

* [run_slow] clip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants