huggingface / nn_pruning

Prune a model while finetuning or training.
Apache License 2.0
393 stars 57 forks source link

Applying Block Movement Pruning for BART #40

Open apurvnagvenkar opened 2 years ago

apurvnagvenkar commented 2 years ago

Hi, I am working to prune BART model for seq2seq purpose. Currently, I have replaced this code with BART based functionalities. After executing I am getting drop in number of parameters for both attention and FFN but dimension reduction happens only for FFN which results in slowness. My questions are following:

  1. Is this right code to refer to or should I follow this command_line.py?
  2. Is there any existing code which works for BART based models for Conditonal Generation or Seq2Seq?
robotsp commented 1 year ago

Hi, I am working to prune BART model for seq2seq purpose. Currently, I have replaced this code with BART based functionalities. After executing I am getting drop in number of parameters for both attention and FFN but dimension reduction happens only for FFN which results in slowness. My questions are following:

  1. Is this right code to refer to or should I follow this command_line.py?
  2. Is there any existing code which works for BART based models for Conditonal Generation or Seq2Seq?

I am doing the same thing as you. Did you fix the problem? @apurvnagvenkar