| Files | Last commit | Last update |
|---|---|---|
PyTorch Training Model Migration and Tuning Guide
What Is Model Migration
Refer to What Is Model Migration.
Why Perform Model Migration
Refer to Why Perform Model Migration.
How to Perform Model Migration
Refer to Table 1.
Table 1 Model migration guidance
| Category | Migration Guide | |
|---|---|---|
| Conventional models | Adapted Conventional models | Refer to the Model Scope and follow the corresponding model's README for training and inference. |
| Unadapted Conventional models | Refer to this document for migration and training. | |
Directory Navigation
- Pre-Migration Preparation: Introduces model selection, pre-migration analysis, and common preparations.
- Model Migration: Covers automatic migration, tool-based migration, and manual migration.
- Mixed Precision Adaptation: Introduces mixed precision training adaptation and typical examples.
- Model Training: Introduces the training environment, launch methods, and training debugging.
- Model Saving: Introduces methods for saving model weights.
- Accuracy Debugging: Introduces accuracy issue analysis methods and tuning tools.
- Performance Tuning: Introduces performance metrics, analysis process, and tuning methods.
- Appendixes: Contains
pdbparameters, multi-card launch examples, and common migration interfaces. - Figure Resources: Stores figures referenced by the documents.
Migration Process
Refer to Migration Process.
Performance Tuning
Refer to Performance Tuning.
Performance data collection and evaluation:
- In an NPU environment, refer to the Performance Tuning Tool Introduction section for model performance breakdown.
- Based on the data obtained from performance breakdown, analyze bottleneck modules and identify the direction for performance optimization.
Model performance optimization implementation:
Based on the type of performance bottleneck modules, seek optimization methods from Performance Tuning Methods. Specific methods include data loading optimization, NPU affinity optimization, memory optimization, communication optimization, and scheduling optimization.
In addition, this section provides recommendations for communication optimization, communication algorithms that can be enabled, and scheduling optimization methods.