

TITLE
Feature request: support more than device keyword arg when calling .to() on BatchEncoding

COMMENTS
7

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### Feature request

I see that the `.to()` [method](https://github.com/huggingface/transformers/blob/f1660d7e23d4432513fe060bde4f9b7b29f05204/src/transformers/tokenization_utils_base.py#L751) of `BatchEncoding` returned by tokenizers only supports the `device` keyword argument.

However, the `BatchFeature` returned by image processors/audio feature extractors supports [more keyword arguments](https://github.com/huggingface/transformers/blob/f1660d7e23d4432513fe060bde4f9b7b29f05204/src/transformers/feature_extraction_utils.py#L187), most importantly `dtype`.

### Motivation

This is handy as it allows to do:
```
from transformers import ViTImageProcessor
import torch
from PIL import Image
import requests

processor = ViTImageProcessor()

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

encoding = processor(image, return_tensors="pt").to(device="cuda", dtype=torch.float16)

for k,v in encoding.items():
    print(k,v.dtype)
```
which returns
```
pixel_values torch.float16
```


### Your contribution

I could submit a PR but if anyone has the bandwidth for this, would be great to add it :D 