Moonshine logits processor
Author: eustlb
Pull request: yes

# What does this PR do?

This PR introduces a new logits processor that enables per-batch-index maximum lengths.

This feature is particularly useful for audio encoder-decoder models that rely on generate and use a heuristic based on a token_limit_factor. In such cases, the maximum length can be inferred from the input length, given a token/sec maximum. This approach helps reduce model hallucinations.

The logits processor is designed to be passed via the logits_processor argument of the generate method. Additionally, this PR leverages the logits processor in the Moonshine model, where per-batch-index maximum lengths are inferred from the provided inputs.

Besides, I also fixed typos in the docs and updated tests for T4 runners.

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_35676). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Thanks a lot @gante for your insights! 🐐

My idea with this first draft was to modify the existing logic as little as possible. However, I definitely considered option 1, and I’m glad you suggested it. Indeed, such an approach aligns, in my opinion, with the direction of standardizing audio processing, as it could benefit other models as well. Additionally, implementing it directly in `MaxLengthCriteria` makes the solution cleaner (and less hacky), as termination would stem from the stopping criteria rather than being forced by the logits processor. This approach aligns better with the behavior of `generate`.

That said, this would require `generate` to support `max_length` and `max_new_tokens` as lists (and similarly for `min_length` and `min_new_tokens`). Consequently, `generation_config.max_length`, etc., would also need to be able to be lists within the scope of generate. This is inconsistent with how these attributes are currently defined in [GenerationConfig](https://github.com/huggingface/transformers/blob/615bf9c5e4ab29ff63be8d5ba49525d6e3d1b3a7/src/transformers/generation/configuration_utils.py#L98) (and there's no reason to change them). **Are we okay with this that?**

If we are, I can update `MaxLengthCriteria` to accept a list of integers. This way, Moonshine’s processor can simply return `max_length` as a list, inferred by default from the provided audio inputs, and there would be no need to override generate 😊


> This is inconsistent with how these attributes are currently defined in [GenerationConfig](https://github.com/huggingface/transformers/blob/615bf9c5e4ab29ff63be8d5ba49525d6e3d1b3a7/src/transformers/generation/configuration_utils.py#L98) (and there's no reason to change them). Are we okay with this that?

@eustlb IMO since it's a relevant feature for time-based modalities like audio (and likely video in the near-future), I'd be happy to support it.

BTW, beam search + stopping criteria is not working at the moment 💔 , see [this issue](https://github.com/huggingface/transformers/issues/34843). This may be a deal breaker is beam search is relevant for moonshine, in which case I would recommend the current form. If that's the case, LMK.

Following this discussion, I've split this PR in two PRs:
1. https://github.com/huggingface/transformers/pull/35731 patch moonshine
2. https://github.com/huggingface/transformers/pull/35732 generate's with expanded `max_length` etc