NVIDIA-NeMo/Megatron-Bridge

Support num_epochs in TrainingConfig

開放

#2,391 建立於 2026年2月16日

 (3 則留言) (0 個反應) (0 位負責人)Python (413 個分叉)auto 404
area:trainingcommunity-requestfeaturegood first issuewaiting-on-customer

倉庫指標

星標
 (800 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Is your feature request related to a problem? Please describe.

The current implementation relies on iteration-based training (train_iters). While precise for step-counting, it lacks a native mechanism to ensure training completes exactly at the end of a full data pass. Manually calculating the total steps required to cover a dataset is prone to errors and requires constant recalculation whenever the global_batch_size or dataset composition changes.

Describe the solution you'd like

I am requesting the addition of a --num_epochs parameter. This feature should: Automatically calculate the equivalent train_iters based on the total sample count of the loaded dataset and the global_batch_size. Support fractional values (e.g., 0.5 epochs).

Describe alternatives you've considered

The current workaround involves manual calculation using the following logic:

\text{train\_iters} = \frac{\text{total\_tokens\_to\_train}}{\text{batch\_size} \times \text{seq\_len}}

which is very inaccurate


Thanks!

貢獻者指南