FuyuForCausalLM.forward() got an unexpected keyword argument 'labels'
Author: Nyandwi
Pull request: no

### System Info

- `transformers` version: 4.36.0.dev0
- Platform: Linux-4.18.0-372.32.1.el8_6.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.13
- Huggingface_hub version: 0.17.3
- Safetensors version: 0.4.0
- Accelerate version: 0.24.1
- Accelerate config: 	not found
- PyTorch version (GPU?): 2.1.0+cu118 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script? True
- Using distributed or parallel set-up in script? False

### Who can help?

@ArthurZucker 

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

The fuyu model created with the code below doesn't seem to have `labels` argument in forward yet labels seems supported in model source code.

```py
outputs =  model(**inputs, labels=labels_input)
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[19], line 3
----> 3 outputs =  model(**inputs, labels=labels_input)

File ~/miniconda3/envs/fuyu/lib/python3.10/site-packages/torch/nn/modules/module.py:1518, in Module._wrapped_call_impl(self, *args, **kwargs)
   1516     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
   1517 else:
-> 1518     return self._call_impl(*args, **kwargs)

File ~/miniconda3/envs/fuyu/lib/python3.10/site-packages/torch/nn/modules/module.py:1527, in Module._call_impl(self, *args, **kwargs)
   1522 # If we don't have any hooks, we want to skip the rest of the logic in
   1523 # this function, and just call forward.
   1524 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
   1525         or _global_backward_pre_hooks or _global_backward_hooks
   1526         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1527     return forward_call(*args, **kwargs)
   1529 try:
   1530     result = None

TypeError: FuyuForCausalLM.forward() got an unexpected keyword argument 'labels'

The forward signature in my environment doesn't have labels yet I am using the dev version updated very recently.

```py
@add_start_docstrings_to_model_forward(FUYU_INPUTS_DOCSTRING)
    def forward(
        self,
        input_ids: torch.LongTensor = None,
        image_patches: torch.Tensor = None,  # [batch_size, num_total_patches, patch_size_ x patch_size x num_channels ]
        image_patches_indices: torch.Tensor = None,
        attention_mask: Optional[torch.Tensor] = None,
        position_ids: Optional[torch.LongTensor] = None,
        past_key_values: Optional[List[torch.FloatTensor]] = None,
        inputs_embeds: Optional[torch.FloatTensor] = None,
        use_cache: Optional[bool] = None,
        output_attentions: Optional[bool] = None,
        output_hidden_states: Optional[bool] = None,
        return_dict: Optional[bool] = None,
    ) -> Union[Tuple, BaseModelOutputWithPast]:
```

### Expected behavior

According to the source code, I believe the model should take the labels. Or maybe there is something that I am not aware of, or maybe it has something to do with other packages. I tried to update the transformers to latest dev version and the issue persisted. Would appreciate your support regarding the issue!



Comments:
Hey! Yes this was updated recently, could you print
```python 
import transformers
print(transformers.__versions__)
```


Thanks for quick reply. I have `4.36.0.dev0`. 

It is also the version I get when I install from the source again(now).

That's strange see [here](https://github.com/huggingface/transformers/blob/main/src/transformers/models/fuyu/modeling_fuyu.py#L222)

I cleared the whole things and pip caches and pulled again from the source. Now I can see the labels in forward signature. Thanks again!