dParallel icon indicating copy to clipboard operation
dParallel copied to clipboard

Question about forward process

Open cychomatica opened this issue 11 months ago • 1 comments

Hi. I have a question about the forward process implementation. Take this function https://github.com/czg1225/dParallel/blob/23c03b78b5c7ef4818381d4f65c8422986f94c1c/Dream/dream_train.py#L90 https://github.com/czg1225/dParallel/blob/23c03b78b5c7ef4818381d4f65c8422986f94c1c/Dream/dream_train.py#L105-L127 as an example. In L115-121, it seems like the masks are generated for the whole batch. Then why do we need a range(b) loop?

Thanks for your time!

cychomatica avatar Dec 26 '25 20:12 cychomatica

Hi @cychomatica Sorry, this is indeed a small error, but since we are using microbatch=1 in our code, it has no impact in this case. If you want to change the code to support training with microbatch>1, you may need to modify the L115-121 code to generate a mask for each sample within the microbatch

czg1225 avatar Dec 28 '25 07:12 czg1225