 TypeError: is_accelerate_available() got an unexpected keyword argument 'check_partial_state'.
### System Info

- `transformers` version: 4.29.0.dev0
- Platform: Linux-5.10.147+-x86_64-with-glibc2.31
- Python version: 3.10.11
- Huggingface_hub version: 0.14.1
- Safetensors version: not installed
- PyTorch version (GPU?): 2.0.0+cu118 (True)
- Tensorflow version (GPU?): 2.12.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.6.9 (gpu)
- Jax version: 0.4.8
- JaxLib version: 0.4.7
- Using GPU in script?: yes
- Using distributed or parallel set-up in script?: no

### Who can help?

_No response_

### Information

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

### Tasks

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

### Reproduction

trainer = CustomTrainer(
    model=model,
    train_dataset=train_data_loader,
    eval_dataset=validation_data_loader,
    args=transformers.TrainingArguments(
        per_device_train_batch_size=4,
        gradient_accumulation_steps=4,
        warmup_steps=30,
        max_steps=50,
        learning_rate=2e-4,
        fp16=True,
        logging_steps=1,
        evaluation_strategy="steps",
        output_dir="outputs",
        weight_decay=0.01,  # L2 regularization
    ),
    data_collator=transformers.DataCollatorForLanguageModeling(
        tokenizer, mlm=False
    ),
)
# # Add dropout to the model (if not already present)
# model.config.dropout = 0.1

model.config.use_cache = False  # silence the warning, Please re-enable for inference!
trainer.train()

### Expected behavior

 @ArthurZucker and @younesbelkada

This should ideally start a traning loop but instead I am getting unexpected keyword argument check_partial_state TypeError

Traceback (most recent call last) ────────────────────────────────╮
│ in <cell line: 1>:5                                                                              │
│ in __init__:111                                                                                  │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/training_args.py:1279 in __post_init__      │
│                                                                                                  │
│   1276 │   │   if (                                                                              │
│   1277 │   │   │   self.framework == "pt"                                                        │
│   1278 │   │   │   and is_torch_available()                                                      │
│ ❱ 1279 │   │   │   and (self.device.type != "cuda")                                              │
│   1280 │   │   │   and (get_xla_device_type(self.device) != "GPU")                               │
│   1281 │   │   │   and (self.fp16 or self.fp16_full_eval)                                        │
│   1282 │   │   ):                                                                                │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/training_args.py:1643 in device             │
│                                                                                                  │
│   1640 │   │   The device used by this process.                                                  │
│   1641 │   │   """                                                                               │
│   1642 │   │   requires_backends(self, ["torch"])                                                │
│ ❱ 1643 │   │   return self._setup_devices                                                        │
│   1644 │                                                                                         │
│   1645 │   @property                                                                             │
│   1646 │   def n_gpu(self):                                                                      │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py:54 in __get__              │
│                                                                                                  │
│    51 │   │   attr = "__cached_" + self.fget.__name__                                            │
│    52 │   │   cached = getattr(obj, attr, None)                                                  │
│    53 │   │   if cached is None:                                                                 │
│ ❱  54 │   │   │   cached = self.fget(obj)                                                        │
│    55 │   │   │   setattr(obj, attr, cached)                                                     │
│    56 │   │   return cached                                                                      │
│    57                                                                                            │
│                                                                                                  │
│ /usr/local/lib/python3.10/dist-packages/transformers/training_args.py:1558 in _setup_devices     │
│                                                                                                  │
│   1555 │   def _setup_devices(self) -> "torch.device":                                           │
│   1556 │   │   requires_backends(self, ["torch"])                                                │
│   1557 │   │   logger.info("PyTorch: setting up devices")                                        │
│ ❱ 1558 │   │   if not is_sagemaker_mp_enabled() and not is_accelerate_available(check_partial_s  │
│   1559 │   │   │   raise ImportError(                                                            │
│   1560 │   │   │   │   "Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip inst  │
│   1561 │   │   │   )                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: is_accelerate_available() got an unexpected keyword argument 'check_partial_state'
Looks like you may have a borked install of Transformers? If installing from source, that function does accept `check_partial_state` as can be seen [here](https://github.com/huggingface/transformers/blob/78b7debf56efb907c6af767882162050d4fbb294/src/transformers/utils/import_utils.py#L582).<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.