From 18177a1a60be16b2ff6749ecb5fe850ee28b49ff Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Thu, 18 Jun 2020 12:46:29 +0530 Subject: [PATCH] lm_labels => labels (#5080) --- docs/source/model_doc/t5.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/model_doc/t5.rst b/docs/source/model_doc/t5.rst index 11c16287a5..2e7bd285f0 100644 --- a/docs/source/model_doc/t5.rst +++ b/docs/source/model_doc/t5.rst @@ -31,7 +31,7 @@ Training T5 is an encoder-decoder model and converts all NLP problems into a text-to-text format. It is trained using teacher forcing. This means that for training we always need an input sequence and a target sequence. -The input sequence is fed to the model using ``input_ids``. The target sequence is shifted to the right, *i.e.* prepended by a start-sequence token and fed to the decoder using the `decoder_input_ids`. In teacher-forcing style, the target sequence is then appended by the EOS token and corresponds to the ``lm_labels``. The PAD token is hereby used as the start-sequence token. +The input sequence is fed to the model using ``input_ids``. The target sequence is shifted to the right, *i.e.* prepended by a start-sequence token and fed to the decoder using the `decoder_input_ids`. In teacher-forcing style, the target sequence is then appended by the EOS token and corresponds to the ``labels``. The PAD token is hereby used as the start-sequence token. T5 can be trained / fine-tuned both in a supervised and unsupervised fashion. - Unsupervised denoising training @@ -44,9 +44,9 @@ T5 can be trained / fine-tuned both in a supervised and unsupervised fashion. :: input_ids = tokenizer.encode('The walks in park', return_tensors='pt') - lm_labels = tokenizer.encode(' cute dog the ', return_tensors='pt') + labels = tokenizer.encode(' cute dog the ', return_tensors='pt') # the forward function automatically creates the correct decoder_input_ids - model(input_ids=input_ids, lm_labels=lm_labels) + model(input_ids=input_ids, labels=labels) - Supervised training @@ -57,9 +57,9 @@ T5 can be trained / fine-tuned both in a supervised and unsupervised fashion. :: input_ids = tokenizer.encode('translate English to German: The house is wonderful. ', return_tensors='pt') - lm_labels = tokenizer.encode('Das Haus ist wunderbar. ', return_tensors='pt') + labels = tokenizer.encode('Das Haus ist wunderbar. ', return_tensors='pt') # the forward function automatically creates the correct decoder_input_ids - model(input_ids=input_ids, lm_labels=lm_labels) + model(input_ids=input_ids, labels=labels) T5Config