Docs: introduction to generation with LLMs
Author: gante
Pull request: yes

# What does this PR do?

This PR adds a sort of landing page on `generate`, which was missing in our docs. This page is useful for beginners and experienced users alike -- it goes through the basic generate API for both LLMs and non-text tasks, common caveats, and ends with pointers for advanced exploration. 

I expect that the consolidation of pointers for advanced exploration in a single page will massively improve the discoverability of our various generate-related efforts!

👉 best viewed in the doc preview, since there are gifs :)

Related issue: #24575 

Comments:
_The documentation is not available anymore as the PR was closed or merged._

Do we really want to include non-text parts so prominently here? I think 99% of the users clicking on "Generation" expect to see only text generation and not anything multi-modal.

I would actually just call it "text-generation" and not "autoregressive generation"

@patrickvonplaten the non-text parts correspond to a tiny portion of the docs -- given than a significant number of issues in `transformers` come from models like Whisper or BLIP, the benefits may be huge. Pointers to things like quantization or generate classes also apply to them.

The decision to have a separate generate section is somewhat tied to including other modalities. If we include them, then it should be separate. If we don't, I still think generate deserves its own section.

Note that this would be the only guide that is planned to include the non-LLM case :) 

> @patrickvonplaten the non-text parts correspond to a tiny portion of the docs -- given than a significant number of issues in `transformers` come from models like Whisper or BLIP, the benefits may be huge. Pointers to things like quantization or generate classes also apply to them.
> 
> The decision to have a separate generate section is somewhat tied to including other modalities. If we include them, then it should be separate. If we don't, I still think generate deserves its own section.
> 
> Note that this would be the only guide that is planned to include the non-LLM case :)


Sorry this might not be super in-line with what we discussed in our call earlier, but I think since we're in the task guide here we should stay in a "task"-format that the user expects, no? So more generally speaking: I'm not really looking for a "auto-regressive generation" task - I'm looking for "Text generation" or "Speech recognition" task. Auto-regressive generation is just the underlying method of different tasks but for someone that just looks at how to do a certain task they don't need to know about auto-regressive generation right away no? I think when explaining text-generation on the main page it's good to mention auto-regressive generation, but it shouldn't be the title IMO.

Taking a step back here, I don't fully understand is what is the different between "natural language processing" and "text-generation"?
To me we should either:
- a) Change NLP to NLU and move all text-generation based tasks like "summarization", "translation" and potentially copy "question answering" to "Text Generation"
- b) Or text generation should just live under NLP

I think a) is better to make text generation more prominent and then we can also add more sub sections like "chat", "code generation", maybe below.

The other things we talked about such as k/v cache, speeding up inference / prompting etc... could maybe have sections under "Tutorials" and we link from the different "sub-generation" tasks since they are related to all of them no? 

An update from an offline discussion with @patrickvonplaten:

The plan forward is to:
1. Rework this PR into an LLM-only tutorial
2. Sections: NLP will be reworded into NLU, and text generation tasks will go under the new section. At a later stage, we may include new tasks there, like code generation and chatbots. The new docs will fall in the following sections
  a. prompting -> tutorial section
  b. LLM performance -> performance and scalability section 
3. Since the use of `generate` with other modalities is very similar to LLMs, there will be a `<Tip>` block at the beginning of the other tasks pointing to this LLM tutorial (which in turn points to the whole generate ecosystem)

These changes will be built over a few PRs, focusing on speed, so we can then share with the rest of the team (and community) and use the feedback for further improvements 🚀 

Sounds good to me!

@stevhliu suggestions included 👍 I've also fixed a few visual issues that we could see in the preview. If you agree, I'll merge this PR :)

Very cool doc & gifs!