GPT2ForQuestionAnswering: how to use? 
https://github.com/huggingface/transformers/blob/8f093fb799246f7dd9104ff44728da0c53a9f67a/docs/source/en/model_doc/gpt2.mdx?plain=1#L116

The documentation generated for this question answering model is complete nonsense: https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2ForQuestionAnswering.forward.example

It does not produce any meaningful results and the tensors are hardcoded:

```
# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])
```


Hi @mkschreder, thanks for raising this issue. 

In terms of the issue title - how to use - there's a more in-depth guide about question-answering in the [task documentation](https://huggingface.co/docs/transformers/v4.30.0/en/tasks/question_answering#question-answering) and [NLP course](https://huggingface.co/learn/nlp-course/chapter7/7?fw=pt). 

The snippets in the documentation are meant to be minimal examples so that users can get started and understand the model's API. Sometimes values are hardcoded to keep the example short, however we certainly don't want them to be incorrect or confusing. If there's particular improvements or fixes you'd like to see, we're always happy to review a PR :) <|||||>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.