cached_file() got an unexpected keyword argument 'token'
### System Info

transformers-4.32.0.dev0

### Who can help?

_No response_

### 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

`AutoConfig.from_pretrained(model, trust_remote_code=trust_remote_code)`

Throws this error

### Expected behavior

Not throw error
Hi, can you provide a full code snippet with which I can reproduce the error?
<|||||>Hi I'm just loading the llama 2 model but from my local machine. I have an update however. I tested it on the latest pip install version and it works fine. So I think the code broke in between the pip version and the current status of the repo.<|||||>And it should be resolved now, but can you provide us your exact snippet of code yielding to the bug? cc @ydshieh who is working on the migration `use_auth_token` -> `token`<|||||>@nivibilla 

You can try a version after this commit on `main`

0c790ddbd1c91250b26bab4308acbf271df063a7

(which is #25146 being merged)

Let me know 🙏 