Extra else in GPTNeo prepare_inputs_for_generation
https://github.com/huggingface/transformers/blob/fe861e578f50dc9c06de33cd361d2f625017e624/src/transformers/models/gpt_neo/modeling_gpt_neo.py#L704

Here shouldn't be an extra `else`. Sometimes users want to input customized position_ids and attention_masks, however this `else` eliminates such practice.
My bad. I think one should override the `prepare_inputs_for_generation` method if he wants to customize position_ids. The current code is okay for general use cases. But according to recent code of LLaMA https://github.com/huggingface/transformers/blob/fe861e578f50dc9c06de33cd361d2f625017e624/src/transformers/models/llama/modeling_llama.py#L740, the `else` should be deleted anyway.<|||||>Hi @namespace-Pt, thanks for raising this issue. 

Yes, the great thing about open source code is anyone can build upon and adapt it to their needs! 

Wrt comparing to the code with Llama, these are different models, and so there might be different assumptions about the inputs for generation; sometimes, even if the assumptions are the same, one model was implemented at a different time and the logic differs for backwards compatibility reasons; and sometimes it's just an oversight on our part :) 

cc @gante for reference :) <|||||>@namespace-Pt 👋 

I think the `else` is indeed not needed. Would you like to open a PR to fix it? 🤗 <|||||>Create pull request in https://github.com/huggingface/transformers/pull/24826