* Tmp.
* Fixing BC for question answering with long context.
* Capping model_max_length to avoid tf overflow.
* Bad workaround bugged roberta.
* Fixing name.
* Symbolic trace dynamic axes support for BERT like models (albert, bert, distilbert, mobilebert, electra, megatron-bert)
* Sanity checks before tracing that make sure the model to trace is supported
* Adapted to PyTorch 1.9
Co-authored-by: Michael Benayoun <michael@huggingface.co>
* update no_* argument
Changes the order so that the no_* argument is created after the original argument AND sets the default for this no_* argument to False
* import copy
* update test
* make style
* Use kwargs to set default=False
* make style
In BartForConditionalGeneration.forward, if labels are provided,
decoder_input_ids are set to the labels shifted to the right.
This is problematic: if decoder_inputs_embeds is also set,
the call to self.model, which eventually gets to BartDecoder.forward,
will raise an error.
The fix is quite simple, similar to what is there already in
BartModel.forward. Mainly, we should not
compute decoder_input_ids if decoder_inputs_embeds is provided.
Co-authored-by: Silviu Vlad Oprea <silviuvo@amazon.co.uk>
* Removed wrong warning
* Raise a warning when `max_length` is given with wrong `truncation`
* Update the error message
* Update the warning message
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Keras callback to push to hub each epoch, or after N steps
* Reworked the callback to use Repository
* Use an Enum for save_strategy
* Style pass
* Correct type for tokenizer
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/keras_callbacks.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Adding print message to the final upload
* Adding print message to the final upload
* Change how we wait for the last process to finish
* is_done is a property, not a method, derp
* Docstrings and documentation
* Style pass
* Style edit
* Docstring reformat
* Docstring rewrite
* Replacing print with internal logger
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>