transformers/docs/source
lewtun 6b655cc63f
Add ONNX support for MarianMT models (#14586)
* First commit to add MarianMT to ONNX

* Now MarianModel.forward() automatically generates decoder_input_ids, like BartModel.forward()

* Adjusted MarianOnnxConfig.inputs and outputs to work with seq2seq-lm feature

* Style fix

* Added support for other features for already supported models

* Partial support for causal and seq2seq models

* Partial support for causal and seq2seq models

* Add default task for MarianMT ONNX

* Remove automatic creation of decoder_input_ids

* Extend inputs and outputs for MarianMT ONNX config

* Add MarianMT to ONNX unit tests

* Refactor

* OnnxSeq2SeqConfigWithPast to support seq2seq models

* Parameterized the onnx tests

* Restored run_mlm.py

* Restored run_mlm.py

* [WIP] BART update

* BART and MBART

* Add past_key_values and fix dummy decoder inputs

Using a sequence length of 1 in generate_dummy_outputs() produces large discrepancies, presumably due to some hidden optimisations.

* Refactor MarianOnnxConfig to remove custom past_key_values logic

* Fix quality

* Revert "Revert "Added support for other features for already supported models (#14358)" (#14679)"

This reverts commit 0f4e39c559.

* is_torch_available test to avoid failing imports

* sorting parameterize parameters to solve ERROR gw0 gw1

* tests fix

* tests fix

* GPT2 with past fix

* Fixed stateful class attribute change that was breaking things when converting multiple models sequentially

* Removed onnx file

* Refactor Marian export to account for base changes

* Fix copies

* Implemented suggestions

* Extend support for causal LM

* Revert "Revert "Added support for other features for already supported models (#14358)" (#14679)"

This reverts commit 0f4e39c559.

* is_torch_available test to avoid failing imports

* sorting parameterize parameters to solve ERROR gw0 gw1

* tests fix

* tests fix

* GPT2 with past fix

* Fixed stateful class attribute change that was breaking things when converting multiple models sequentially

* Removed onnx file

* Implemented suggestions

* Fixed __init__ to resolve conflict with master

* Revert "Revert "Added support for other features for already supported models (#14358)" (#14679)"

This reverts commit 0f4e39c559.

* is_torch_available test to avoid failing imports

* sorting parameterize parameters to solve ERROR gw0 gw1

* tests fix

* tests fix

* GPT2 with past fix

* Fixed stateful class attribute change that was breaking things when converting multiple models sequentially

* Removed onnx file

* Implemented suggestions

* Fixed __init__ to resolve conflict with master

* Remove commented import

* Remove ONNX model

* Remove redundant class method

* Tidy up imports

* Fix quality

* Refactor dummy input function

* Add copied from statements to Marian config functions

* Remove false copied from comments

* Fix copy from comment

Co-authored-by: Massimiliano Bruni <massimiliano.bruni@hcl.com>
Co-authored-by: Michael Benayoun <mickbenayoun@gmail.com>
2021-12-23 13:35:56 +01:00
..
internal Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
main_classes Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
model_doc Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
_config.py Prevent style_doc from tempering the config file 2021-12-10 15:31:43 -05:00
_toctree.yml Feature/fix slow test in mluke (#14749) 2021-12-22 06:35:59 -05:00
add_new_model.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
add_new_pipeline.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
benchmarks.mdx Fix dead link to benchmarks.ipynb (#14842) 2021-12-20 09:08:05 -05:00
bertology.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
community.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
contributing.md Update installation page and add contributing to the doc (#5084) 2020-06-17 14:01:10 -04:00
converting_tensorflow_models.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
custom_datasets.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
debugging.mdx [doc porting] several docs (#14858) 2021-12-21 09:55:25 -08:00
examples.md per_device instead of per_gpu/error thrown when argument unknown (#4618) 2020-05-27 11:36:55 -04:00
fast_tokenizers.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
glossary.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
index.mdx Wav2Vec2 meets phonemes (#14353) 2021-12-17 19:56:44 +01:00
installation.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
migration.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
model_sharing.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
model_summary.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
multilingual.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
notebooks.md Update notebooks (#3620) 2020-04-06 14:32:39 -04:00
parallelism.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
performance.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
perplexity.mdx Removes images to put them in a dataset (#14781) 2021-12-16 04:42:02 -05:00
philosophy.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
pr_checks.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
preprocessing.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
quicktour.mdx Swap TF and PT code inside two blocks (#14742) 2021-12-13 10:31:11 -05:00
sagemaker.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00
serialization.mdx Add ONNX support for MarianMT models (#14586) 2021-12-23 13:35:56 +01:00
task_summary.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
testing.mdx [doc porting] several docs (#14858) 2021-12-21 09:55:25 -08:00
tokenizer_summary.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
training.mdx Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
troubleshooting.mdx Convert rst files (#14888) 2021-12-22 16:14:35 -05:00