Bert that receives text triplet as an input
I would like to train bert on triplets of texts as inputs (for example, something like (context, question, answer)). encode_plus (https://huggingface.co/transformers/internal/tokenization_utils.html#transformers.tokenization_utils_base.PreTrainedTokenizerBase.encode_plus) receives either a single text, or a text_pair. Is there a way to use it with triplets?
Unfortunately we do not have such a method, as it would imply having an opinionated approach on how to do it. The `encode_plus` method follows what was done during each model's training, since our aim is to replicate as closely as possible the original approach.

I would recommend encoding your sequences by placing your own special tokens, and by specifying `add_special_tokens=False` so that the encoding method does not add these tokens automatically. Let me know if you want a code sample showing this.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>@LysandreJik If you can share a code sample that would be great!
<|||||>This issue has been automatically marked as stale and been closed because it has not had recent activity. Thank you for your contributions.

If you think this still needs to be addressed please comment on this thread.<|||||>I wonder why `text_pair` gets a special treatment. I guess datasets which have two strings as "input" (like glue's mnli with premise and hypothesis) are more common, but aren't there datasets with three or more input strings?