Feature extraction pipeline not consider parameters
Author: quancore
Pull request: no

### System Info

    - transformers==4.22.2
    - python==3.9.2
    - Ubuntu 22.04

### Who can help?

@Narsil 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

```python
import torch
from torch.utils.data import Dataset

from transformers import AutoModel, pipeline
from transformers import AutoTokenizer

model_name="anferico/bert-for-patents"

text = ["this is a pan"]
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = AutoModel.from_pretrained(model_name).to(device)
tokenizer = AutoTokenizer.from_pretrained(model_name, do_lower_case=True, model_max_length=512)
pipe_ = pipeline('feature-extraction', model=model, tokenizer=tokenizer, device=torch.cuda.current_device())
p = pipe_(text, padding=True, truncation=True, pad_to_max_length=True, return_tensors='np')

np.squeeze(p).shape
```

### Expected behavior

There are several problems:
- It does not return Numpy array so I have to make squeeze operation on my own.
- The bigger problem is that it does not consider padding parameters, the expeced return would be (512, 1024) but now return (6, 1024). I have tried any parameter setup at any level but not worked. When I checked the source code, it only consider truncation parameter.

Comments:
Hi @quancore ,

`feature-extraction` pipeline is a bit of a beast tbh since there are MANY models and architectures behind.
That being said, the use case you describe seems very legit and interesting.

Do you want to open a PR for it ?

In order to prevent issues, the `tokenizer` part of the arguments should probably be sent as a group. For instance `max_length` is both an argument possible for tokenization and for `generate` function and they mean 2 very different things.
So doing :


```python
import torch
from torch.utils.data import Dataset

from transformers import AutoModel, pipeline
from transformers import AutoTokenizer

model_name="anferico/bert-for-patents"

text = ["this is a pan"]
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = AutoModel.from_pretrained(model_name).to(device)
tokenizer = AutoTokenizer.from_pretrained(model_name, do_lower_case=True, model_max_length=512)
pipe_ = pipeline('feature-extraction', model=model, tokenizer=tokenizer, device=torch.cuda.current_device())
p = pipe_(text, tokenize_kwargs = {"padding": True, "truncation": True, "pad_to_max_length":True}, return_tensors='np')

np.squeeze(p).shape
```
Might be more explicit.

All arguments needs to be explicited in `_sanitize_parameters`.

Would you be willing to open a PR for it ?

@Narsil I will try to do that, do you have any suggestions for similar reference implementation?

Does this help ?
https://huggingface.co/docs/transformers/v4.22.2/en/add_new_pipeline

You can go and try at it, doesn't matter how far you go, you can ping me on the PR I'll try to provide some guidance. 

Thanks a lot !