Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set RNG seed manually with '-rg' parameter #654

Closed
wants to merge 4 commits into from

Conversation

ademeure
Copy link
Contributor

This adds a '-rg' parameter to manually set the RNG seed. This is useful to see if a change is beneficial or not when the difference is potentially real but smaller than the noise threshold. As we are fully deterministic (for a given system), we can't just run multiple time with the same settings anymore.

The same seed will be used for both gpt2_init_common() and gpt2_build_from_random(), so this effectively changes the default seed from 42 to 13371337 for gpt2_build_from_random(). It does not change the default seed for the non-random initialisation path or test_gpt2cu in any way.

@karpathy
Copy link
Owner

I tried to fix this PR properly but it gets really tricky with the seeds because there are multiple of them (for stochastic rounding vs. for init), of different dtypes and it feels kind of delicate. Might revisit later.

@karpathy karpathy closed this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants