replace assert with exception in src/transformers/utils/model_pararallel_utils.py (#14072)
* replace assert with exception in src/transformers/utils/model_parallel_utils.py
* fix some code style
* fix typo
Co-authored-by: skpig <1900012999@pku.edu.cn>