Question about beam_sample: using two softmax?
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->
     
- `transformers` version: 3.5.1
- Platform: Linux-4.15.0-122-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyTorch version (GPU?): 1.7.0+cu101 (True)
- Tensorflow version (GPU?): not installed (NA)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: Yes

### Who can help
@patrickvonplaten @TevenLeScao

<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.
 
 albert, bert, GPT2, XLM: @LysandreJik 
 tokenizers: @mfuntowicz
 Trainer: @sgugger
 Speed and Memory Benchmarks: @patrickvonplaten
 Model Cards: @julien-c
 TextGeneration: @TevenLeScao 
 examples/distillation: @VictorSanh
 nlp datasets: [different repo](https://github.com/huggingface/nlp)
 rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
 Text Generation: @patrickvonplaten @TevenLeScao
 Blenderbot: @patrickvonplaten
 Bart: @patrickvonplaten
 Marian: @patrickvonplaten
 Pegasus: @patrickvonplaten
 mBART: @patrickvonplaten
 T5: @patrickvonplaten
 Longformer/Reformer: @patrickvonplaten
 TransfoXL/XLNet: @TevenLeScao
 RAG: @patrickvonplaten, @lhoestq
 FSMT: @stas00
 examples/seq2seq: @patil-suraj
 examples/bert-loses-patience: @JetRunner
 tensorflow: @jplu
 examples/token-classification: @stefan-it
 documentation: @sgugger
 -->

## Information

Model I am using (Bert, XLNet ...): Bart

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [X] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [X] my own task or dataset: (give details below)

## To reproduce

I just have some confusions about the current beam_sample code. Please disregard if I misunderstood.

I noticed in current beam_sample code there are two softmax operations to produce the token probabilities, line 1161 and 1171 in the following snippet. After 1171, the final probabilities would be similar to `F.softmax(F.log_softmax(next_token_logits, dim=-1), dim=-1)` which is very different from what we usually get by `softmax(logits)`. Similarly in [top-p filtering](https://github.com/huggingface/transformers/blob/9c0afdaf7b091c341072b432ad6ee17ba7a5016b/src/transformers/generation_logits_process.py#L184) `F.softmax` is used on log values. But shouldn't we use `exp` to recover the probabilities in these cases?

https://github.com/huggingface/transformers/blob/9c0afdaf7b091c341072b432ad6ee17ba7a5016b/src/transformers/generation_utils.py#L1161-L1171

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior


After submitting I realized `F.softmax(F.log_softmax())` is equivalent to `F.softmax()`. The different probability values I noticed comes from the normalization of multiple beams in one dimension (line 1169). That doesn't change the behaviour of the sampling.