Skip to content

check if eigenvalues of covariance matrix are complex. #34037

Merged
ArthurZucker merged 1 commit intohuggingface:mainfrom
abuelnasr0:fix_refomer
Oct 10, 2024
Merged

check if eigenvalues of covariance matrix are complex. #34037
ArthurZucker merged 1 commit intohuggingface:mainfrom
abuelnasr0:fix_refomer

Conversation

@abuelnasr0
Copy link
Copy Markdown
Contributor

A follow-up for #33950 and #33325

This fixes reformer test_resize_tokens_embeddings. We should check if the eigenvalues are complex also to check if the covariance is positive definite.
c.c. @gante Thaks for the other fixes!
and c.c. @ArthurZucker

Copy link
Copy Markdown
Contributor

@gante gante left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for having a look at that skip 💛

@gante gante requested a review from LysandreJik October 9, 2024 11:31
Copy link
Copy Markdown
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

🤗

@ArthurZucker ArthurZucker merged commit 4a3f1a6 into huggingface:main Oct 10, 2024
@abuelnasr0 abuelnasr0 deleted the fix_refomer branch October 10, 2024 23:17
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
…4037)

check if eigenvalues of covariance complex for psd checking
sandeep-maddipatla added a commit to sandeep-maddipatla/optimum-habana that referenced this pull request Jan 30, 2025
…f Positive definiteness

- huggingface/transformers#34037 introduces a check to verify the covariance matrix generated within
  the `PreTrainedModel::_init_added_embeddings_weights_with_mean` function.
- This regresses tests on HPU functionally.
- This is a temporary WA to move to the older version of the function, while a longer term fix for the problem is in the works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants