[docs & modular] fix doc pattern in `ForCausalLM`/`ForConditionalGeneration` models
Author: gante
Pull request: yes

# What does this PR do?

### Problem

Many of our `ForCausalLM` (and `ForConditionalGeneration`, will only refer to the first one from now on) classes have an incorrect doc pattern, causing the doc builder to render it incorrectly. 

Example of a bad render ([llama](https://huggingface.co/docs/transformers/main/en/model_doc/llama#transformers.LlamaForCausalLM.forward.Args))
<img width="883" alt="Screenshot 2025-02-13 at 15 13 13" src="https://github.com/user-attachments/assets/33395aa6-4ff4-40b1-b47f-3ca4f9580aad" />

Example of a good render ([gpt neox](https://huggingface.co/docs/transformers/main/en/model_doc/gpt_neox#transformers.GPTNeoXForCausalLM.forward.labels))
<img width="889" alt="Screenshot 2025-02-13 at 15 14 07" src="https://github.com/user-attachments/assets/581d3981-594a-4662-be51-ac1a657316ba" />

### Why it happens?

The docs in the `ForCausalLM` classes should only contain the new arguments, not the full argument list.

If we go look in the docstrings that result in the incorrect renders, we see they start with
```py
Args:
    foo (...)
```

`Args:` is interpreted by our doc builder as the beginning of the arguments, but this is not the beginning of the arguments -> rendering error

### Solution

On models with `modular`, method docstrings that do not start with `Args` were being concatenated to the super class docstring. I'm assuming this is desirable in some cases, but it is not desirable here -- it was resulting in duplicated arguments and a few other keywords (like `Returns:`).

I've added a special keyword (and related logic) to modular. When `"REPLACES ORIGINAL DOCSTRING"` is in the modular docstring, we ignore the super class docstring. With this `modular` change, the docs correction became trivial :)

On models without modular, the fix was a simple string correction.

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

Hey sorry, had very low bandwith this week with everything! Very welcomed PR, thanks!
I do agree that it's better to avoid adding 🪄 magic keywords as much as possible (something that we tried very hard until now). Are there any scenarios when just searching for `Args:` is not desirable in the current library state? 

@ArthurZucker @Cyrilvallez 

`Args:` is already [used in our doc builder](https://github.com/huggingface/doc-builder/blob/a3add1d7f9bde2450627f3a708c8a33061d19a21/README.md?plain=1#L464) as the keyword to start the arguments in the docs, so we would some other mechanism in this edge case [in this edge case, we are not at the start of the arguments, we append to the existing args].

I also think a magic string is ugly, but I couldn't think of a better error-proof pattern 😅 Happy to use any other pattern!

Hey! I could not easily push to your branch since you're on your own fork, so I quickly opened https://github.com/huggingface/transformers/pull/36243 to propose a workaround without magic keyword 🤗

TLDR, the indentation with `add_start_docstrings_to_model_forward` was wrong 2 times 😅 (First character appeared after 3 spaces, then we added everything after 4 spaces). But we actually need 8 spaces everywhere, as it is a docstring for a class method (i.e. 2 Python's indentation levels). Otherwise, we mess up levels between `Args` and `Returns` parts. It allows to use additional indentation level to automatically discriminate between continuing args, and new docstring.
Let me know what you think and if the 8 spaces are ok with the doc builder, but I don't see why not as I assume we have many of those.

Happy to add the other models to use the same format if this change works for you - otherwise you can merge those changes, but you will need to add the indent for all models as well anyway

@Cyrilvallez that makes sense -- looking closely, it doesn't make sense for the individual arguments to be at the same indentation level as the sections (e.g. `Examples:`), I agree with what you wrote.

I also prefer your solution without magic words. However, for some reason, the diff in #36243 is not the full solution :(

[Cohere docs in this PR](https://moon-ci-docs.huggingface.co/docs/transformers/pr_36172/en/model_doc/cohere#transformers.CohereForCausalLM):
<img width="1034" alt="Screenshot 2025-02-20 at 18 31 53" src="https://github.com/user-attachments/assets/cf520e5f-5119-42e7-9fe7-055083743a6c" />

[Cohere docs in 36243](https://moon-ci-docs.huggingface.co/docs/transformers/pr_36243/en/model_doc/cohere#transformers.CohereForCausalLM):
<img width="1064" alt="Screenshot 2025-02-20 at 18 32 28" src="https://github.com/user-attachments/assets/19c2b999-51d1-447d-a12f-730dd42be84c" />

[Cohere docs on main](https://huggingface.co/docs/transformers/model_doc/cohere#transformers.CohereForCausalLM):
<img width="962" alt="Screenshot 2025-02-20 at 18 35 59" src="https://github.com/user-attachments/assets/c1812001-679d-4b98-b145-a6019c722cbd" />


(I'm very confident it's a matter on fixing some minor indentation issue)

@Cyrilvallez a tip when dealing with forked PRs :D I use this copy/paste recipe

```
# option A
USER="jiqing-feng"
BRANCH="llama"
# option B
IFS=":" read -r USER BRANCH <<< "jiqing-feng:llama"

# add remote url
git remote add $USER git@github.com:$USER/transformers.git

# fetch everything
git fetch -a $USER

# checkout to their branch and either (if branch name is unique)
git checkout $BRANCH

# or (if generic branch name)
# git checkout -b danielpcox-main --track danielpcox/main

# push my changes
git push $USER $BRANCH # and use the command suggested by git ^^
```

Thanks for the snippet, quite handy indeed! 

Indeed it was again (another) indentation issue with the decorators. I fixed them all generally so it should not come up again. The doc is now correctly displaying 🎉 as you can see [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_36243/en/model_doc/cohere#transformers.CohereForCausalLM)
I'll go forward and quickly add all the models to the PR then 👌

@Cyrilvallez awesome, closing this one then 💛