make run_generation more generic for other devices (#25133)
* make run_generation more generic for other devices
* use Accelerate to support any device type it supports.
* make style
* fix error usage of accelerator.prepare_model
* use `PartialState` to make sure everything is running on the right device
---------
Co-authored-by:
statelesshz <jihuazhong1@huawei.com>
Showing
Please register or sign in to comment