Got 40/50 just smashing the GPT2 button.
Try to guess if code is real or GPT2-generated
21–30 of 108 posts
Re: Try to guess if code is real or GPT2-generated
#22Earlier quoted context omitted.
There are likely some "tells" but many fewer of them than I expected. I've seen it occasionally generate something malformed like "#includefrom", and like all GPT2 models it has a tendency to repeat things. Yes, I think people definitely find it challenging. I'm keeping track of the correct and total guesses for each snippet, right now people are at almost exactly 50% accuracy: correct | total | pct ---------+-------…
Are you presenting real samples and GPT2 samples to users with equal probabilities? EDIT another poster guessed GPT2 each time and found the frequency was 80 percent
SELECT id, code, real FROM code ORDER BY random() LIMIT 1
Re: Try to guess if code is real or GPT2-generated
#23Re: Try to guess if code is real or GPT2-generated
#24Hi, author here! Some details on the model: * Trained 17GB of code from the top 10,000 most popular Debian packages. The source files were deduplicated using a process similar to the OpenWebText preprocessing (basically a locality-sensitive hash to detect near-duplicates). * I used the [Megatron-LM]( https://github.com/NVIDIA/Megatron-LM ) code for training. Training took about 1 month on 4x RTX8000 GPUs. * You can d…
Can you share the dataset too?
Re: Try to guess if code is real or GPT2-generated
#25This looks like overfitting to me. Some of the GPT samples were definitely real code, or largely real code. One looked like something from Xorg, another like it was straight from the COLLADA SDK. It’s really hard to define what “truly new code” is, if it’s just the same code copy pasted in different order. Blah blah Ship of Theseus etc.
The generated snippets are prompted with 128 characters from real code (but not code from the training data), so they can often pick up on the name of the project etc.
Re: Try to guess if code is real or GPT2-generated
#26Earlier quoted context omitted.
There are likely some "tells" but many fewer of them than I expected. I've seen it occasionally generate something malformed like "#includefrom", and like all GPT2 models it has a tendency to repeat things. Yes, I think people definitely find it challenging. I'm keeping track of the correct and total guesses for each snippet, right now people are at almost exactly 50% accuracy: correct | total | pct ---------+-------…
Are you presenting real samples and GPT2 samples to users with equal probabilities? EDIT another poster guessed GPT2 each time and found the frequency was 80 percent
Re: Try to guess if code is real or GPT2-generated
#27Got 40/50 just smashing the GPT2 button.
Re: Try to guess if code is real or GPT2-generated
#28Re: Try to guess if code is real or GPT2-generated
#29The two factors that seemed like dead giveaways were comments that didn't relate to the code, and sequences of repetition with minor or no variations.
Re: Try to guess if code is real or GPT2-generated
#30The real examples have worse comments at times.
The only flaw is that it shows fake code most of the time so you can game it that way.