[Core] fix variant-identification. (#9253)
* fix variant-idenitification.
* fix variant
* fix sharded variant checkpoint loading.
* Apply suggestions from code review
* fixes.
* more fixes.
* remove print.
* fixes
* fixes
* comments
* fixes
* apply suggestions.
* hub_utils.py
* fix test
* updates
* fixes
* fixes
* Apply suggestions from code review
Co-authored-by: YiYi Xu <yixu310@gmail.com>
* updates.
* removep patch file.
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com>