From c99fe0386be118bceaab1c85cdb8309eb8cb8208 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Thu, 7 May 2020 18:44:18 -0400 Subject: [PATCH] [doc] Fix broken links + remove crazy big notebook --- README.md | 6 +++--- docs/source/bertology.rst | 2 +- docs/source/examples.md | 14 +++++++------- docs/source/main_classes/processors.rst | 4 ++-- docs/source/model_doc/xlnet.rst | 2 +- docs/source/multilingual.rst | 2 +- examples/README.md | 2 +- examples/distillation/run_squad_w_distillation.py | 2 +- examples/language-modeling/README.md | 2 +- examples/multiple-choice/README.md | 2 +- examples/question-answering/README.md | 4 ++-- examples/text-classification/README.md | 4 ++-- examples/text-generation/README.md | 2 +- examples/text-generation/pplm/run_pplm.py | 4 ++-- .../fmikaelian/camembert-base-fquad/README.md | 2 +- .../fmikaelian/camembert-base-squad/README.md | 2 +- .../flaubert-base-uncased-squad/README.md | 2 +- .../albert-xlarge-v2-squad-v2/README.md | 2 +- .../biobert_v1.1_pubmed_squad_v2/README.md | 2 +- .../scibert_scivocab_uncased_squad_v2/README.md | 2 +- .../mrm8488/GPT-2-finetuned-CORD19/README.md | 2 +- .../GPT-2-finetuned-covid-bio-medrxiv/README.md | 2 +- .../README.md | 2 +- .../README.md | 2 +- .../bert-medium-finetuned-squadv2/README.md | 2 +- .../mrm8488/bert-mini-finetuned-squadv2/README.md | 2 +- .../mrm8488/bert-small-finetuned-squadv2/README.md | 2 +- .../bert-small-finetuned-typo-detection/README.md | 2 +- .../bert-spanish-cased-finetuned-ner/README.md | 2 +- .../README.md | 2 +- .../bert-spanish-cased-finetuned-pos/README.md | 2 +- .../mrm8488/bert-tiny-finetuned-squadv2/README.md | 2 +- .../README.md | 2 +- .../README.md | 2 +- .../mrm8488/spanbert-finetuned-squadv1/README.md | 2 +- .../mrm8488/spanbert-finetuned-squadv2/README.md | 2 +- src/transformers/modeling_albert.py | 2 +- src/transformers/modeling_roberta.py | 2 +- src/transformers/modeling_tf_albert.py | 2 +- src/transformers/modeling_tf_roberta.py | 2 +- 40 files changed, 52 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 80b0b772c9..3945132b2b 100644 --- a/README.md +++ b/README.md @@ -414,7 +414,7 @@ Training with these hyper-parameters gave us the following results: This example code fine-tunes BERT on the SQuAD dataset using distributed training on 8 V100 GPUs and Bert Whole Word Masking uncased model to reach a F1 > 93 on SQuAD: ```bash -python -m torch.distributed.launch --nproc_per_node=8 ./examples/run_squad.py \ +python -m torch.distributed.launch --nproc_per_node=8 ./examples/question-answering/run_squad.py \ --model_type bert \ --model_name_or_path bert-large-uncased-whole-word-masking \ --do_train \ @@ -447,7 +447,7 @@ The generation script includes the [tricks](https://github.com/rusiaaman/XLNet-g Here is how to run the script with the small version of OpenAI GPT-2 model: ```shell -python ./examples/run_generation.py \ +python ./examples/text-generation/run_generation.py \ --model_type=gpt2 \ --length=20 \ --model_name_or_path=gpt2 \ @@ -455,7 +455,7 @@ python ./examples/run_generation.py \ and from the Salesforce CTRL model: ```shell -python ./examples/run_generation.py \ +python ./examples/text-generation/run_generation.py \ --model_type=ctrl \ --length=20 \ --model_name_or_path=ctrl \ diff --git a/docs/source/bertology.rst b/docs/source/bertology.rst index 59158ca279..e1ebda78d6 100644 --- a/docs/source/bertology.rst +++ b/docs/source/bertology.rst @@ -15,4 +15,4 @@ In order to help this new field develop, we have included a few additional featu * accessing all the attention weights for each head of BERT/GPT/GPT-2, * retrieving heads output values and gradients to be able to compute head importance score and prune head as explained in https://arxiv.org/abs/1905.10650. -To help you understand and use these features, we have added a specific example script: `bertology.py `_ while extract information and prune a model pre-trained on GLUE. +To help you understand and use these features, we have added a specific example script: `bertology.py `_ while extract information and prune a model pre-trained on GLUE. diff --git a/docs/source/examples.md b/docs/source/examples.md index c5d0e79a49..6679cb71a6 100644 --- a/docs/source/examples.md +++ b/docs/source/examples.md @@ -29,7 +29,7 @@ pip install -r ./examples/requirements.txt ## TensorFlow 2.0 Bert models on GLUE -Based on the script [`run_tf_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/run_tf_glue.py). +Based on the script [`run_tf_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_tf_glue.py). Fine-tuning the library TensorFlow 2.0 Bert model for sequence classification on the MRPC task of the GLUE benchmark: [General Language Understanding Evaluation](https://gluebenchmark.com/). @@ -93,7 +93,7 @@ python run_glue_tpu.py \ ## Language model training -Based on the script [`run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/run_language_modeling.py). +Based on the script [`run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py). Fine-tuning (or training from scratch) the library models for language modeling on a text dataset for GPT, GPT-2, BERT and RoBERTa (DistilBERT to be added soon). GPT and GPT-2 are fine-tuned using a causal language modeling (CLM) loss while BERT and RoBERTa @@ -155,7 +155,7 @@ python run_language_modeling.py \ ## Language generation -Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/run_generation.py). +Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/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 @@ -364,7 +364,7 @@ Download [swag](https://github.com/rowanz/swagaf/tree/master/data) data ```bash #training on 4 tesla V100(16GB) GPUS export SWAG_DIR=/path/to/swag_data_dir -python ./examples/run_multiple_choice.py \ +python ./examples/multiple-choice/run_multiple_choice.py \ --task_name swag \ --model_name_or_path roberta-base \ --do_train \ @@ -388,7 +388,7 @@ eval_loss = 0.44457291918821606 ## SQuAD -Based on the script [`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py). +Based on the script [`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py). #### Fine-tuning BERT on SQuAD1.0 @@ -437,7 +437,7 @@ exact_match = 81.22 Here is an example using distributed training on 8 V100 GPUs and Bert Whole Word Masking uncased model to reach a F1 > 93 on SQuAD1.1: ```bash -python -m torch.distributed.launch --nproc_per_node=8 ./examples/run_squad.py \ +python -m torch.distributed.launch --nproc_per_node=8 ./examples/question-answering/run_squad.py \ --model_type bert \ --model_name_or_path bert-large-uncased-whole-word-masking \ --do_train \ @@ -548,7 +548,7 @@ Larger batch size may improve the performance while costing more memory. ## XNLI -Based on the script [`run_xnli.py`](https://github.com/huggingface/transformers/blob/master/examples/run_xnli.py). +Based on the script [`run_xnli.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_xnli.py). [XNLI](https://www.nyu.edu/projects/bowman/xnli/) is crowd-sourced dataset based on [MultiNLI](http://www.nyu.edu/projects/bowman/multinli/). It is an evaluation benchmark for cross-lingual text representations. Pairs of text are labeled with textual entailment annotations for 15 different languages (including both high-resource language such as English and low-resource languages such as Swahili). diff --git a/docs/source/main_classes/processors.rst b/docs/source/main_classes/processors.rst index 6452c601be..0e318eff07 100644 --- a/docs/source/main_classes/processors.rst +++ b/docs/source/main_classes/processors.rst @@ -74,7 +74,7 @@ This library hosts the processor to load the XNLI data: Please note that since the gold labels are available on the test set, evaluation is performed on the test set. An example using these processors is given in the -`run_xnli.py `__ script. +`run_xnli.py `__ script. SQuAD @@ -150,4 +150,4 @@ Example:: Another example using these processors is given in the -`run_squad.py `__ script. +`run_squad.py `__ script. diff --git a/docs/source/model_doc/xlnet.rst b/docs/source/model_doc/xlnet.rst index 1b80bd248f..dff63aa9da 100644 --- a/docs/source/model_doc/xlnet.rst +++ b/docs/source/model_doc/xlnet.rst @@ -29,7 +29,7 @@ Tips: XLNet is pretrained using only a sub-set of the output tokens as target which are selected with the `target_mapping` input. - To use XLNet for sequential decoding (i.e. not in fully bi-directional setting), use the `perm_mask` and - `target_mapping` inputs to control the attention span and outputs (see examples in `examples/run_generation.py`) + `target_mapping` inputs to control the attention span and outputs (see examples in `examples/text-generation/run_generation.py`) - XLNet is one of the few models that has no sequence length limit. The original code can be found `here `_. diff --git a/docs/source/multilingual.rst b/docs/source/multilingual.rst index dc68a69b52..455df2dcb4 100644 --- a/docs/source/multilingual.rst +++ b/docs/source/multilingual.rst @@ -80,7 +80,7 @@ You can then feed it all as input to your model: outputs = model(input_ids, langs=langs) -The example `run_generation.py `__ +The example `run_generation.py `__ can generate text using the CLM checkpoints from XLM, using the language embeddings. XLM without Language Embeddings diff --git a/examples/README.md b/examples/README.md index 8c774f8286..b42e0cd534 100644 --- a/examples/README.md +++ b/examples/README.md @@ -17,7 +17,7 @@ This is still a work-in-progress – in particular documentation is still sparse | Task | Example datasets | Trainer support | TFTrainer support | pytorch-lightning | Colab | One-click Deploy to Azure (wip) | |---|---|:---:|:---:|:---:|:---:|:---:| | [`language-modeling`](./language-modeling) | Raw text | ✅ | - | - | - | - | -| [`text-classification`](./text-classification) | GLUE, XNLI | ✅ | ✅ | ✅ | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/transformers/blob/master/notebooks/trainer/01_text_classification.ipynb) | [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-storage-account-create%2Fazuredeploy.json) | +| [`text-classification`](./text-classification) | GLUE, XNLI | ✅ | ✅ | ✅ | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/trainer/01_text_classification.ipynb) | [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-storage-account-create%2Fazuredeploy.json) | | [`token-classification`](./token-classification) | CoNLL NER | ✅ | ✅ | ✅ | - | - | | [`multiple-choice`](./multiple-choice) | SWAG, RACE, ARC | ✅ | - | - | - | - | diff --git a/examples/distillation/run_squad_w_distillation.py b/examples/distillation/run_squad_w_distillation.py index 3fabe23ba2..12a5f3f175 100644 --- a/examples/distillation/run_squad_w_distillation.py +++ b/examples/distillation/run_squad_w_distillation.py @@ -13,7 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""" This is the exact same script as `examples/run_squad.py` (as of 2020, January 8th) with an additional and optional step of distillation.""" +""" This is the exact same script as `examples/question-answering/run_squad.py` (as of 2020, January 8th) with an additional and optional step of distillation.""" import argparse import glob diff --git a/examples/language-modeling/README.md b/examples/language-modeling/README.md index e2dc600e09..130bbe880d 100644 --- a/examples/language-modeling/README.md +++ b/examples/language-modeling/README.md @@ -1,7 +1,7 @@ ## Language model training -Based on the script [`run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/run_language_modeling.py). +Based on the script [`run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py). Fine-tuning (or training from scratch) the library models for language modeling on a text dataset for GPT, GPT-2, BERT and RoBERTa (DistilBERT to be added soon). GPT and GPT-2 are fine-tuned using a causal language modeling (CLM) loss while BERT and RoBERTa diff --git a/examples/multiple-choice/README.md b/examples/multiple-choice/README.md index 34721daf83..469724be4b 100644 --- a/examples/multiple-choice/README.md +++ b/examples/multiple-choice/README.md @@ -8,7 +8,7 @@ Download [swag](https://github.com/rowanz/swagaf/tree/master/data) data ```bash #training on 4 tesla V100(16GB) GPUS export SWAG_DIR=/path/to/swag_data_dir -python ./examples/run_multiple_choice.py \ +python ./examples/multiple-choice/run_multiple_choice.py \ --task_name swag \ --model_name_or_path roberta-base \ --do_train \ diff --git a/examples/question-answering/README.md b/examples/question-answering/README.md index 715a33caa5..a9d67125f7 100644 --- a/examples/question-answering/README.md +++ b/examples/question-answering/README.md @@ -2,7 +2,7 @@ ## SQuAD -Based on the script [`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py). +Based on the script [`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py). #### Fine-tuning BERT on SQuAD1.0 @@ -51,7 +51,7 @@ exact_match = 81.22 Here is an example using distributed training on 8 V100 GPUs and Bert Whole Word Masking uncased model to reach a F1 > 93 on SQuAD1.1: ```bash -python -m torch.distributed.launch --nproc_per_node=8 ./examples/run_squad.py \ +python -m torch.distributed.launch --nproc_per_node=8 ./examples/question-answering/run_squad.py \ --model_type bert \ --model_name_or_path bert-large-uncased-whole-word-masking \ --do_train \ diff --git a/examples/text-classification/README.md b/examples/text-classification/README.md index d1f6704c86..3e2679b344 100644 --- a/examples/text-classification/README.md +++ b/examples/text-classification/README.md @@ -2,7 +2,7 @@ # Run TensorFlow 2.0 version -Based on the script [`run_tf_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/run_tf_glue.py). +Based on the script [`run_tf_glue.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_tf_glue.py). Fine-tuning the library TensorFlow 2.0 Bert model for sequence classification on the MRPC task of the GLUE benchmark: [General Language Understanding Evaluation](https://gluebenchmark.com/). @@ -256,7 +256,7 @@ TEST RESULTS {'val_loss': tensor(0.0707), 'precision': 0.852427800698191, 'recal # XNLI -Based on the script [`run_xnli.py`](https://github.com/huggingface/transformers/blob/master/examples/run_xnli.py). +Based on the script [`run_xnli.py`](https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_xnli.py). [XNLI](https://www.nyu.edu/projects/bowman/xnli/) is crowd-sourced dataset based on [MultiNLI](http://www.nyu.edu/projects/bowman/multinli/). It is an evaluation benchmark for cross-lingual text representations. Pairs of text are labeled with textual entailment annotations for 15 different languages (including both high-resource language such as English and low-resource languages such as Swahili). diff --git a/examples/text-generation/README.md b/examples/text-generation/README.md index 4549e538b9..d164993487 100644 --- a/examples/text-generation/README.md +++ b/examples/text-generation/README.md @@ -1,6 +1,6 @@ ## Language generation -Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/run_generation.py). +Based on the script [`run_generation.py`](https://github.com/huggingface/transformers/blob/master/examples/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/text-generation/pplm/run_pplm.py b/examples/text-generation/pplm/run_pplm.py index b334a0098c..73f2c3a6f6 100644 --- a/examples/text-generation/pplm/run_pplm.py +++ b/examples/text-generation/pplm/run_pplm.py @@ -17,10 +17,10 @@ """ Example command with bag of words: -python examples/run_pplm.py -B space --cond_text "The president" --length 100 --gamma 1.5 --num_iterations 3 --num_samples 10 --stepsize 0.01 --window_length 5 --kl_scale 0.01 --gm_scale 0.95 +python run_pplm.py -B space --cond_text "The president" --length 100 --gamma 1.5 --num_iterations 3 --num_samples 10 --stepsize 0.01 --window_length 5 --kl_scale 0.01 --gm_scale 0.95 Example command with discriminator: -python examples/run_pplm.py -D sentiment --class_label 3 --cond_text "The lake" --length 10 --gamma 1.0 --num_iterations 30 --num_samples 10 --stepsize 0.01 --kl_scale 0.01 --gm_scale 0.95 +python run_pplm.py -D sentiment --class_label 3 --cond_text "The lake" --length 10 --gamma 1.0 --num_iterations 30 --num_samples 10 --stepsize 0.01 --kl_scale 0.01 --gm_scale 0.95 """ import argparse diff --git a/model_cards/fmikaelian/camembert-base-fquad/README.md b/model_cards/fmikaelian/camembert-base-fquad/README.md index e37e3fa4a3..41c886e939 100644 --- a/model_cards/fmikaelian/camembert-base-fquad/README.md +++ b/model_cards/fmikaelian/camembert-base-fquad/README.md @@ -11,7 +11,7 @@ A baseline model for question-answering in french ([CamemBERT](https://camembert ## Training hyperparameters ```shell -python3 ./examples/run_squad.py \ +python3 ./examples/question-answering/run_squad.py \ --model_type camembert \ --model_name_or_path camembert-base \ --do_train \ diff --git a/model_cards/fmikaelian/camembert-base-squad/README.md b/model_cards/fmikaelian/camembert-base-squad/README.md index a6c9f54374..e15a51549b 100644 --- a/model_cards/fmikaelian/camembert-base-squad/README.md +++ b/model_cards/fmikaelian/camembert-base-squad/README.md @@ -11,7 +11,7 @@ A baseline model for question-answering in french ([CamemBERT](https://camembert ## Training hyperparameters ```shell -python3 ./examples/run_squad.py \ +python3 ./examples/question-answering/run_squad.py \ --model_type camembert \ --model_name_or_path camembert-base \ --do_train \ diff --git a/model_cards/fmikaelian/flaubert-base-uncased-squad/README.md b/model_cards/fmikaelian/flaubert-base-uncased-squad/README.md index fd7f5d9613..f86355b972 100644 --- a/model_cards/fmikaelian/flaubert-base-uncased-squad/README.md +++ b/model_cards/fmikaelian/flaubert-base-uncased-squad/README.md @@ -11,7 +11,7 @@ A baseline model for question-answering in french ([flaubert](https://github.com ## Training hyperparameters ```shell -python3 ./examples/run_squad.py \ +python3 ./examples/question-answering/run_squad.py \ --model_type flaubert \ --model_name_or_path flaubert-base-uncased \ --do_train \ diff --git a/model_cards/ktrapeznikov/albert-xlarge-v2-squad-v2/README.md b/model_cards/ktrapeznikov/albert-xlarge-v2-squad-v2/README.md index 33bb4e18a2..dbed07c6a2 100644 --- a/model_cards/ktrapeznikov/albert-xlarge-v2-squad-v2/README.md +++ b/model_cards/ktrapeznikov/albert-xlarge-v2-squad-v2/README.md @@ -1,5 +1,5 @@ ### Model -**[`albert-xlarge-v2`](https://huggingface.co/albert-xlarge-v2)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py)** +**[`albert-xlarge-v2`](https://huggingface.co/albert-xlarge-v2)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py)** ### Training Parameters Trained on 4 NVIDIA GeForce RTX 2080 Ti 11Gb diff --git a/model_cards/ktrapeznikov/biobert_v1.1_pubmed_squad_v2/README.md b/model_cards/ktrapeznikov/biobert_v1.1_pubmed_squad_v2/README.md index 2f4c081dc3..da3e4e33fa 100644 --- a/model_cards/ktrapeznikov/biobert_v1.1_pubmed_squad_v2/README.md +++ b/model_cards/ktrapeznikov/biobert_v1.1_pubmed_squad_v2/README.md @@ -1,5 +1,5 @@ ### Model -**[`monologg/biobert_v1.1_pubmed`](https://huggingface.co/monologg/biobert_v1.1_pubmed)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py)** +**[`monologg/biobert_v1.1_pubmed`](https://huggingface.co/monologg/biobert_v1.1_pubmed)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py)** This model is cased. diff --git a/model_cards/ktrapeznikov/scibert_scivocab_uncased_squad_v2/README.md b/model_cards/ktrapeznikov/scibert_scivocab_uncased_squad_v2/README.md index b368750138..75527a2a5a 100644 --- a/model_cards/ktrapeznikov/scibert_scivocab_uncased_squad_v2/README.md +++ b/model_cards/ktrapeznikov/scibert_scivocab_uncased_squad_v2/README.md @@ -1,5 +1,5 @@ ### Model -**[`allenai/scibert_scivocab_uncased`](https://huggingface.co/allenai/scibert_scivocab_uncased)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py)** +**[`allenai/scibert_scivocab_uncased`](https://huggingface.co/allenai/scibert_scivocab_uncased)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_squad.py`](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py)** ### Training Parameters Trained on 4 NVIDIA GeForce RTX 2080 Ti 11Gb diff --git a/model_cards/mrm8488/GPT-2-finetuned-CORD19/README.md b/model_cards/mrm8488/GPT-2-finetuned-CORD19/README.md index 6d128d82d7..b72fd91e19 100644 --- a/model_cards/mrm8488/GPT-2-finetuned-CORD19/README.md +++ b/model_cards/mrm8488/GPT-2-finetuned-CORD19/README.md @@ -40,7 +40,7 @@ python run_language_modeling.py \ ## Model in action / Example of usage ✒ -You can get the following script [here](https://github.com/huggingface/transformers/blob/master/examples/run_generation.py) +You can get the following script [here](https://github.com/huggingface/transformers/blob/master/examples/text-generation/run_generation.py) ```bash python run_generation.py \ diff --git a/model_cards/mrm8488/GPT-2-finetuned-covid-bio-medrxiv/README.md b/model_cards/mrm8488/GPT-2-finetuned-covid-bio-medrxiv/README.md index cb0251c5a6..4d61cdacc9 100644 --- a/model_cards/mrm8488/GPT-2-finetuned-covid-bio-medrxiv/README.md +++ b/model_cards/mrm8488/GPT-2-finetuned-covid-bio-medrxiv/README.md @@ -37,7 +37,7 @@ python run_language_modeling.py \ ## Model in action / Example of usage: ✒ -You can get the following script [here](https://github.com/huggingface/transformers/blob/master/examples/run_generation.py) +You can get the following script [here](https://github.com/huggingface/transformers/blob/master/examples/text-generation/run_generation.py) ```bash python run_generation.py \ diff --git a/model_cards/mrm8488/TinyBERT-spanish-uncased-finetuned-ner/README.md b/model_cards/mrm8488/TinyBERT-spanish-uncased-finetuned-ner/README.md index 9727488ba2..3661fa6f3b 100644 --- a/model_cards/mrm8488/TinyBERT-spanish-uncased-finetuned-ner/README.md +++ b/model_cards/mrm8488/TinyBERT-spanish-uncased-finetuned-ner/README.md @@ -19,7 +19,7 @@ I preprocessed the dataset and splitted it as train / dev (80/20) | Dev | 2.2 K | -- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) +- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) - Labels covered: diff --git a/model_cards/mrm8488/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es/README.md b/model_cards/mrm8488/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es/README.md index 9128b87d0c..a74f37546e 100644 --- a/model_cards/mrm8488/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es/README.md +++ b/model_cards/mrm8488/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es/README.md @@ -29,7 +29,7 @@ The model was trained on a Tesla P100 GPU and 25GB of RAM with the following com ```bash export SQUAD_DIR=path/to/nl_squad -python transformers/examples/run_squad.py \ +python transformers/examples/question-answering/run_squad.py \ --model_type bert \ --model_name_or_path dccuchile/bert-base-spanish-wwm-cased \ --do_train \ diff --git a/model_cards/mrm8488/bert-medium-finetuned-squadv2/README.md b/model_cards/mrm8488/bert-medium-finetuned-squadv2/README.md index 83b4ed61f5..de9089fa65 100644 --- a/model_cards/mrm8488/bert-medium-finetuned-squadv2/README.md +++ b/model_cards/mrm8488/bert-medium-finetuned-squadv2/README.md @@ -29,7 +29,7 @@ The smaller BERT models are intended for environments with restricted computatio ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/model_cards/mrm8488/bert-mini-finetuned-squadv2/README.md b/model_cards/mrm8488/bert-mini-finetuned-squadv2/README.md index b36fb7e9b0..08321a2bcd 100644 --- a/model_cards/mrm8488/bert-mini-finetuned-squadv2/README.md +++ b/model_cards/mrm8488/bert-mini-finetuned-squadv2/README.md @@ -29,7 +29,7 @@ The smaller BERT models are intended for environments with restricted computatio ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/model_cards/mrm8488/bert-small-finetuned-squadv2/README.md b/model_cards/mrm8488/bert-small-finetuned-squadv2/README.md index 53175d3078..d426ca3b01 100644 --- a/model_cards/mrm8488/bert-small-finetuned-squadv2/README.md +++ b/model_cards/mrm8488/bert-small-finetuned-squadv2/README.md @@ -29,7 +29,7 @@ The smaller BERT models are intended for environments with restricted computatio ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/model_cards/mrm8488/bert-small-finetuned-typo-detection/README.md b/model_cards/mrm8488/bert-small-finetuned-typo-detection/README.md index 242894d75b..75728667eb 100644 --- a/model_cards/mrm8488/bert-small-finetuned-typo-detection/README.md +++ b/model_cards/mrm8488/bert-small-finetuned-typo-detection/README.md @@ -11,7 +11,7 @@ thumbnail: - Dataset: [GitHub Typo Corpus](https://github.com/mhagiwara/github-typo-corpus) 📚 -- [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) 🏋️‍♂️ +- [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) 🏋️‍♂️ ## Metrics on test set 📋 diff --git a/model_cards/mrm8488/bert-spanish-cased-finetuned-ner/README.md b/model_cards/mrm8488/bert-spanish-cased-finetuned-ner/README.md index e042be5de9..56ea483cb8 100644 --- a/model_cards/mrm8488/bert-spanish-cased-finetuned-ner/README.md +++ b/model_cards/mrm8488/bert-spanish-cased-finetuned-ner/README.md @@ -19,7 +19,7 @@ I preprocessed the dataset and splitted it as train / dev (80/20) | Dev | 2.2 K | -- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) +- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) - Labels covered: diff --git a/model_cards/mrm8488/bert-spanish-cased-finetuned-pos-syntax/README.md b/model_cards/mrm8488/bert-spanish-cased-finetuned-pos-syntax/README.md index 0ee382d9ed..a4b8805084 100644 --- a/model_cards/mrm8488/bert-spanish-cased-finetuned-pos-syntax/README.md +++ b/model_cards/mrm8488/bert-spanish-cased-finetuned-pos-syntax/README.md @@ -11,7 +11,7 @@ This model is a fine-tuned version of the Spanish BERT [(BETO)](https://github.c - [Dataset: CONLL Corpora ES](https://www.kaggle.com/nltkdata/conll-corpora) -#### [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) +#### [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) #### 21 Syntax annotations (Labels) covered: diff --git a/model_cards/mrm8488/bert-spanish-cased-finetuned-pos/README.md b/model_cards/mrm8488/bert-spanish-cased-finetuned-pos/README.md index 6c3cb8386f..fe539c89a3 100644 --- a/model_cards/mrm8488/bert-spanish-cased-finetuned-pos/README.md +++ b/model_cards/mrm8488/bert-spanish-cased-finetuned-pos/README.md @@ -19,7 +19,7 @@ I preprocessed the dataset and splitted it as train / dev (80/20) | Dev | 50 K | -- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) +- [Fine-tune on NER script provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) - **60** Labels covered: diff --git a/model_cards/mrm8488/bert-tiny-finetuned-squadv2/README.md b/model_cards/mrm8488/bert-tiny-finetuned-squadv2/README.md index d7312adddd..1b1ef3557e 100644 --- a/model_cards/mrm8488/bert-tiny-finetuned-squadv2/README.md +++ b/model_cards/mrm8488/bert-tiny-finetuned-squadv2/README.md @@ -29,7 +29,7 @@ The smaller BERT models are intended for environments with restricted computatio ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/model_cards/mrm8488/distilbert-base-multi-cased-finetuned-typo-detection/README.md b/model_cards/mrm8488/distilbert-base-multi-cased-finetuned-typo-detection/README.md index 5daec9d867..354a25df84 100644 --- a/model_cards/mrm8488/distilbert-base-multi-cased-finetuned-typo-detection/README.md +++ b/model_cards/mrm8488/distilbert-base-multi-cased-finetuned-typo-detection/README.md @@ -11,7 +11,7 @@ thumbnail: - Dataset: [GitHub Typo Corpus](https://github.com/mhagiwara/github-typo-corpus) 📚 for 15 languages -- [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/run_ner.py) 🏋️‍♂️ +- [Fine-tune script on NER dataset provided by Huggingface](https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py) 🏋️‍♂️ ## Metrics on test set 📋 diff --git a/model_cards/mrm8488/distilbert-multi-finetuned-for-xqua-on-tydiqa/README.md b/model_cards/mrm8488/distilbert-multi-finetuned-for-xqua-on-tydiqa/README.md index 67e0477170..509ca53f8b 100644 --- a/model_cards/mrm8488/distilbert-multi-finetuned-for-xqua-on-tydiqa/README.md +++ b/model_cards/mrm8488/distilbert-multi-finetuned-for-xqua-on-tydiqa/README.md @@ -31,7 +31,7 @@ The model was fine-tuned on a Tesla P100 GPU and 25GB of RAM. The script is the following: ```python -python transformers/examples/run_squad.py \ +python transformers/examples/question-answering/run_squad.py \ --model_type distilbert \ --model_name_or_path distilbert-base-multilingual-cased \ --do_train \ diff --git a/model_cards/mrm8488/spanbert-finetuned-squadv1/README.md b/model_cards/mrm8488/spanbert-finetuned-squadv1/README.md index 14778e6231..044c623319 100644 --- a/model_cards/mrm8488/spanbert-finetuned-squadv1/README.md +++ b/model_cards/mrm8488/spanbert-finetuned-squadv1/README.md @@ -26,7 +26,7 @@ thumbnail: ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/model_cards/mrm8488/spanbert-finetuned-squadv2/README.md b/model_cards/mrm8488/spanbert-finetuned-squadv2/README.md index 47a4cc42d8..f154557622 100644 --- a/model_cards/mrm8488/spanbert-finetuned-squadv2/README.md +++ b/model_cards/mrm8488/spanbert-finetuned-squadv2/README.md @@ -23,7 +23,7 @@ thumbnail: ## Model training The model was trained on a Tesla P100 GPU and 25GB of RAM. -The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) +The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad.py) ## Results: diff --git a/src/transformers/modeling_albert.py b/src/transformers/modeling_albert.py index 917cd96b41..161e19c976 100644 --- a/src/transformers/modeling_albert.py +++ b/src/transformers/modeling_albert.py @@ -932,7 +932,7 @@ class AlbertForQuestionAnswering(AlbertPreTrainedModel): Examples:: # The checkpoint albert-base-v2 is not fine-tuned for question answering. Please see the - # examples/run_squad.py example to see how to fine-tune a model to a question answering task. + # examples/question-answering/run_squad.py example to see how to fine-tune a model to a question answering task. from transformers import AlbertTokenizer, AlbertForQuestionAnswering import torch diff --git a/src/transformers/modeling_roberta.py b/src/transformers/modeling_roberta.py index 71bea22155..9e1460c830 100644 --- a/src/transformers/modeling_roberta.py +++ b/src/transformers/modeling_roberta.py @@ -643,7 +643,7 @@ class RobertaForQuestionAnswering(BertPreTrainedModel): Examples:: # The checkpoint roberta-large is not fine-tuned for question answering. Please see the - # examples/run_squad.py example to see how to fine-tune a model to a question answering task. + # examples/question-answering/run_squad.py example to see how to fine-tune a model to a question answering task. from transformers import RobertaTokenizer, RobertaForQuestionAnswering import torch diff --git a/src/transformers/modeling_tf_albert.py b/src/transformers/modeling_tf_albert.py index e4a7d8c1f5..72b257bafc 100644 --- a/src/transformers/modeling_tf_albert.py +++ b/src/transformers/modeling_tf_albert.py @@ -865,7 +865,7 @@ class TFAlbertForQuestionAnswering(TFAlbertPreTrainedModel): Examples:: # The checkpoint albert-base-v2 is not fine-tuned for question answering. Please see the - # examples/run_squad.py example to see how to fine-tune a model to a question answering task. + # examples/question-answering/run_squad.py example to see how to fine-tune a model to a question answering task. import tensorflow as tf from transformers import AlbertTokenizer, TFAlbertForQuestionAnswering diff --git a/src/transformers/modeling_tf_roberta.py b/src/transformers/modeling_tf_roberta.py index 1801161e81..9e91f4adac 100644 --- a/src/transformers/modeling_tf_roberta.py +++ b/src/transformers/modeling_tf_roberta.py @@ -481,7 +481,7 @@ class TFRobertaForQuestionAnswering(TFRobertaPreTrainedModel): Examples:: # The checkpoint roberta-base is not fine-tuned for question answering. Please see the - # examples/run_squad.py example to see how to fine-tune a model to a question answering task. + # examples/question-answering/run_squad.py example to see how to fine-tune a model to a question answering task. import tensorflow as tf from transformers import RobertaTokenizer, TFRobertaForQuestionAnswering