From 7e406f4a65727baf8e22ae922f410224cde99ed6 Mon Sep 17 00:00:00 2001 From: Tommy Chiang Date: Mon, 10 May 2021 13:46:48 +0800 Subject: [PATCH] [Examples] Fix invalid links after reorg (#11650) --- examples/legacy/token-classification/README.md | 2 +- examples/pytorch/text-classification/README.md | 4 ++-- examples/pytorch/text-generation/README.md | 3 ++- examples/research_projects/mm-imdb/README.md | 2 +- examples/research_projects/movement-pruning/README.md | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/legacy/token-classification/README.md b/examples/legacy/token-classification/README.md index e484f332f..b17997d86 100644 --- a/examples/legacy/token-classification/README.md +++ b/examples/legacy/token-classification/README.md @@ -1,6 +1,6 @@ ## Token classification -Based on the scripts [`run_ner.py`](https://github.com/huggingface/transformers/blob/master/examples/contrib/legacy/token-classification/run_ner.py). +Based on the scripts [`run_ner.py`](https://github.com/huggingface/transformers/blob/master/examples/legacy/token-classification/run_ner.py). The following examples are covered in this section: diff --git a/examples/pytorch/text-classification/README.md b/examples/pytorch/text-classification/README.md index 3952dd0fa..fac7b0eb4 100644 --- a/examples/pytorch/text-classification/README.md +++ b/examples/pytorch/text-classification/README.md @@ -18,7 +18,7 @@ limitations under the License. ## GLUE tasks -Based on the script [`run_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_glue.py). +Based on the script [`run_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/pytorch/text-classification/run_glue.py). Fine-tuning the library models for sequence classification on the GLUE benchmark: [General Language Understanding Evaluation](https://gluebenchmark.com/). This script can fine-tune any of the models on the [hub](https://huggingface.co/models) @@ -87,7 +87,7 @@ Using mixed precision training usually results in 2x-speedup for training with t ## PyTorch version, no Trainer -Based on the script [`run_glue_no_trainer.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_glue_no_trainer.py). +Based on the script [`run_glue_no_trainer.py`](https://github.com/huggingface/transformers/blob/master/examples/pytorch/text-classification/run_glue_no_trainer.py). Like `run_glue.py`, this script allows you to fine-tune any of the models on the [hub](https://huggingface.co/models) on a text classification task, either a GLUE task or your own data in a csv or a JSON file. The main difference is that this diff --git a/examples/pytorch/text-generation/README.md b/examples/pytorch/text-generation/README.md index 4e68b126e..1c4351e0a 100644 --- a/examples/pytorch/text-generation/README.md +++ b/examples/pytorch/text-generation/README.md @@ -16,7 +16,8 @@ limitations under the License. ## Language generation -Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/text-generation/run_generation.py). +Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/pytorch +/text-generation/run_generation.py). Conditional text generation using the auto-regressive models of the library: GPT, GPT-2, Transformer-XL, XLNet, CTRL. A similar script is used for our official demo [Write With Transfomer](https://transformer.huggingface.co), where you diff --git a/examples/research_projects/mm-imdb/README.md b/examples/research_projects/mm-imdb/README.md index eeef3a2cc..bbd93cfd2 100644 --- a/examples/research_projects/mm-imdb/README.md +++ b/examples/research_projects/mm-imdb/README.md @@ -1,6 +1,6 @@ ## MM-IMDb -Based on the script [`run_mmimdb.py`](https://github.com/huggingface/transformers/blob/master/examples/contrib/mm-imdb/run_mmimdb.py). +Based on the script [`run_mmimdb.py`](https://github.com/huggingface/transformers/blob/master/examples/research_projects/mm-imdb/run_mmimdb.py). [MM-IMDb](http://lisi1.unal.edu.co/mmimdb/) is a Multimodal dataset with around 26,000 movies including images, plots and other metadata. diff --git a/examples/research_projects/movement-pruning/README.md b/examples/research_projects/movement-pruning/README.md index 38c11c015..07742bef0 100644 --- a/examples/research_projects/movement-pruning/README.md +++ b/examples/research_projects/movement-pruning/README.md @@ -23,7 +23,7 @@ You can also have a look at this fun *Explain Like I'm Five* introductory [slide One promise of extreme pruning is to obtain extremely small models that can be easily sent (and stored) on edge devices. By setting weights to 0., we reduce the amount of information we need to store, and thus decreasing the memory size. We are able to obtain extremely sparse fine-pruned models with movement pruning: ~95% of the dense performance with ~5% of total remaining weights in the BERT encoder. -In [this notebook](https://github.com/huggingface/transformers/blob/master/examples/movement-pruning/Saving_PruneBERT.ipynb), we showcase how we can leverage standard tools that exist out-of-the-box to efficiently store an extremely sparse question answering model (only 6% of total remaining weights in the encoder). We are able to reduce the memory size of the encoder **from the 340MB (the original dense BERT) to 11MB**, without any additional training of the model (every operation is performed *post fine-pruning*). It is sufficiently small to store it on a [91' floppy disk](https://en.wikipedia.org/wiki/Floptical) 📎! +In [this notebook](https://github.com/huggingface/transformers/blob/master/examples/research_projects/movement-pruning/Saving_PruneBERT.ipynb), we showcase how we can leverage standard tools that exist out-of-the-box to efficiently store an extremely sparse question answering model (only 6% of total remaining weights in the encoder). We are able to reduce the memory size of the encoder **from the 340MB (the original dense BERT) to 11MB**, without any additional training of the model (every operation is performed *post fine-pruning*). It is sufficiently small to store it on a [91' floppy disk](https://en.wikipedia.org/wiki/Floptical) 📎! While movement pruning does not directly optimize for memory footprint (but rather the number of non-null weights), we hypothetize that further memory compression ratios can be achieved with specific quantization aware trainings (see for instance [Q8BERT](https://arxiv.org/abs/1910.06188), [And the Bit Goes Down](https://arxiv.org/abs/1907.05686) or [Quant-Noise](https://arxiv.org/abs/2004.07320)).