fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Is there any method can be used to prune translation model in fairseq?

Open robotsp opened this issue 2 years ago • 8 comments

❓ Questions and Help

Before asking:

  1. search the issues.
  2. search the docs.

What is your question?

Code

What have you tried?

What's your environment?

  • fairseq Version (e.g., 1.0 or main):
  • PyTorch Version (e.g., 1.0)
  • OS (e.g., Linux):
  • How you installed fairseq (pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

robotsp avatar Aug 23 '22 12:08 robotsp

I have similar question. Have you found a suitable method? prune or distill.

AIikai avatar Aug 26 '22 03:08 AIikai

I used the method from this issue, it worked for me https://github.com/facebookresearch/fairseq/issues/2120#issuecomment-647429120

tianshuailu avatar Aug 27 '22 15:08 tianshuailu

I used the method from this issue, it worked for me #2120 (comment)

I have similar question. Have you found a suitable method? prune or distill.

Not found yet..

robotsp avatar Aug 30 '22 12:08 robotsp

I used the method from this issue, it worked for me #2120 (comment)

@tianshuailu Cool, thanks! Are you familiar with microsoft nni ? Can we use it to prune fairseq model ?

robotsp avatar Aug 30 '22 12:08 robotsp

I used the method from this issue, it worked for me #2120 (comment)

@tianshuailu Cool, thanks! Are you familiar with microsoft nni ? Can we use it to prune fairseq model ?

Sorry, I'm not familiar with Microsoft nni, so not sure if it works

tianshuailu avatar Aug 30 '22 13:08 tianshuailu

I have similar question. Have you found a suitable method? prune or distill.

@tianshuailu Some pruning methods are introduced in torch. Not sure if it helps. https://pytorch.org/tutorials/intermediate/pruning_tutorial.html

robotsp avatar Aug 31 '22 07:08 robotsp

@tianshuailu hi tianshuai, do you know how to freeze parameters during finetuning in fairseq? I used both zero_grad and requires_grad to false are not working in fairseq train.

robotsp avatar Sep 08 '22 14:09 robotsp

@tianshuailu hi tianshuai, do you know how to freeze parameters during finetuning in fairseq? I used both zero_grad and requires_grad to false are not working in fairseq train.

Sorry I haven't tried to freeze the parameters for our project, so I dont know much about it.

tianshuailu avatar Sep 09 '22 11:09 tianshuailu