From 7898652dfb4ecd7a3676788da5dab06b557c1ffc Mon Sep 17 00:00:00 2001 From: xaedes Date: Wed, 13 Sep 2023 16:20:50 +0200 Subject: [PATCH] update shuffle rng state on reshuffle --- examples/finetune/finetune.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/finetune/finetune.cpp b/examples/finetune/finetune.cpp index 89d9156f9..9c1fd4943 100644 --- a/examples/finetune/finetune.cpp +++ b/examples/finetune/finetune.cpp @@ -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);