Skip to content

confused by _balance_batch calculation in RayPPOTrainer #4538

@xutianyiii

Description

@xutianyiii

I am confused by the function _balance_batch in RayPPOTrainer. I roughly understand what this function is supposed to do through its comment 'Reorder the data on single controller such that each dp rank gets similar total tokens'

So why passing world_size to the inner function get_seqlen_balanced_partitions rather than dp_size if it is supposed to do load balance across dp ranks ?

workload_lst, k_partitions=world_size, equal_size=True

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