Allow to set truncation strategy for pipeline
# 🚀 Feature request

The highlevel pipeline function should allow to set the truncation strategy of the tokenizer in the pipeline.

## Motivation

Some models will crash if the input sequence has too many tokens and require truncation. Additionally available memory is limited and it is often useful to shorten the amount of tokens. Sadly this is currently not possible using the pipeline-API. One has to call the tokenizer manually to set the truncation strategy or hope that the task specific pipeline has truncation turned on by default (the summarization pipeline for example has not).

## Your contribution

I could potentially create a PR for this, but want to confirm first that the change is welcome.
Indeed, not being able to pass tokenizer arguments is a limiting factor of the pipelines. We're working on pipelines v2 (cc @mfuntowicz) which will allow such arguments to be passed.

In the meantime, we would definitely welcome a PR offering this functionality - but it would have to be agnostic to the argument, not specific to the truncation strategy.<|||||>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.