Giter Site home page Giter Site logo

retraining-free-pruning's People

Contributors

woosukkwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

retraining-free-pruning's Issues

About the speedup performance of the code

Hi @WoosukKwon , in your paper. You use the code outputs = model(head_mask=head_mask, **batch) to get the output. So model is the same model, we change the head_mask to do pruning right? But does it really save time? I mean we actually do all the forward of bert right? So we do not change the model architecture?

Many thanks!

dependency package versions

Hi, thanks for the great work! When I tried out to reproduce your work, some errors appeared. I suppose it due to the incorrect package versions. Could you specify the versions in the 'requirements.txt' file to help me out?

image

Question about the pruned model.

Hi @WoosukKwon,

Thanks for your excellent work.
I have a question about the smaller dense model, BertMHA and BertFFN in generate_lut.py are initialized via config, config = AutoConfig.from_pretrained(args.model_name), whether the args.model_name is the smaller dense model? If so, could you please point out how can I get the pruned model with redundant structure removed?

Looking for your reply!

Real-time inference results

Hi @WoosukKwon,

Thanks for your code and your help for my previous question. I have another question about the real-time inference speed.

Like shown in Fig.3 in paper, the efficiency has been improved. I am wondering if this figure is plotted using some python functions like "time.time()" to record the operation time consumption? or estimated by some calculation functions like "MAC" or "Latency" provided in this repo?

Thanks!

Missing datasets file?

Hi Woosuk!

Thanks for sharing your code! I tried to run the example script but got:

from datasets import load_dataset
ModuleNotFoundError: No module named 'datasets'

It looks like the 'datasets' file is missed? Could you please help with it?

Thanks!

Use your Code for other classification datasets

Hi,

I want to test your code for some of my models that are fine tuned to a german classification dataset. What would be your idea to get your code/results to work for other classification datasets with a different language?

Thank you very much in advice!

GLUE & SQuAD Metadata

GLUE Benchmark Metadata

Task MNLI QQP QNLI SST-2 CoLA STS-B MRPC RTE
Train set size 393K 364K 105K 67K 8.5K 7K 3.7K 2.5K
Dev set size 20K 40K 5.4K 0.8K 1K 1.5K 0.4K 0.3K
Test set size 20K 391K 5.4K 1.8K 1K 1.4K 1.7K 3K
Med. sequence length (train) 38 28 48 11 24 54 57
Med. sequence length (dev) 37 28 45 25 29 54 54

SQuAD Benchmark Metadata

Task SQuAD V1.1 SQuAD 2.0

GLUE dev set Evaluation time (in sec)

Task MNLI QQP QNLI SST-2 CoLA STS-B MRPC RTE
V100 (FP32, batch 128) 24.39 76.39 14.43 1.41 2.31 1.09

SQuAD Evaluation time (in sec)

Task SQuAD V1.1 SQuAD 2.0
V100 (FP32, batch 128) 110.11 115.59

Any experiments on NLG tasks?

Hi, I just notice only NLU tasks are exposed. I am wondering if there was or will be any generation tasks like LAMBDA/WIKITEXT?

why bert-base-uncased model set constraint to 0.5, qqp test accuracy only 0.3743

I download the bert-base-uncased from https://huggingface.co/bert-base-uncased
and I execute the main.py like the example

python3 main.py --model_name bert-base-uncased \
                --task_name qqp \
                --ckpt_dir <your HF ckpt directory> \
                --constraint 0.5

But I just get the qqp Test accuracy is only 0.3743

And the log like this
12/13/2022 08:27:08 - INFO - main - Pruned Model MAC: 50.00 %
12/13/2022 08:29:00 - INFO - main - qqp Pruning time (s): 133.1617510318756
12/13/2022 08:34:51 - INFO - main - qqp Test accuracy: 0.3743

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.