tensorflow / model-optimization

A toolkit to optimize ML models for deployment for Keras and TensorFlow, including quantization and pruning.
https://www.tensorflow.org/model_optimization
Apache License 2.0
1.49k stars 320 forks source link

pruning example code for GNMT #776

Open TaeheeJeong opened 3 years ago

TaeheeJeong commented 3 years ago

System information

Motivation

There is pruning result of GNMT EN-DE and GNMT DE-EN on https://blog.tensorflow.org/2019/05/tf-model-optimization-toolkit-pruning-API.html and https://www.tensorflow.org/model_optimization/guide/pruning.

However, I could not find any example code how to prune GNMT EN-DE or DE-EN.

Could you someone upload example code (tutorial) how to prune GNMT using pruning API?

I am interested in pruning Transformer and BERT models.

rino20 commented 3 years ago

Sorry, the example code is not available at this moment.

Btw, I cannot imagine any specific issue on applying Pruning API to GNMT model, so what about trying it similar to the guide in https://www.tensorflow.org/model_optimization/guide/pruning/pruning_with_keras ? (but with GNMT model)

If you need any further assistance, please let me know.