Switch to CB if cache_implementation == paged
Author: remi-or
Pull request: yes

This PR fixes one of the issues raised in #41501

This PR adds `paged` as a static cache implementation and switches from `generate` to `generate_batch` if it's the chosen implementation. It also raises errors if an argument for `generate` is passed to `generate_batch` but is not supported, and warn the user that `generate_batch` is used. 
The interface for the user stays the same, as the sample script below shows:
```
import os
import torch

from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig


if __name__ == '__main__':
    model_path = "Qwen/Qwen3-0.6B"

    tokenizer = AutoTokenizer.from_pretrained(
        model_path,
        trust_remote_code=True,
        add_bos_token=False,
        add_eos_token=False,
    )

    model = AutoModelForCausalLM.from_pretrained(
        model_path,
        dtype=torch.bfloat16,
        trust_remote_code=True,
        device_map="cuda",
    ).eval()

    prompt="How are you today?"
    chat_prompt=tokenizer.apply_chat_template(
        [{"role" : "user", "content" : prompt}],
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=False,
    )

    generation_config=GenerationConfig(
        do_sample=True,
        temperature=1.0,
        top_p=1.0,
        # num_return_sequences=8,
        max_new_tokens=100,
        eos_token_id=tokenizer.eos_token_id,
        pad_token_id=tokenizer.pad_token_id,
        use_cache=True,
        return_dict_in_generate=True,
        output_logits=True,
    )

    chat_prompt_ids = tokenizer(chat_prompt, return_tensors="pt")["input_ids"].to(model.device)

    print("Classic generate")
    output = model.generate(input_ids=chat_prompt_ids, generation_config=generation_config)[0]
    output_text = tokenizer.batch_decode(output[:, chat_prompt_ids.shape[1]:], skip_special_tokens=True)
    print(output_text)

    print("\nWith paged cache")
    output = model.generate(input_ids=chat_prompt_ids, generation_config=generation_config, cache_implementation="paged")[0]
    output_text = tokenizer.batch_decode(output[:, chat_prompt_ids.shape[1]:], skip_special_tokens=True)
    print(output_text)

```
which outputs
```
Classic generate
`generation_config` default values have been modified to match model-specific defaults: {'temperature': 0.6, 'top_k': 20, 'top_p': 0.95, 'bos_token_id': 151643}. If this is not desired, please set these values explicitly.
["Hello! I'm here to help you with anything you need. How can I assist you today?"]

With paged cache
Detected cache_implementation=paged: switching to continuous batching. You should consider using generate_batch directly instead.
No behavior specified for use_cuda_graph, defaulting to self.use_cuda_graph = False because self.model.config._attn_implementation = 'paged|sdpa'. If you want to save memory, turn off cuda graphs, but they can improve performances.
Solving 1 requests: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  2.16request/s]
["Hello! I'm here to help you with anything you need. How can I assist you today? 😊"]
```

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