update shuffle rng state on reshuffle

This commit is contained in:
xaedes 2023-09-13 16:20:50 +02:00
parent 0e32932931
commit 7898652dfb
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -2805,8 +2805,9 @@ void opt_callback(void * vdata, int accum_step, float * sched) {
++data->lora->train_epochs;
printf("%s: reshuffle samples. completed epochs: %llu\n", __func__, (long long unsigned) data->lora->train_epochs);
// note: we may have used some samples from the current shuffling more than once
data->lora->shuffle_rng_state_current = data->lora->shuffle_rng_state_next;
data->lora->shuffle_rng_state_next = shuffle_samples(
data->lora->shuffle_rng_state_next,
data->lora->shuffle_rng_state_current,
data->samples_begin,
data->samples_size,
data->samples_count);