Updated Trainer's liger-kernel integration to call correct patching API
Author: shimizust
Pull request: yes

# What does this PR do?

- The Trainer previously added a `use_liger_kernel` flag to apply liger kernels to the given model based on model type (https://github.com/huggingface/transformers/pull/32860). However, we realized that calling patching APIs after the model has been initialized will only partially patch with Liger kernels (see https://github.com/linkedin/Liger-Kernel/pull/199/files for more details).
- Updated the Trainer code to invoke the new patching API that correctly patches model instance variables post-model initialization.
- Addresses https://github.com/huggingface/transformers/issues/32861

## Testing

```
pytest tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_patching tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_trainer
================================================================================================================================================ test session starts ================================================================================================================================================
platform linux -- Python 3.10.14, pytest-7.4.4, pluggy-1.0.0
rootdir: /home/jobuser/transformers
configfile: pyproject.toml
plugins: xdist-3.6.1, timeout-2.3.1, rich-0.1.1, lipy-config-base-32.0.38, lipy-fabric-35.3.13, lipy-test-8.0.73, datadir-1.3.1
collected 2 items                                                                                                                                                                                                                           

tests/trainer/test_trainer.py ..                                                                                                                                                                                                      [100%]

============================================================================================================= warnings summary ==============================================================================================================
tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_trainer
  /home/jobuser/transformers/.venv/lib/python3.10/site-packages/torch/nn/parallel/_functions.py:68: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
    warnings.warn('Was asked to gather along dimension 0, but all '

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================================= 2 passed, 1 warning in 7.34s ========================================================================================================
```


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?

cc @SunMarc @ArthurZucker 

Comments:
cc @ByronHsu @JasonZhu1313 

LGTM thanks for the great work!