Earlier quoted context omitted.
Thanks for stopping by! This is impressive. I would be curious to know if my hunch below about potential weaknesses/tells was at all correct. Did people find it to be as challenging when you showed it to them as some of us are here? Did you expect that level of complexity?
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 ---------+-------…
Try to guess if code is real or GPT2-generated
81–90 of 108 posts
Re: Try to guess if code is real or GPT2-generated
#82Hi, 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…
If you want to look at some more fake samples, here are 256 generated snippets. These ones start at the beginning of the file each time, so you should get a better sense of context: https://moyix.net/~moyix/unconditional_samples.txt
Re: Try to guess if code is real or GPT2-generated
#83I got a function that assigned the same expression to three variables. Then it declared a void function with documentation stating "returns true on success, false otherwise". Apparently that code was written by a human, which makes me either doubt the correctness of that website, or the quality of the code it was fed with
First code it showed me had getXXX() methods returning void, each of which contained nothing but a printf using the same string variable with no apparent connection to XXX, along with invalid format strings. Surely code this nonsensical has to be generated. Yet when I clicked "GPT2" it said I was wrong.
Re: Try to guess if code is real or GPT2-generated
#84Re: Try to guess if code is real or GPT2-generated
#85Earlier quoted context omitted.
In [2]: scipy.stats.binom_test(89, 200, 0.5) Out[2]: 0.13736665086863936 Unusual to be this lopsided (1-in-7), but not crazy.
Reminder that the p-value of a test is NOT the probability of H0 being true, see [0]. It only shows that, if we assume a significance of 0.05 we cannot reject the hypothesis (in our case that 89/200 is the result of a binomial distribution with p=.5). [0] https://en.wikipedia.org/wiki/Misuse_of_p-values#Clarificati...
It's rare that a p-value is what you want, but for answering "how unusual is this case", it's the exact right tool for the job.
Re: Try to guess if code is real or GPT2-generated
#86There is a "codes" top-level domain? Codes? CODES?? What's next? Advices? Feedbacks? Rests? I give ups.
Re: Try to guess if code is real or GPT2-generated
#87Re: Try to guess if code is real or GPT2-generated
#88It's easy after a while... all the terribly written code is human made and the clean tidy code is GPT2, I for one welcome our new programming overlords.
Re: Try to guess if code is real or GPT2-generated
#89It's easy after a while... all the terribly written code is human made and the clean tidy code is GPT2, I for one welcome our new programming overlords.
There was one sample where the code written by gpt-3 had nonsensical grammar in the comments and another where it had an overloaded > operator with 3 parameters (is that even valid c++?)