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

Some question about the svit method #14

Open
King4819 opened this issue Dec 2, 2024 · 5 comments
Open

Some question about the svit method #14

King4819 opened this issue Dec 2, 2024 · 5 comments

Comments

@King4819
Copy link

King4819 commented Dec 2, 2024

I have an interesting question: since most token pruning methods actually prune layer 4 to layer 12 of vit model, have you tried pruning the early layers of vit model (layer 1 ~ layer3) ? And how is the performance ? Hopes to get your reply, thanks !!!

@kaikai23
Copy link
Contributor

kaikai23 commented Dec 3, 2024

Yes we tried pruning token in layers1~3 during some initial experiments on classification, and the performance dropped significantly. We also tested some other pruning ratios for different layers, but didn't easily find one that outperformed the default setting provided by DynamicViT and EViT.

However, there is a relevant paper on pruning ratios for different layers: "DiffRate : Differentiable Compression Rate for Efficient Vision Transformers". I hope this might be helpful!

@King4819
Copy link
Author

King4819 commented Dec 3, 2024

@kaikai23 Thanks for your reply ! May I ask how did you set the token keep ratio of all layers ? I think most token pruning methods in 4th ~ 12th layer follow [k, k^2, k^3] setting.

@kaikai23
Copy link
Contributor

kaikai23 commented Dec 4, 2024

image

@King4819
Copy link
Author

King4819 commented Dec 4, 2024

@kaikai23 Oh I mean the settings of 12 layers (layer 1 ~ layer 12)

@kaikai23
Copy link
Contributor

kaikai23 commented Dec 5, 2024

Hi, we kept all the tokens in layer 1~layer 3, and keep 70%, 70%, 70%, 49%, 49%, 49%, 34.3%, 34.3% tokens in layer 4 ~ layer 12.

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

No branches or pull requests

2 participants