OpenBMB / BMTrain

Efficient Training (including pre-training and fine-tuning) for Big Models
Apache License 2.0
548 stars 74 forks source link

add _save_to_infer_model #170

Closed zkh2016 closed 11 months ago

zkh2016 commented 11 months ago

Pull Request Template

Issue Reference

Please mention the issue number if applicable, or write "N/A" if it's a new feature.

Issue #...

Description

Please describe your changes in detail. If it resolves an issue, please state how it resolves it.

直接将gpu中的state_dict传给推理模型,减少save/load时间

Type of Change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist

Additional Information

Any additional information, configuration, or data that might be necessary for the review.