You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/train/multi-task-training.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,14 @@ Specifically, there are several parts that need to be modified:
81
81
You can specify any positive real number weight for each task. The higher the weight, the higher the probability of being sampled in each training.
82
82
This setting is optional, and if not set, tasks will be sampled with equal weights.
83
83
84
+
- (Optional) {ref}`training/num_epoch_dict <training/num_epoch_dict>`: The number of training epochs for each model branch, specified as a dictionary mapping `model_key` to epoch values.
85
+
This allows different tasks to train for different numbers of epochs, which is particularly useful for multi-task fine-tuning scenarios
86
+
where a data-rich pretrained model is jointly trained with a data-scarce downstream task.
87
+
When set, the total training steps are computed as `max_i(num_epoch_dict[i] * per_task_total[i] / model_prob[i])`,
88
+
ensuring each model completes at least its specified number of epochs.
89
+
The model requiring the most steps will complete approximately its target epochs, while other models may complete more epochs.
90
+
In multi-task mode, this parameter takes precedence over `num_epoch` if both are set.
91
+
84
92
An example input for multi-task training two models in water system is shown as following:
0 commit comments