by pedrovhb · 3y ago · 0 comments
> One DeepMind engineer even reported being able to convince ChatGPT that it was a Linux terminal and getting it to run some simple mathematical code to compute the first 10 prime numbers. Remarkably, it could finish the task faster than the same code running on a real Linux machine.
Following the link, there's a screenshot to a screenshot [0] of a code-golf solution to finding primes which is quite inefficient, and the author notes
> I want to note here that this codegolf python implementation to find prime numbers is very inefficient. It takes 30 seconds to evaluate the command on my machine, but it only takes about 10 seconds to run the same command on ChatGPT. So, for some applications, this virtual machine is already faster than my laptop.
So it's not quite calculating primes; more likely it recognizes the code as being code to do so, and recites the numbers from memory. That's interesting in its own right, but we won't be running Python on an LLM for a performance boost any time soon. In my experience this interpreting is apparent as a limitation of the model when it keeps insisting on broken code being correct, or having its mistake pointed out, then apologizing, saying it's got some new code that fixes the issue, and proceeding to output the exact same code.
[0] https://www.engraved.blog/content/images/2022/12/image-13.pn...
We're building systems capable of programing computers non-deterministically. I think this is huge. But not because ChatGPT23 will be a CEO or a politician. But because this is a paradigm shift in compute similar to moving from integrator machines to general computers. I don't think LLMs will make programmers obsolete. I think large enough models will make programming something completely different from what it is now.
The days of sequencing tokens for compilers/interpreters seem to be drawing to an end as the dominant way of specifying software products.
That prime number example is a little bit like when you put a functools.lru_cache decorator on a function in Python. It's faster than computing the function call because it's able to recall the return value for the parameters from the cache "memory".
Of course, many skilled programmers are also mainly used a cache for common solutions to common problems organizations have in the programming domain. As humans we can derive satisfaction from being able to tackle the same task others can, as a confirmation of our own progress. We like "doing it ourselves". But globally that's not super interesting if lots of people are constantly re-developing the same solutions to the same problems for their own benefit. I guess that's the push-and-pull (and the anxiety generator).
In my opinion Stack Overflow does a fine job at that. And it's transparent in terms of solutions proposed being voted on and discussed. Turning that into sausage advice is a downgrade.
>But globally that's not super interesting if lots of people are constantly re-developing the same solutions to the same problems for their own benefit.
I'd argue this is how we train individuals thus globally quite relevant.
But when it comes down to it everything in life is just nth dimensional tensor puzzles. What I really cherish computers for giving me is fast and clear feedback.
Instead, it is constant and accelerating destabilization. Hundreds of AI projects attempting to ride this accelerating wave were essentially just made obsolete yesterday - https://www.youtube.com/watch?v=DH-2BHDYNfk
I feel the excitement is going to very soon turn into frustration of attempting to remain relevant ahead of the accelerating technological curve. Humans need periods of stabilization to plan and reason about their lives.
The LLM didn't run the code, it tried to predict the output based on its knowledge of python and primes.
For shits and giggles, I just just wrote a series of `if...then` statements for 0 to 5, and only actually calculated the factorial for inputs >=6. I passed after the examiner just input 3 and 5 and was satisfied that the output was correct. Oops.
That doesn't change the fact that its predicting the output based on its knowledge of python though.
So, yes you're right, but at the same time it doesn't change anything IMO.
What would it do if the training data was only code? Only code+inputs+outputs? Only function signature+inputs/outputs? Only signature+comments?
Etc.
Since we don’t know how it works, we should be open to the possibility that it’s using all sorts of storytelling techniques.
Correctly produces a convincing output for having decoded the base64-encoding of "ping google.com" and then piping it to bash: https://media.infosec.exchange/infosecmedia/media_attachment...
Similar command, but with a garbage domain it hasn't seen before, and a less well-known domain. It produced convincing output in both cases: https://media.infosec.exchange/infosecmedia/media_attachment...
Having it just output a base64 decoding of an obviously unique string. Fascinatingly, it tried to correct typos that I intentionally included: https://media.infosec.exchange/infosecmedia/media_attachment...
This was also pretty cool -- ask it to start a webserver then curl it: https://media.infosec.exchange/infosecmedia/media_attachment...
Telling it that it is a python interpreter and calling self-defined functions: https://media.infosec.exchange/infosecmedia/media_attachment...
A slightly more complicated function: https://media.infosec.exchange/infosecmedia/media_attachment...
I did a few more experiments including generating large factorial numbers that took a long time on my laptop but it responded accurately to a much larger length than my laptop could do (though these were only accurate to the first few hundred digits)
Edit: the base64 decoding examples are terrifying. I have no idea how that works.
Edit2: actually I can sort of see how that works, b64 encoding doesn’t have any obfuscation to it, I could see how an ML model can build a pretty good approximation over time after seeing all the examples on the internet.
By the same reasoning, I hope people do realise that there are computations that are just impossible given the finite depth in a Transformer. The only possible way to overcome this in the current paradigm is the Chain-of-Thought related methods.
[1] https://en.wikipedia.org/wiki/Stochastic_dynamic_programming