Skip to content

[BUG]: iter error when use ptx_coef in ppo:Expected input batch_size (98) to match target batch_size (64). #3443

@baibaiw5

Description

@baibaiw5

🐛 Describe the bug

It seems there is a bug in the following code:
next(iter(self.pretrain_dataloader)) will create a new batch. The data of input_ids/labels/attention_mask is not aligned with
each other. They will use differenct batch data. When the batch_size of different batch is different.
An error will occur:Expected input batch_size (98) to match target batch_size (64).

https://github.com/hpcaitech/ColossalAI/blob/main/applications/Chat/coati/trainer/ppo.py
image

image

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions