Add EVA-02 model ( https://arxiv.org/abs/2303.11331 ) #2311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I have implemented the EVA-02 model ( https://arxiv.org/abs/2303.11331 ), an improvement of the BeiT model (with a custom Y-shaped feed-forward, absolute positional encoding at beginning + rotate positional encoding in the attention module.
This model currently ranks first in ImageNet classification, according to timm.
( See: https://github.com/huggingface/pytorch-image-models/blob/main/results/results-imagenet.csv )
The weights provided are for ImageNet classification, and come from timm.
Thanks for your time,
Regards,
Vincent.
PS: As it was the case with the BeiT model implementation, there will be another commit / pull request later on, related to the rotate positional encoding. For now, I have included the weights as a single additional tensor, to the safetensor weights (+0.5 MB on top of 330 MB), instead of implementing the corresponding function. I am working on this, but it may take some time, as the missing function is not 'trivial'.