-
Notifications
You must be signed in to change notification settings - Fork 22
Why Shuffle at the beginning of each inner epoch #93
Copy link
Copy link
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hello, I noticed that you performed a shuffle operation in the
Flow-Factory/src/flow_factory/trainers/nft.py
file. Could you explain the purpose of this? It seems that the Flow-GRPO code doesn't have a similar operation.
# Shuffle samples at the beginning of each inner epoch
perm_gen = create_generator(self.training_args.seed, self.epoch, inner_epoch)
perm = torch.randperm(len(samples), generator=perm_gen)
shuffled_samples = [samples[i] for i in perm]
# Re-group samples into batches
sample_batches: List[Dict[str, Union[torch.Tensor, Any, List[Any]]]] = [
BaseSample.stack(shuffled_samples[i:i + self.training_args.per_device_batch_size])
for i in range(0, len(shuffled_samples), self.training_args.per_device_batch_size)
]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested