Skip to content

About batch_size #61

Description

@tszslovewanpu

你好,提个概念性的问题,之前没接触过Megatron
1、原来跑模型需要设置batch_size,例如设置成4(4 examples),则一个iteration里消耗4个样本;
如果进一步将minibatch划分为4个micro_batch,则micro_batch_size=1(1 example),可以这么理解吗?
2、训练实例:单机8卡跑,设置参数NNodes=1/GPUs_per_node=8/TP=8/PP=1/DP=8/global_batch_size=1/micro_batch_size=1时,发现每次iteration只吃1个example,这个情况下显存都占满了。是不是我很傻地把1个example切了八份扔进了八个卡里,在做无用功?希望可以指导一下~
感谢赐教!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions