[Bugfix] Give each data-parallel engine its own global RNG streams (#59788)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
aoshen02
2026-10-05 17:38:18 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 877ddcc456
commit d09ff77637
4 changed files with 26 additions and 3 deletions
+3 -1
View File
@@ -268,7 +268,9 @@ class CPUWorker(Worker):
self.model_runner.warming_up_model()
# Reset the seed to ensure that the random state is not affected by
# the model initialization and profiling.
set_random_seed(self.model_config.seed)
set_random_seed(
self.model_config.seed, self.parallel_config.data_parallel_index
)
return CompilationTimes(
language_model=self.compilation_config.compilation_time,
encoder=self.compilation_config.encoder_compilation_time,