hpcaitech / ColossalAI-Examples

Examples of training models with hybrid parallelism using ColossalAI
Apache License 2.0
334 stars 102 forks source link

[RFC] Merge train_with_engine and train_with_trainer #100

Open FrankLeeeee opened 2 years ago

FrankLeeeee commented 2 years ago

Describe the feature

In most examples, there are two files, namely train with engine and trainer. The code is highly redundant in these two files and we should just merge them into one file. We can add an additional flag to let the user to choose to run with either engine or trainer. As engine provides better portability from user code to colossalai-style code, we should keep engine as the default.