varunnair18 / fish Goto Github PK
View Code? Open in Web Editor NEWCode for "Training Neural Networks with Fixed Sparse Masks" (NeurIPS 2021).
Code for "Training Neural Networks with Fixed Sparse Masks" (NeurIPS 2021).
pip install datasets torch==1.8.0 tqdm torchvision==0.9.0
this seems VERY restrictive :(
I was trying to run the example command:
$ bash transformers/examples/text-classification/scripts/run_sparse_updates.sh "qqp mnli rte cola stsb sst2 mrpc qnli" 0 0.005 1024
But it seems that there lack of a class called generate_masks in the project. I got this error:
Traceback (most recent call last):
File "/home/miao/projects/llm/FISH/transformers/examples/text-classification/run_glue_sparse_update.py", line 47, in <module>
from custom_trainer import GLUETrainer
File "/home/miao/projects/llm/FISH/transformers/examples/text-classification/custom_trainer.py", line 108, in <module>
from generate_masks import create_mask_random, create_mask_gradient, create_mask_bias
ModuleNotFoundError: No module named 'generate_masks'
I could not find related files in the folder. May I know what the problem is?
Thanks for making the code available, I see that you have added a fork of transformers, and I am assuming that you have done so since you have made some changes to the internals, could you please point me to those changes if possible?
When trying to run
bash cifar10-fast/scripts/distributed_training_fish.sh 256 0.005 50 2 0.4 2
I get the error
ImportError: cannot import name 'MultiSameFisherMask' from 'fisher' (/Users/sebastian/Code/FisherInformation/FISH/cifar10-fast/fisher.py)
I believe the class MultiSameFisherMask doesn't exist in fisher.py, yet it is being imported here:
FISH/cifar10-fast/asgd_dawn.py
Line 6 in bfcdad8
Hi, thanks for the great work!
I found the fisher mask calculation for cifar experiments here, but I cannot find the counterpart code for nlp experiments. Could u please share a link to it? Thanks!
Hi,
I like the simplicity of the method and want to experiment it on CNN based model.
However the code you have is mostly for transformer based models.
I was curious to know if you have tried it on CNN based models like VGG16, PresNet & WideResNet ?
Thanks,
Amit
Hi, thanks for the great work!
I noticed that in both the paper and the released code, the fisher mask is calculated based on a randomly initialized linear layer. I am pretty surprised/shocked that this could actually lead to good performance in practice. Since the linear weights are randomly initialized, does that mean the resulting backpropagated gradients for the backbone are also random?
Just curious how do u think of this issue. Thanks!
Hi,
a errors happen at
, since there are not a file of generate_masks. Could you check this?A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.