QA Pipelines fixes (#5429)
QA Pipelines fixes (#5429)

* Make QA pipeline supports models with more than 2 outputs such as BART assuming start/end are the two first outputs.

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* When using the new padding/truncation paradigm setting padding="max_length" + max_length=X actually pads the input up to max_length.

This result in every sample going through QA pipelines to be of size 384 whatever the actual input size is making the overall pipeline very slow.

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* Mask padding & question before applying softmax. Softmax has been refactored to operate in log space for speed and stability.

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* Format.

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* Use PaddingStrategy.LONGEST instead of DO_NOT_PAD

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* Revert "When using the new padding/truncation paradigm setting padding="max_length" + max_length=X actually pads the input up to max_length."

This reverts commit 1b00a9a2

Signed-off-by: Morgan Funtowicz <c0bd32d211d2f1ab2b112b3d8382ef75520f5f3c@gmail.com>

* Trigger CI after unattended failure

* Trigger CI
huggingface/transformers,huggingface/transformers,huggingface/pytorch-transformers,huggingface/transformers,huggingface/transformers