Live data from Hacker News

I asked GPT-NeoX-20B a hundred arithmetic questions

twitter.com

61–70 of 235 posts

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#61
post #57

I'd like to see doing this with random people on the street and then compare performance. You may be surprised.

Not really. Average person on the street is going to correctly say "geez, I dunno. Can I use my phone?" If you don't forbid them to, then they'll whip it out and get 98% correct (I figure they'll typo a few). This model didn't have enough understanding to do that (since it literally has no understanding at all).

I don't know where you live, but 98% correct is not what would happen around here.

Edit: Oh, 98% _with_ a calculator. What if you force them to do it by hand?

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#62
post #50

Earlier quoted context omitted.

Thanks for that. I've played around a little bit. > What is 123456789 - 123456789? > 123456788 > What is 123456789 * 0? > 123456789 Not even near. It didn't surprise me that the model failed to handle cases above, which are unlikely to present in the data set.

Try temp 0.1 top-k 40. For math, it matters to have an unthinkably low temperature. It’s what generated the results in the OP. What is 12345 - 12345? 0 What is the distance between -0.1 and -0.01? 0.09 One neat example just now: What is 12345 divided by 12? 4115/4

I pointed it out above; even though it is text, the ASCII representation is just a different base for the numbers - base 2^8 - ('325' is '3' * (2^32) + '2' * (2^16) + '5' * 2^8 = 51 * 2^32 + 50 * 2^16 + 53 * 2^8); it should approximate those polynomial functions very well.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#63

If you want to play with the model, you can (with difficulty) for free at https://goose.ai/playground . You have to log in, but thankfully you can via google. The playground crashes every minute, and the defaults ruin your outputs (temperature 1, really? 0.7 to 0.8 is a necessity, with top-k 40), and they turned off autocorrect on mobile, presumably because they hate you and your family for owning an iPad, but you ca…

Thank you for the feedback! We're working on improving the playground and I hope those issues will be a thing of the past soon.

Love the inference speed. Best demo anywhere in that regard. Nice work.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#64

It seems to me that carries are where this trips up. Which is weirdly human. I wonder if there are enough examples to learn each digit pair addition or subtraction, but not enough to learn every contextual action.

Not really "human". Doing no-carry addition is much easier for a machine to do as well, as that's basically what XOR does, i.e., SIMD. Carry introduces dependencies between the digits, potentially as long as the whole string goes. So that's pretty hard to understand, also for a machine.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#65
When you toss “2241 + 19873 =” into an applet that shows you the default tokenization scheme GPT-3 uses, you get this:

(224)(1)( +)( 198)(73)( =)

I’ve heard it remarked before that, while tokenization is obviously an unavoidable part of a model with an architecture like GPT, this is a very silly way of tokenizing number strings for the purposes of learning or doing arithmetic. Indeed, I think a lot of GPT-3’s puzzling edge-case performance can be ascribed to weird and unhelpful tokenizations. Just imagine if you were forced to learn arithmetic with a brain that automatically categorized “224” as a sort of distinct object, or, for that matter, breaking down 19873 as ( 198)(73) rather than (19873) or (1)(9)(8)(7)(3) or anything practically useful.

The thing is that we can, in a sense, learn better “tokenizations”, in the sense that a 4 year old learning to read sees letters, while a 40 year old reading a novel “sees” whole words or even groups of words. The GPT architecture can’t change its tokenization scheme.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#66
These language models feel, to me, like the unfiltered self. If someone asked me what 838+1283 was my head would instantly offer up some number 2301 or something. But i would discard that number because I learned in elementary school that I don't come up with good values, I need to execute a process in order to get the right value.

I imported the csv version and I'm no statistician but 90% percentile relative error is 8.6%, which is something like this:

What is 22730 - 24978? -2448 (real answer -2248)

That's totally within range of something that would plop into my head...with one exception. Of 1000 entries, only five have an incorrect last digit. I think that's meaningful...it almost tells me that there's a multi-stage operation happening in there somewhere.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#67

When you toss “2241 + 19873 =” into an applet that shows you the default tokenization scheme GPT-3 uses, you get this: (224)(1)( +)( 198)(73)( =) I’ve heard it remarked before that, while tokenization is obviously an unavoidable part of a model with an architecture like GPT, this is a very silly way of tokenizing number strings for the purposes of learning or doing arithmetic. Indeed, I think a lot of GPT-3’s puzzlin…

Whoa, that explains why only .5% of the examples have an incorrect last digit.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#68

Earlier quoted context omitted.

Try temp 0.1 top-k 40. For math, it matters to have an unthinkably low temperature. It’s what generated the results in the OP. What is 12345 - 12345? 0 What is the distance between -0.1 and -0.01? 0.09 One neat example just now: What is 12345 divided by 12? 4115/4

I pointed it out above; even though it is text, the ASCII representation is just a different base for the numbers - base 2^8 - ('325' is '3' * (2^32) + '2' * (2^16) + '5' * 2^8 = 51 * 2^32 + 50 * 2^16 + 53 * 2^8); it should approximate those polynomial functions very well.

Hmm. I’m not sure what you mean. Temperature is randomness; low temp is to get the most probable least random result. It’s what chess engines do during tournaments, for example.

The other parts seem unlikely. It has no knowledge of bases, except insofar as they appear in the training set. I saw this in our GPT chess work — even with strange tokenization, it learned chess notation well.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#69
post #3

Thank you for this. Technically it's not GPT-3, but GPT-NeoX-20B, although they are based on a similar architecture. The poor performance is most likely due to not having a large database of math problems to draw from. Github, for example, is part of the dataset that is used to train both GPT-3 and GPT-Neo variants, which is partly why they can generate meaningful code (sometimes). I wonder how a model finetuned for…

The cool part comes when the model can make the connection that

multiply 12345 by 87654

is the same as

def multiply_two_numbers(x, y):

return x * y

Which of course produces the desired result. The interesting part is that github copilot wrote the above with only the prompt "def multiply_two" as the prompt.

Re: I asked GPT-NeoX-20B a hundred arithmetic questions

#70

Earlier quoted context omitted.

Sure, but GPT-3 doesn't attach semantics to text, it just learns how to produce text patterns that are similar to text patterns it has seen before.

"Similar" is an inherently semantic property.

Would you say that something like string.GetSimilarity(string), which tells you by what number of characters two strings differ, is interpreting the text?

Basically what GPT-3 does is to find a string X of a particular length such that it maximizes concat(userInput, X).GetSimilarity(someStringInTrainingSet).

Edit: to be clear, I'm not suggesting it's looking up the training set at runtime, X.GetSimilarity(someStringInTrainingSet) is basically what got baked in during training.

Post reply on HN