├── .gitignore ├── LICENSE ├── PostPruning.ipynb ├── README.md ├── pics └── overview.png ├── scripts ├── bert_base_uncased.json ├── glue │ ├── config_prunedistiller.py │ ├── main.py │ ├── predict_function.py │ ├── utils.py │ └── utils_glue.py ├── modeling_prunebert.py ├── pruners_and_distiller │ ├── distiller.py │ ├── pruners.py │ └── utils.py ├── run_glue.sh ├── run_squad.sh └── squad │ ├── config_prunedistiller.py │ ├── evaluate_squad.py │ ├── main.py │ └── utils.py ├── teacher_models ├── config.json └── vocab.txt └── textpruner ├── __init__.py ├── commands ├── __init__.py ├── functions.py ├── textpruner_cli.py └── utils.py ├── configurations.py ├── extentions ├── configurations.py └── pruner.py ├── model_map.py ├── model_utils ├── __init__.py ├── albert.py ├── bart.py ├── bert.py ├── electra.py ├── model_structure.py ├── mt5.py ├── roberta.py ├── t5.py ├── utils.py ├── xlm.py └── xlm_roberta.py ├── pruners ├── __init__.py ├── pipeline_pruner.py ├── transformer_pruner.py ├── utils.py └── vocabulary_pruner.py ├── tokenizer_utils ├── __init__.py ├── mt5_sp_tokenizer.py ├── roberta_gpt2_tokenizer.py ├── sp_tokenizer.py ├── subword_tokenizer.py ├── t5_sp_tokenizer.py ├── utils.py ├── xlm_tokenizer.py └── xlmr_sp_tokenizer.py └── utils.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/LICENSE -------------------------------------------------------------------------------- /PostPruning.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/PostPruning.ipynb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/README.md -------------------------------------------------------------------------------- /pics/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/pics/overview.png -------------------------------------------------------------------------------- /scripts/bert_base_uncased.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/bert_base_uncased.json -------------------------------------------------------------------------------- /scripts/glue/config_prunedistiller.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/glue/config_prunedistiller.py -------------------------------------------------------------------------------- /scripts/glue/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/glue/main.py -------------------------------------------------------------------------------- /scripts/glue/predict_function.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/glue/predict_function.py -------------------------------------------------------------------------------- /scripts/glue/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/glue/utils.py -------------------------------------------------------------------------------- /scripts/glue/utils_glue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/glue/utils_glue.py -------------------------------------------------------------------------------- /scripts/modeling_prunebert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/modeling_prunebert.py -------------------------------------------------------------------------------- /scripts/pruners_and_distiller/distiller.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/pruners_and_distiller/distiller.py -------------------------------------------------------------------------------- /scripts/pruners_and_distiller/pruners.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/pruners_and_distiller/pruners.py -------------------------------------------------------------------------------- /scripts/pruners_and_distiller/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/pruners_and_distiller/utils.py -------------------------------------------------------------------------------- /scripts/run_glue.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/run_glue.sh -------------------------------------------------------------------------------- /scripts/run_squad.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/run_squad.sh -------------------------------------------------------------------------------- /scripts/squad/config_prunedistiller.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/squad/config_prunedistiller.py -------------------------------------------------------------------------------- /scripts/squad/evaluate_squad.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/squad/evaluate_squad.py -------------------------------------------------------------------------------- /scripts/squad/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/squad/main.py -------------------------------------------------------------------------------- /scripts/squad/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/scripts/squad/utils.py -------------------------------------------------------------------------------- /teacher_models/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/teacher_models/config.json -------------------------------------------------------------------------------- /teacher_models/vocab.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/teacher_models/vocab.txt -------------------------------------------------------------------------------- /textpruner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/__init__.py -------------------------------------------------------------------------------- /textpruner/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /textpruner/commands/functions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/commands/functions.py -------------------------------------------------------------------------------- /textpruner/commands/textpruner_cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/commands/textpruner_cli.py -------------------------------------------------------------------------------- /textpruner/commands/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/commands/utils.py -------------------------------------------------------------------------------- /textpruner/configurations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/configurations.py -------------------------------------------------------------------------------- /textpruner/extentions/configurations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/extentions/configurations.py -------------------------------------------------------------------------------- /textpruner/extentions/pruner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/extentions/pruner.py -------------------------------------------------------------------------------- /textpruner/model_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_map.py -------------------------------------------------------------------------------- /textpruner/model_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/__init__.py -------------------------------------------------------------------------------- /textpruner/model_utils/albert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/albert.py -------------------------------------------------------------------------------- /textpruner/model_utils/bart.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/bart.py -------------------------------------------------------------------------------- /textpruner/model_utils/bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/bert.py -------------------------------------------------------------------------------- /textpruner/model_utils/electra.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/electra.py -------------------------------------------------------------------------------- /textpruner/model_utils/model_structure.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/model_structure.py -------------------------------------------------------------------------------- /textpruner/model_utils/mt5.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/mt5.py -------------------------------------------------------------------------------- /textpruner/model_utils/roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/roberta.py -------------------------------------------------------------------------------- /textpruner/model_utils/t5.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/t5.py -------------------------------------------------------------------------------- /textpruner/model_utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/utils.py -------------------------------------------------------------------------------- /textpruner/model_utils/xlm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/xlm.py -------------------------------------------------------------------------------- /textpruner/model_utils/xlm_roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/model_utils/xlm_roberta.py -------------------------------------------------------------------------------- /textpruner/pruners/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/pruners/__init__.py -------------------------------------------------------------------------------- /textpruner/pruners/pipeline_pruner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/pruners/pipeline_pruner.py -------------------------------------------------------------------------------- /textpruner/pruners/transformer_pruner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/pruners/transformer_pruner.py -------------------------------------------------------------------------------- /textpruner/pruners/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/pruners/utils.py -------------------------------------------------------------------------------- /textpruner/pruners/vocabulary_pruner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/pruners/vocabulary_pruner.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/__init__.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/mt5_sp_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/mt5_sp_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/roberta_gpt2_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/roberta_gpt2_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/sp_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/sp_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/subword_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/subword_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/t5_sp_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/t5_sp_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/utils.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/xlm_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/xlm_tokenizer.py -------------------------------------------------------------------------------- /textpruner/tokenizer_utils/xlmr_sp_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/tokenizer_utils/xlmr_sp_tokenizer.py -------------------------------------------------------------------------------- /textpruner/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airaria/GRAIN/HEAD/textpruner/utils.py --------------------------------------------------------------------------------