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

Understanding pruning_steps #55

Open
iamanigeeit opened this issue Feb 26, 2024 · 1 comment
Open

Understanding pruning_steps #55

iamanigeeit opened this issue Feb 26, 2024 · 1 comment

Comments

@iamanigeeit
Copy link
Contributor

Hello @tianyic ,

I see that pruning_steps determines how many steps we take before pruning:
https://github.com/tianyic/only_train_once/blob/7e930f6ae6cab71659fb921671f6f3921828d7c4/only_train_once/optimizer/hesso.py#L29

  1. Is it correct to say that if pruning_periods = 1, then pruning_steps = how many steps before we prune once? If it makes more sense to prune after every epoch, i will set pruning_steps = steps_per_epoch.

  2. What does pruning_periods do?

Thanks in advance!

@tianyic
Copy link
Owner

tianyic commented Feb 26, 2024

@iamanigeeit

  1. Yes, your understanding is correct. It makes sense to set pruning_steps = steps_per_epoch .
  2. pruning_periods controls how many groups to be pruned incrementally. For example, if target_group_sparsity=0.7, pruning_periods=10, pruning_steps=200, then every pruning_steps /pruning_periods =20 steps will yield target_group_sparsity / pruning_periods =0.07 groups as redundant and project them onto zero.

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