# Set\_seed and training argument's data\_seed

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fset-seed-and-training-arguments-data-seed%2F101048%3E%5C
**Category:** Beginners\
**Created:** [August 6, 2024, 3:00am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fset-seed-and-training-arguments-data-seed%2F101048 "2024-08-06T03:00:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lIlBrother](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lilbrother/32/30226_2.png) [@lIlBrother](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FlIlBrother)%5C
**Post date:** [August 6, 2024, 3:00am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fset-seed-and-training-arguments-data-seed%2F101048%2F1 "2024-08-06T03:00:50Z")

</div>

If I specify the set\_seed in the trainer utility, does it also fix the data\_seed in TrainingArguments?

To ensure reproducibility, is using set\_seed alone sufficient, or should I also define data\_seed?

---

<div class="post-metadata">

**Author:** ![lIlBrother](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lilbrother/32/30226_2.png) [@lIlBrother](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FlIlBrother)%5C
**Post date:** [August 6, 2024, 3:04am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fset-seed-and-training-arguments-data-seed%2F101048%2F2 "2024-08-06T03:04:20Z")

</div>

data\_seed (`int`, _optional_):  
Random seed to be used with data samplers. If not set, random generators for data sampling will use the  
same seed as `seed`. This can be used to ensure reproducibility of data sampling, independent of the model  
seed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [August 6, 2024, 3:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fset-seed-and-training-arguments-data-seed%2F101048%2F3 "2024-08-06T15:04:43Z")

</div>

Closed on August 6, 2024, 3:04pm UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
