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

Sparity-Adjusted DARE #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MonsterAzi
Copy link
Contributor

It's as simple as making the density used in the fill value equal to the desired density divided by the current density.

@linux-leo
Copy link

linux-leo commented May 4, 2024

@MonsterAzi I took a look at the code and I think get the Idea. But you calculate the sparsity of the vectors like so:

s = (tensor.count_nonzero() / tensor.numel()).item()

This is before any sort of sparsity is applied to the vectors, right? So how likely is it that there will be values in the tensor that are exactly zero? Wouldn't it make more sense to count the number of values below a certain threshold when taking their absolute value divided by the number of elements?

@MonsterAzi
Copy link
Contributor Author

It's actually highly likely that there will be values that are exactly zero. The models that result from sparsification (all DARE and TIES models) have some amount of sparsification leftover (values set to exactly 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

Successfully merging this pull request may close these issues.

2 participants