princeton-nlp / CoFiPruning

[ACL 2022] Structured Pruning Learns Compact and Accurate Models https://arxiv.org/abs/2204.00408
MIT License
188 stars 32 forks source link

Something wrong with run_FT.sh and data_dir #43

Open gaishun opened 1 year ago

gaishun commented 1 year ago

When I use run_FT.sh, only [task_name] and [EX_NAME_SUFFIX] need to input. I change the model_name_or_path to where the bert-base-uncased is.

Firstly, an error appeared: ValueError: Some specified arguments are not used by the HfArgumentParser: ['--data_dir', './datasets/RTE'] Checking the log, I find that the model will find datasets in cache, so I delete the argument 'data_dir'.

However, during pre-finetuning, the accuracy for dev is very small. In the evaluation output file, it is only 0.47, and I found the sparsity is 0.666.

Task: rte Model path: /home/ykw/cofi/out-test/RTE/RTE_test_RTE/ Model size: 28385280 Sparsity: 0.6659999999999999 accuracy: 0.4729 seconds/example: 0.00093

Why did the pre-finetune process prune the model? It even don't need to input a sparsity number. And the accuracy is really smaller than yours (0.70).