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

bug: text generation result is different for different operating systems (macOS, windows, and Linux) #327

Open
xdotli opened this issue Oct 14, 2023 · 0 comments

Comments

@xdotli
Copy link

xdotli commented Oct 14, 2023

Repo of the project where the bug is spotted:

https://github.com/l1xiangyi/GPT2/tree/main

What is the problem

The problem occurs in main.py line 89 where I try to generate texts based on a NeruIPS dataset. This line calls the sample function that generates subsequent sentences based on the start_text. However the texts generated on macOS, Windows, and Linux are very different even though the seed is fixed in the config.yml.

Strange words like "Zombie" pop up a lot in the Windows and Linux generated texts.

How to reproduce this problem

Linux

The simplest way is go create a new Colab notebook and run the following commands:

!git clone https://github.com/l1xiangyi/gpt2/
%cd gpt2
!python -m pip install -r requirements.txt
!python main.py

Then check the samples.txt in the submit folder.

Windows

Similar steps to the Linux version. Just drop the special sign before each commands:

git clone https://github.com/l1xiangyi/gpt2/
cd gpt2
python -m pip install -r requirements.txt
python main.py
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

No branches or pull requests

1 participant