| [Feature] Upgrade the functionality of the bridge to make it compatible with loading all types of weights.
Co-authored-by: ningmengliu<liuhao438@huawei.com>
# message auto-generated for no-merge-commit merge:
!2154 merge master into master
[Feature] Upgrade the functionality of the bridge to make it compatible with loading all types of weights.
Created-by: ningmenglh
Commit-by: ningmengliu
Merged-by: ascend-robot
Description: ## Motivation
Upgrade the functionality of the bridge to make it compatible with loading all types of weights.
## Modification
1、将权重加载方式,使用bridge方式置为True,使其成为常态开启的选项
2、改变bridge的patch方式,使其megatron后端能够接受pt权重类型加载与huggingface权重类型加载;使fsdp2后端能够接受pt类型权重加载,huggingface类型权重,以及dcp类型权重加载
3、去掉之前的部分冗余判断
## Self-test (Optional)
If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached.
## BC-breaking (Optional)
If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR.
## Checklist
**Before PR**:
- [ ] The new code needs to comply with the Clean Code specification.
- [ ] The PR content is self-checked, and the expression can be clear and the writing standardized
**After PR**:
- [ ] CLA has been signed and all committers have signed the CLA in this PR.
- [ ] The ci-pipeline is passed, Code Check is passed.
See merge request: Ascend/MindSpeed-MM!2154 | 3 个月前 |