Support returning raw logits in `generate`
### Feature request

Support returning raw logits in `generate` by either:
1. creating a new arg that enables return of raw logits
2. or support callback that allow users to collect the raw logits



### Motivation

* Raw logits "would be the most understandable & consistent across generation methods" (@patrickvonplaten)
* For testing, returning raw logits would help "identify which parts get wrong if any test failure occurs" (@ydshieh)
* There's concern about "rampant too many options" (@Narsil), thus I would prefer the second option to support this feature.
* However, the second option still needs code change to support it. As the user provided `logits_processor` is appended to a new instance of `LogitsProcessorList`. As a result, users cannot get the raw logits using the current implementation even with a custom `LogitsProcessor`.

See further discussion in https://github.com/huggingface/transformers/issues/17424

### Your contribution

I could open a PR to reorder how `logits_processor` is merged with the predefined list of `LogitsProcessorList`.
cc @patil-suraj @gante as well<|||||>I'm personally fine with adding a `output_logits` flag to `generate` since it already has 50+ flags it won't make a difference and it's a useful feature indeed. What do you think @patil-suraj @gante ?<|||||>I'm cool with it 👍  (and it might be interesting to use as part of PT-TF cross tests)<|||||>@patil-suraj what do you think? Do you want to open a PR to work on it? <|||||>> @patil-suraj what do you think? Do you want to open a PR to work on it?

@shijie-wu seems willing to open a PR, as mentioned at the end of the issue description.<|||||>I could open a PR for this. <|||||>I'm okay with this, let me know if you need any help @shijie-wu :) <|||||>Cool thanks for taking care of it @shijie-wu <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.<|||||>So, is there any work on it? I did not find a new feature about getting the raw logits.<|||||>I don't think so -- gently pinging @shijie-wu, who manifested interest in opening a PR :)<|||||>sorry about the delay! i will resume working on it in the coming week.<|||||>gently ping @shijie-wu --- any updates on this?<|||||>@gante should I open a PR? I think the change is fairly minor.<|||||>@xkianteb sounds good 👍 <|||||>is there any update on this...?<|||||>None that I know of. Open to contributors :)