[bugfix] add seed in torchrun_example.py (#15980)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@@ -761,6 +761,12 @@ class ModelConfig:
|
||||
self,
|
||||
parallel_config: "ParallelConfig",
|
||||
) -> None:
|
||||
|
||||
if parallel_config.distributed_executor_backend == "external_launcher":
|
||||
assert self.seed is not None, (
|
||||
"Seed must be set when using external launcher backend to "
|
||||
"make sure sampling results are the same across workers.")
|
||||
|
||||
total_num_attention_heads = getattr(self.hf_text_config,
|
||||
"num_attention_heads", 0)
|
||||
tensor_parallel_size = parallel_config.tensor_parallel_size
|
||||
|
||||
Reference in New Issue
Block a user